in addition to IPv4 (dual stack), my ISP supplies me with a /56 IPv6 prefix over PPPoE. That works without issues with the default setup, having
option ipv6 'auto'
in the WAN interfaces setup in /etc/config/network. A wan_6 interface is spawned, /56 prefix assigned and delegated to lan and everything is beautiful out-of-the-box.
But I would like to learn and use the manually configured wan6 interface instead. So I set
option ipv6 '1'
expecting everything to work out of the box with this wan6 configuration:
config interface 'wan6'
option device 'wan'
option proto 'dhcpv6'
Instead, wan only receives a link-local IPv6 address and there's no public prefix assigned to wan or wan6.
Of course I know and that's what I did for now. But I would still like to understand why the manual setup does not work. Unfortunately, @wan does not change the behavior.
/*
Site note: I'm using auto on the wan interface... But as far as I see as long as you set reqprefix it should be sufficent, because link-local address is generate by default on the wan interface...
On a DSA router, option device 'wan' is the physical Ethernet port-- not the pppoe tunnel. The DHCP request must be sent inside the tunnel not raw to the Ethernet port. I think that option device '@wan' as already suggested would fix this.
If it still does not work, run tcpdumps on the pppoe-wan interface to see if DHCPv6 is being sent and received.
Omg, you're right, option @wan fixed it - in a way. I must have forgot to network restart when I replied earlier...
IPv6 is looking good now, but IPv4 is sketchy: After rebooting the router, the interfaces look perfect. wan6 looks just like wan_6 when using ipv6 = auto before. But pinging any internet IPv4 doesn't work for about 5 minutes and then just magically starts working (no syslog entries, no re-established connection etc.)
This happens on the router itself and also on LAN devices. Would could be the culprit of that?