Wan_6 and/or wan6, what is each for

Hi all,

I recently flashed 25.12.2 to my NanoPi R5S, choosing not to keep settings as I wanted a fresh start.
I have configured some VLANs, some Proton VPNs and some routing tables
My ISP provides a static IPv4 address and a /56 IPv6 address, which is obtained via PPPoE through a xDSL modem attched to eth0

I notice that there is a wan_6 interface and a wan6 interface.

The wan interface has a device of pppoe-wan. It says it's protocol is 'PPPoE' and it has the IPv4 static address and a fe80:x/128 IPv6 address. It say Carrier: Present

The wan_6 interface has a device of pppoe-wan. It says it's protocol is 'Virtual dynamic interface (DHCPv6 client)' and it has the IPv6-PD address. It says Carrier: Absent

The wan6 interface has a device of eth0. It says it's protocol is 'DHCPv6 client). It says Carrier: Present

What is the explanation for this? Are both required? I did not set up (nor have I touched) either interface.
I am wanting to follow this guide, but I'm confused which interface I should use for what.

No the wan_6 is auto created if you have in the wan interface:

option ipv6 'auto'

See:

Instead of auto configuration consider using option ipv6 '1' and then setup an interface wan6 with @wan

config interface 'wan6'
	option device '@wan'
	option proto 'dhcpv6'
	option reqaddress 'try'	#optional
	option reqprefix '56'		#optional
	option norelease '1'		#optional
	option peerdns '0'		#optional
	list dns '2606:4700:4700::1111'	#optional

Note for PBR using wan6 instead of wan_6 might be necessary

But you do not need/want both!

3 Likes

Note that the auto-started wan_6 or a manually declared interface on device @wan sends IPv6 DHCP and subsequent v6 data inside the pppoe tunnel, which is almost always what you want. The default wan6 is ethX which is outside the tunnel. It will generally not work with a pppoe ISP and should be deleted.

2 Likes

OK, so by default OpenWrt has option ipv6 'auto' set on the wan interface?
Also, by default OpenWrt creates a wan6 interface on a spare ethernet device?

I didn't either set 'option ipv6 auto' or create a wan6 interface

EDIT: it just occured to me, is 'option ipv6 auto' added to wan when I configure it as pppoe, and this then configures wan_6 And wan6 was there originally when wan wasn't configure as pppoe?

So in other words, by default OpenWrt has wan and wan6 configured as DHCP(v6) Client on, lets say, eth0.
When I configured wan to be PPPoE, it added 'option ipv6 auto' and created wan_6.
This "orphaned" wan6, which remained as DHCPv6 Client?

1 Like