IPv6 Relay Observations

I finally got IPv6 relay to work on my GL.iNet B1300 and I wanted to pass on what finally made things come together for me. I'm using OpenWrt 23.05.3.

First, a little background. I have been running the B1300 as my sole home router for three years now. My ISP delivers an IPv6 prefix, so all my network devices have been getting an IPv6 address with the default OpenWRT settings.

As a backup in case my ISP goes down, I also set up USB tethering for my iPhone. I only set up a DHCP interface for tethering and I rarely used it — it was just nice to know it was there if I needed it. My provider is T-Mobile.

I decided I wanted to activate IPv6 device connections through my tethering connection, so I set up a new interface, 'tethering6', for DHCPv6. The original interface, 'tethering', is active as well for DHCP.

When I started a tethering connection, the 'tethering6' interface was getting an IPv6 address from T-Mobile, but my devices were only getting an IPv4 address. Running 'ifstatus tethering6' from a terminal session confirmed that T-Mobile was not giving me an IPv6 prefix.

After much research, I decided to turn on IPv6 relay for the 'tethering6' and 'lan' interfaces. Here are the DHCP settings I used:

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv4 'server'
	option dhcpv6 'relay'
	option ra 'relay'
	option ndp 'relay'

config dhcp 'tethering6'
	option interface 'tethering6'
	option master '1'
	option ra 'relay'
	option dhcpv6 'relay'
	option ndp 'relay'

Everything I had read made me think this was the answer, but it only worked sporadically at best, with my devices receiving an IPv6 address about half the time and sometimes not at all. I was ready to blame it all on T-Mobile, but as a last ditch try, I changed the 'lan' settings to 'hybrid' for RA, DHCPV6, and NDP. Here are the new settings:

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv4 'server'
	option ra 'hybrid'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'
	option dhcpv6 'hybrid'
	option ndp 'hybrid'

config dhcp 'tethering6'
	option interface 'tethering6'
	option master '1'
	option ra 'relay'
	option dhcpv6 'relay'
	option ndp 'relay'

That was it! Tethering IPv6 works perfectly now and my devices are all getting global IPv6 addresses. The 'tethering6' settings are unchanged.
The thing that has me scratching my head is that the dropdown in the lan IPv6 Setting LuCI screen has this description for hybrid mode:

Operate in relay mode if a designated master interface is configured and active, otherwise fall back to server mode.

My 'tethering6' was the active designated master in both scenarios, so it seems like hybrid mode relay is doing something different (and better) than relay mode relay.

Even though everything is working now, I wonder what is going on.

1 Like