Preface: I'm very new to ipv6. Assume i know nothing.
For management reasons, i'd like to run a dual stack LAN network, where I have full control over the IPv6 suffixes that are being handed out (i.e. DHCPv6, operating as DHCPv4 normally does).
To achieve this, i've set option ra_management '2', works great.
The unexpected (at least to me) side effect of this, is that the WAN (eth0.2) interface no longer receives an IPv6 address for itself (i.e. xxx/128).
Is there a way of operating in stateful mode, where WAN still receives a /128 via dhcpv6?
odhcpd (daemon for serving and relaying) is handling the downstream part (with the router clients) and its settings are unrelated of how the WAN port gets its ip from upstream (ISP)
which is handled by odhcp6c -> DHCPv6-client
Would imply that at some point prior it worked, e.g. with option ra_management '1'?
Agree with everything you've said, hence my surprise!
Yes with ra_management '1' WAN receives the /128, however I'm no longer in stateful mode (obviously).
This behaviour is 100% reproducible by just toggling ra_management in my system.
That is strange and curious indeed, maybe a bug in netifd (network manager).
Did you try snapshots from the 19.07 a/o Master branches, assuming the node is currently on 18.06.x? Some codes developments are not riding the trains (backported) and thus snapshots from more contemporary branches may sort the matter.
Noticed that WAN has DHCP set for both ipv4 and ipv6 - is the router connected directly to the ISP subscriber line or being downstream of some (ISP provided) device (modem/router) and/or switch device?
It's downstream of a modem which is set to "bridge mode"
The modem is still handling PPPoE, so it's more like half bridge... but DHCP is the required setting on WAN to make it all work.
This via LuCI? Did you try to change the ra_management via ssh and then restart odhcpd?
Got a different ISP subscriber line (VDSL2 with PPPoE, ds-lite, no 802.1q tagging) and having set ra_management '2' the WAN port gets its /128 ipv6 from the ISP, that is with:
Master
netifd 2019-11-20-e45b1408-2.1
odhcp6c 2019-01-11-e199804b-16.2
odhcpd 2019-12-15-d60f0a62-3.1
Else out of wits, hopefully someone else can help to sort it.
Well, that says what you want to give both DHCP and slaac addresses (ra) on LAN.
If you want only dhcpv6 in LAN, remove ra or set it disabled. That might achieve what you want, even with ra_management 1.
Aren't you mixing things? Your ISP controls the upstream IPv6 address given to your router in wan.
This stops clients getting globally addressable IPs in the quick test i just ran. I still want these.
While i'm not entirely convinced... rebooting the modem and then the router in order made everything behave as you'd expect.
Must just have been some kind of sticky assignment (or lack thereof).