IPv6 works on WAN6 but not LAN

I have two routers on my network. The first router uses SLAAC and is connected to the internet where my ISP provides a /56 IPv6 subnet. The second router is running OpenWRT (latest stable).

The WAN6 interface on the second router seems to be working as it gets a good IPv6 address and ping6 google.com (from the router) works. But the LAN interface is getting an address that starts with f and the clients connected to it have no IPv6 internet connectivity.

The firewall rules allow DHCPv6 to/from WAN.

The WAN6 interface settings:

  • Protocol: DHCPv6 client
  • Request IPv6-address: try
  • Request IPv6-prefix of length: 64

The LAN interface settings:

  • IPv6 assignment length: 64
  • IPv6 assignment hint:
  • IPv6 suffix:
  • DHCP Server:
    • Router Advertisement-Service: server mode
    • DHCPv6-Service: server mode
    • NDP-Proxy: disabled
    • DHCPv6-Mode: stateless + stateful

I've tried setting various combinations of options for the LAN interface DHCP server but I'm unable to get a working IPv6 connection. What am I missing?

Check if it's possible to enable a DHCPv6-PD server on the first router otherwise try relaying in openwrt instead: https://openwrt.org/docs/guide-user/network/ipv6/start?s[]=ipv6&s[]=relay#router_advertisement_dhcpv6

DHCPv6-PD is enabled on the first router.

cat /etc/config/dhcp shows this:

config dhcp 'lan'
        option interface 'lan'
        option ignore '1'
        option ra 'server'
        option dhcpv6 'server'
        option ra_management '1'

Trying relaying also isn't working.

cat /etc/config/dhcp shows this:

config dhcp 'lan'
        option interface 'lan'
        option ignore '1'
        option ra 'relay'
        option dhcpv6 'relay'
        option ndp 'relay'

If you are sure that your ISP provides a 56 subnet, I would try on the WAN6 interface a different setting. I use in "Request IPv6-prefix of length" automatic and this works fine. If not, then try e.g. 62. 64 is not enough for a IPv6-PD prefix delegation as far as I know. With a setup like this, I can then use on the LAN and my separate WIFI interface own 64 subnets.

Sometimes I had to restart the interfaces WAN6 and LAN to get the IPv6-PD working and it can take 30 seconds.

I'm sure that my ISP does provide a /56. I tried a "Request IPv6-prefix of length" of automatic, restarted the WAN6 and LAN interfaces, and waited 30 seconds but it didn't work.

Also tried 62, restarting interfaces, and waiting 30 seconds but the result was the same.

Sadly IPv6-PD is not as easy as it should be!!! The cable router that I received from Vodafone was not capable of doing IPv6-PD even though it got a 56 suffix! I do have now a own Fritz!Box 6591 as a cable router, it didn't activate IPv6-PD delegation by default, but after doing the setup it works now.

If your second router doesn't get the IPv6-PD address on WAN6, then I assume your first router might have an issue.

I think WAN6 is getting the IPv6-PD address but I may not be understanding correctly.

The first router is configured with several VLANs and it assigns them each a prefix-id. For example prefix-id 10 for VLAN 10, prefix-id 20 for VLAN 20, etc. The OpenWrt router is connected to one of these VLANs and I can see that the IPv6 address that it gets on the WAN6 interface has the correct prefix-id in it so I'm assuming DHCPv6-PD and SLAAC are working but that may not be a valid test of that.

By the way, all hosts that are connected to the first router work with IPv6. It's just the LAN interface on the OpenWrt router that doesn't seem to be working.

Well, my WAN6 interface shows the following information on the second router (some characters are replaced with x):
Protocol: DHCPv6 client
Uptime: 1h 26m 39s
MAC: 30:23:xx:xx:xx:xx
RX: 340.74 MB (307783 Pkts.)
TX: 19.01 MB (126069 Pkts.)
IPv6: 2a02:8070:xxx:xxxx:xxxx:xxxx:xxxx:xxxx/128
IPv6-PD: 2a02:8070:xxxx:xxxx::/62

If you just get one line with IPv6, then this is not enough for prefix delegation.

OK interesting, yes mine only shows one line for IPv6, the IPv6-PD is missing. I'm guessing that IPv6-PD line will just appear on its own once DHCPv6-PD is correctly setup on the other router.

I'm not an expert, but in my experience you need the IPv6-PD address to get a correctly functioning IPv6 LAN interface, it looks like this:
Protocol: Static address
Uptime: 22h 35m 20s
MAC: xx:xx:xx:xx:xx:xx
RX: 32.26 GB (14283107 Pkts.)
TX: 2.07 GB (15649279 Pkts.)
IPv4: 192.168.1.1/24
IPv6: 2a02:8070:xxxx:xxxx::1/64
IPv6: fdea:xxx:xxxx::1/64

I can't tell you how the relay mode would work with IPv6.

Yes, the IPv6-PD line appears only as soon as the first and second router is correctly configured. This could be more user friendly in OpenWrt though.

Thanks, this is very helpful. I'll work on fiddling with the first router.

This indicates that the first router is assigning a /64 prefix to each VLAN interface.

To make DHCP-PD work, a larger subnet (shorter prefix, e.g. /60) must be assigned to the interface where the second router is connected. As @rainer said, not all routers allow such a configuration.