Wrong prefix at DHCPv6 releases at clients

Hello,

I use OpenWRT 19.07.7 on a Linksys WRT1200AC router. I want use IPv6 on it and for the connected Linux clients via DHCPv6.
At the router I see

br-lan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 2003:e5:970b:9d00::1/64 scope global dynamic 
       valid_lft 14045sec preferred_lft 1445sec
    inet6 fdaa:abc8:799c::1/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::6238:e0ff:fe0c:38cf/64 scope link 
       valid_lft forever preferred_lft forever
pppoe-wan: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 state UNKNOWN qlen 3
    inet6 2003:e5:97ff:eb2:583b:122e:d018:7840/64 scope global dynamic 
       valid_lft 13895sec preferred_lft 1295sec
    inet6 fe80::583b:122e:d018:7840/10 scope link 
       valid_lft forever preferred_lft forever

But on my Workstation I will get always DHCP releases like

enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 fdaa:abc8:799c::e34/128 scope global 
       valid_lft forever preferred_lft forever
    inet6 2003:e5:970e:a700::e34/128 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::213:3bff:fe10:773c/64 scope link 
       valid_lft forever preferred_lft forever

with a wrong prefix like "/128" instead of "/64".
In '/etc/config/dhcp' I have made already an entry "ip6prefix"

config dhcp 'lan0'                          
        option leasetime '12h'                       
        option interface 'lan0'     
        option start '20'                   
        option limit '15'                            
        option ra 'server'                  
        option ndp 'relay'                           
        option dhcpv6 'server' 
        option ip6prefix '64'       
        option ra_management '1'
        list dns '2606:4700:4700::1111'
        list dns '2001:4860:4860::8888'

What I have to do for do it right?

With best regards
BrotherJ

ubus call system board; ifstatus wan6; ifstatus wan_6

ubus call system board

{
        "kernel": "4.14.221",
        "hostname": "Kenya",
        "system": "ARMv7 Processor rev 1 (v7l)",
        "model": "Linksys WRT1200AC",
        "board_name": "linksys,caiman",
        "release": {
                "distribution": "OpenWrt",
                "version": "19.07.7",
                "revision": "r11306-c4a6851c72",
                "target": "mvebu/cortexa9",
                "description": "OpenWrt 19.07.7 r11306-c4a6851c72"
        }
}

ifstatus wan6


{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 16598,
        "l3_device": "pppoe-wan",
        "proto": "pppoe",
        "device": "eth0.100",
        "updated": [
                "addresses",
                "routes"
        ],
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [
                {
                        "address": "93.195.92.77",
                        "mask": 32,
                        "ptpaddress": "62.155.245.100"
                }
        ],
        "ipv6-address": [
                {
                        "address": "fe80::583b:122e:d018:7840",
                        "mask": 128
                }
        ],
        "ipv6-prefix": [

        ],
        "ipv6-prefix-assignment": [

        ],
        "route": [
                {
                        "target": "0.0.0.0",
                        "mask": 0,
                        "nexthop": "62.155.245.100",
                        "source": "0.0.0.0/0"
                }
        ],
        "dns-server": [
                "217.0.43.129",
                "217.0.43.145"
        ],
        "dns-search": [

        ],
        "neighbors": [

        ],
        "inactive": {
                "ipv4-address": [

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ],
                "neighbors": [

                ]
        },
        "data": {

        }
}

ifstatus wan

{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 16580,
        "l3_device": "pppoe-wan",
        "proto": "dhcpv6",
        "device": "pppoe-wan",
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [

        ],
        "ipv6-address": [
                {
                        "address": "2003:e5:97ff:eb2:583b:122e:d018:7840",
                        "mask": 64,
                        "preferred": 1486,
                        "valid": 14086
                }
        ],
        "ipv6-prefix": [
                {
                        "address": "2003:e5:970e:a700::",
                        "mask": 56,
                        "preferred": 1434,
                        "valid": 14034,
                        "class": "wan6",
                        "assigned": {
                                "lan0": {
                                        "address": "2003:e5:970e:a700::",
                                        "mask": 64
                                },
                                "lan10": {
                                        "address": "2003:e5:970e:a701::",
                                        "mask": 64
                                }
                        }
                }
        ],
        "ipv6-prefix-assignment": [

        ],
        "route": [
                {
                        "target": "::",
                        "mask": 0,
                        "nexthop": "fe80::ee13:dbff:fe7b:c882",
                        "metric": 512,
                        "valid": 1486,
                        "source": "2003:e5:970e:a700::/56"
                },
                {
                        "target": "::",
                        "mask": 0,
                        "nexthop": "fe80::ee13:dbff:fe7b:c882",
                        "metric": 512,
                        "valid": 1486,
                        "source": "2003:e5:97ff:eb2:583b:122e:d018:7840/64"
                }
        ],
        "dns-server": [
                "2003:180:2:a000:0:1:0:53",
                "2003:180:2:b000:0:1:0:53"
        ],
        "dns-search": [

        ],
        "neighbors": [

        ],
        "inactive": {
                "ipv4-address": [

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ],
                "neighbors": [

                ]
        },
        "data": {
                "passthru": "0017.....053"
        }
}
1 Like

Downstream configuration for LAN interfaces

Okay, and which part of it is the important part in my situation. I should understand your thoughts. Why that link f.e.? What did you find in my responses? I should understand the mistake.

This means you have IPv6 PD with a /56 prefix.
Its /64 parts are delegated to the downstream interfaces lan0 and lan10.
You can customize this using the options ip6assign / ip6hint / ip6class in the network config.
Also fix the odhcpd settings:

uci -q delete dhcp.lan0.ndp
uci -q delete dhcp.lan0.ip6prefix
uci -q delete dhcp.lan10.ndp
uci -q delete dhcp.lan10.ip6prefix
uci commit dhcp
/etc/init.d/odhcpd restart

Thanks for your feedback. I changed to this

        "ipv6-prefix": [
                {
                        "address": "2003:e5:9711:8c00::",
                        "mask": 56,
                        "preferred": 1622,
                        "valid": 14222,
                        "class": "wan6",
                        "assigned": {
                                "lan0": {
                                        "address": "2003:e5:9711:8c00::",
                                        "mask": 56
                                }
                        }
                }
        ],

After it I done

uci commit network
uci -q delete dhcp.lan0.ndp
uci -q delete dhcp.lan0.ip6prefix
uci -q delete dhcp.lan10.ndp
uci -q delete dhcp.lan10.ip6prefix
uci commit dhcp
/etc/init.d/odhcpd restart
/etc/init.d/network restart

On my workstation I can't see another prefix then 128 after

ifdown enp5s0
ifup enp5s0
ip -6 a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 fdaa:abc8:799c::e34/128 scope global 
       valid_lft forever preferred_lft forever
    inet6 2003:e5:9711:9b00::e34/128 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::213:3bff:fe10:773c/64 scope link 
       valid_lft forever preferred_lft forever

odhcpd should issue both /128 and /64 with DHCPv6 and RA respectively for each delegated prefix.
RA relies on the ICMPv6, so there is a high likelihood of a firewall-related problem in your case.

The argument that it was a firewall problem is a joke, I think.
Replacing the /56 prefix with /64 on the router and on the client instead of
iface enp5s0 inet6 dhcp
the entry
iface enp5s0 inet6 auto

In these circumstances the distribution of the correct prefixes to the clients works.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.