IPv6 static routes not created at boot time

Hi folk,

I've got this configuration in /etc/config/network:

config route6
        option target 'XXXX:YYYYY:ZZZZ:c::/64'
        option interface 'lan'
        option gateway 'XXXX:YYYY:ZZZZ:1::26'

config route
        option gateway '192.168.1.26'
        option interface 'lan'
        option target '172.18.0.0'
        option netmask '255.255.0.0'

Which I use to tell the router how to reach those networks that are behind a downstream router.

However what I'm seeing is that whereas the IPv4 route is created at boot time, the IPv6 is not present in the routing table. To get it added I have to manually modify the static routes using Luci and modify something in the route so the system is forced to (re)create it.

There's nothing suspicous in /var/log/messages. Do you have any ideas on how I could debug this further?

Thanks

Could it be a race condition between the router receiving from the ISP the prefix delegation information via DHCPv6 and the creation of the route itself? The interface that allows reaching XXXX:YYYY:ZZZZ:1::26/64 is only configured in that network as XXXX:YYYY:ZZZZ:1::1/64 once the prefix (XXXX:YYYY:ZZZZ::/48) is received from the ISP.

Add the route via your ULA-prefix which does not depend on the WAN6 state or use hotplug to add the route and/or reload network when WAN6 is ready.

2 Likes

Hi,

Thanks for your input, that's a good point! Would using the link-local addr of the gateway instead of the ULA a good practice? It works but perhaps there's some drawbacks I can't think of. I don't use ULA addresses in my network so if I could stick to the link-local it'd be great.

1 Like

As long as the mac address doesn't change the link local will remain the same.

2 Likes

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