Delegated IPv6 Prefix not visible downstream

Hello Experts!

I am new to IPv6 and in general a consumer of OpenWrt project. I have a BTHH5A running OpenWrt 22.3.02. My ISP is Sky on vdsl supplying me ipv6 with /56 mask. I am using Sky's router sr-203 downstream to enable sky's voip. I created a separate voipif interface for sr-203. An ethernet cable runs between lan4 of BTHH5A and lan/wan port of sr-203. With this setup sr-203 is connected to internet. I can join sr-203's wifi and further browse ipv4 internet over that ( double natted ? ) connection.

The above setup is functionally similar to the one described in this thread : https://forum.openwrt.org/t/ipv6-sub-delegating-a-delegated-prefix/

Coming to ipv6, the BTHH5A's lan (/60) and voipif (/63) both interfaces receive the delegated prefix from wan6 (/56). However, the voip's prefix is not transferred to sr-203 downstream. The global routing address for sr-203 is blank.

Here are the details :


:~# ifstatus wan6
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 10641,
        "l3_device": "dsl0.101",
        "proto": "dhcpv6",
        "device": "dsl0.101",
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [

        ],
        "ipv6-address": [

        ],
        "ipv6-prefix": [
                {
                        "address": "2a02:c7e:3847:1f00::",
                        "mask": 56,
                        "preferred": 1966,
                        "valid": 1966,
                        "class": "wan6",
                        "assigned": {
                                "lan": {
                                        "address": "2a02:c7e:3847:1f00::",
                                        "mask": 60
                                },
                                "VOIPIF": {
                                        "address": "2a02:c7e:3847:1f10::",
                                        "mask": 63
                                }
                        }
                }
        ],
        "ipv6-prefix-assignment": [

        ],
        "route": [
                {
                        "target": "::",
                        "mask": 0,
                        "nexthop": "fe80::e681:84ff:febe:ab34",
                        "metric": 512,
                        "valid": 4482,
                        "source": "2a02:c7e:3847:1f00::/56"
                }
        ],
        "dns-server": [

        ],
        "dns-search": [

        ],
        "neighbors": [

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

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ],
                "neighbors": [

                ]
        },
        "data": {

        }
}

:~# ifstatus VOIPIF
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 9057,
        "l3_device": "lan4",
        "proto": "static",
        "device": "lan4",
        "updated": [
                "addresses"
        ],
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [
                {
                        "address": "192.168.8.1",
                        "mask": 29
                }
        ],
        "ipv6-address": [

        ],
        "ipv6-prefix": [

        ],
        "ipv6-prefix-assignment": [
                {
                        "address": "2a02:c7e:3847:1f10::",
                        "mask": 63,
                        "preferred": 1909,
                        "valid": 1909,
                        "local-address": {
                                "address": "2a02:c7e:3847:1f10::1",
                                "mask": 63
                        }
                },
                {
                        "address": "fdbb:473b:26a6:20::",
                        "mask": 63,
                        "local-address": {
                                "address": "fdbb:473b:26a6:20::1",
                                "mask": 63
                        }
                }
        ],
        "route": [

        ],
        "dns-server": [

        ],
        "dns-search": [

        ],
        "neighbors": [

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

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ],
                "neighbors": [

                ]
        },
        "data": {

        }
}


:~# cat /etc/config/network
config interface 'VOIPIF'
        option proto 'static'
        option ipaddr '192.168.8.1'
        option netmask '255.255.255.248'
        option device 'lan4'
        option ip6assign '63'

config interface 'wan'
        option device 'dsl0.101'
        option proto 'dhcp'
        option norelease '1'
        option reqopts '43'
        option peerdns '0'
        option delegate '0'
        option hostname '*'
        option clientid '736f6d6574649a0e6740736b7d29736c7c6164af7468696e67' # 

config device 'wan_dsl0_dev'
        option name 'dsl0'
        option macaddr '12:34:56:78:90:ab'

config interface 'wan6'
        option proto 'dhcpv6'
        option reqprefix 'auto'
        option peerdns '0'
        option norelease '1'
        option reqaddress 'try'
        option device '@wan'


:~# cat /etc/config/dhcp
config tag 'SkyBB'
        list dhcp_option '43,53:6b:79:42:42:2d:44:48:43:50'

config host
        option name 'Sky-Router'
        option dns '1'
        option mac 'ab:cd:ef:01:ee:6b'
        option tag 'SkyBB'

config dhcp 'VOIPIF'
        option interface 'VOIPIF'
        option leasetime '12h'
        option start '2'
        option limit '6'
        list dhcp_option '43,53:6b:79:42:42:2d:44:48:43:50'
        option ra 'server'
        option dhcpv6 'server'

config dhcp 'lan'
        option interface 'lan'
        option start '2'
        option limit '253'
        option leasetime '12h'
        option dhcpv6 'server'
        option ra 'server'
        option ra_management '1'

The sr-203 router address assignments :

Moreover, the address 2a02:c7e:3847:1f10::1 and 2a02:c7e:3847:1f00::1 are not globally reachable. The error I get is 'no default route'. How do reach them ? How do I delegate the ipv6 prefixes further downstream ? Could you please point out what I am missing ?

Thank you !
-Gamma

First off, the above addresses are responding to pings just fine, so that's encouraging. Of course the delegated router should most likely end up living at 2a02:c7e:3847:1f11::1

odhcpd is the beast responsible for delegating prefixes, so I'd start by checking it's running and not logging any nasty messages - logread would tell you.

Beyond that, I'm as confused as you!

Oh yes, they are reachable. My mobile data link is not recognising ipv6! Thank you for the correction.

Now I need to propagate the dp to sr-203’s lan.

-Gamma

What are your DHCPv6 settings?

When I had a separate interface for my sky box these are the interface settings I used (tweaked for your address range)

config interface 'VOIPIF'
        option proto 'static'
        option device 'lan4'
        option ipaddr '192.168.8.1'
        option netmask '255.255.255.248'
        list ip6class 'wan6'
        option ip6assign '63'
        option ip6hint '10'
        option ip6ifaceid '::'

The ip6class setting removes ULA being delegated to the delegating interface... I'm wondering if receiving ULAs from upstream confuses the sky router?

Might it be possible to plug a laptop into lan4 and see if it is able to obtain IPv4 & v6 addresses? Might be easier to run wireshark to see what's going on.

Hi @ldir !

It's working now. I just put the userclass and rebooted both BTHH5A. and sr-203. Then the voip LED showed green. Made a few calls both ways.

Yesterday I had removed the userclass option because it made sr-203's ipv4 and ipv6 both addresses blank. The status was disconnected too.

The only difference between yesterday and today's setup is making policy based routing ( PBR ) ipv6-enabled. It took numerous tries though. Seemingly sometimes after I enabled wan6, the pbr declared itself a failed task. It said no gateway found on all my outgoing interfaces ( vpn1, vpn2 and wan ). Restarting PBR did not make things any better. So I enabled ipv6 on PBR and restarted the service. Still no luck. So as a last resort I enabled ipv6, then disabled PBR as a whole. Then rebooted and enabled PBR. This worked and I got a stable PBR.

With userclass option added, the voipif interface setup worked as expected.

I really appreciate your inputs and insights ! :slight_smile: Thank you !

-Gamma

Hello @lleachii ,

The setup is working now.

Just a question for you. My dhcpv6 settings are in /etc/config/dhcp . Apart from that is there any other place I should be looking for?

Thank you !

-Gamma

The solution is :

  1. Enable ipv6 support in PBR.
  2. Disable PBR as a whole.
  3. Reboot the BTHH5A. Also reboot the sr-203.

-Gamma