Stateful IPv6 - No WAN IP

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?


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

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'


config globals 'globals'
	option ula_prefix 'fd35:ae3f:8529::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth1.1'
	option proto 'static'
	option ipaddr ''
	option netmask ''
	option ip6ifaceid '::1'
	option ip6assign '60'
	option dns ''

config interface 'wan'
	option ifname 'eth0.2'
	option proto 'dhcp'
	option ipv6 '1'

config interface 'wan6'
	option ifname 'eth0.2'
	option proto '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.

Sorry should have included that detail.
Currently build is based on 19.07rc2 (+- a few commits)

I haven't tried master, I don't have a good mechanism for doing so either at the moment, but could if I had to.

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.

1 Like

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.

1 Like

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).

Thanks for taking the time to test! Looks like a wild goosechase after all... :blush:


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