IPv6 Relay Issue: Inconsistent Renewal on Android Devices

Hi,

In the past few weeks, I've tried everything, but without success.

I'm using IPv6 relay mode, and on some devices, the router successfully renews the IPv6, but on others, I lose the IPv6 connection. The only way to regain it is by disconnecting and reconnecting the device.

How can I resolve this?

PS: We only use Android devices at home.


Does the status on the Android device show that it has no IPv6 address?

There was a problem if you try to run purely IPv6, purely RA, the relay mode did not insert an RA-DNS option into the RA to advertise a DNS server to clients. I don't know if that is still the case. Packet captures on the router would be able to see that.

On the device, it still shows the IPv6 addresses.However, when I do the IPv6 test the result is an error, it does not detect IPv6. It only detects again if I reconnect the device

Can someone help me?

Have you ever tried restarting the WAN6 or LAN interfaces?

What are your network and DHCP settings?

cat /etc/config/network
cat /etc/config/dhcp

Restarting the WAN6 interface nothing happens. Restarting the LAN interface makes everyone disconnect and IPv6 works normally, however, after some time, it does not validate

DHCP

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option cachesize '1000'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option ednspacket_max '1232'
        option filter_aaaa '0'
        option filter_a '0'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        list dhcp_option '6,10.10.10.1'
        option ra 'relay'
        option dhcpv6 'relay'
        option ndp 'relay'

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 dhcp 'wan6'
        option interface 'wan6'
        option ignore '1'
        option master '1'
        option ra 'relay'
        option dhcpv6 'relay'
        option ndp 'relay'

config dhcp 'mgmt'
        option interface 'mgmt'
        option start '100'
        option limit '150'
        option leasetime '12h'
        list dhcp_option '6,1.1.1.1,8.8.8.8'

config dhcp 'guest'
        option interface 'guest'
        option start '100'
        option limit '150'
        option leasetime '12h'
        list dhcp_option '6,8.8.8.8,1.1.1.1'
        option ra 'relay'
        option dhcpv6 'relay'
        option ndp 'relay'

NETWORK

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd86:86ed:0e82::/48'
        option packet_steering '1'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'

config bridge-vlan
        option device 'br-lan'
        option vlan '10'

config bridge-vlan
        option device 'br-lan'
        option vlan '20'
        list ports 'lan4'

config bridge-vlan
        option device 'br-lan'
        option vlan '30'

config interface 'lan'
        option device 'br-lan.10'
        option proto 'static'
        option ipaddr '10.10.10.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option metric '20'

config interface 'wan'
        option device 'wan'
        option proto 'dhcp'
        option peerdns '0'
        list dns '1.1.1.1'
        list dns '8.8.8.8'

config interface 'wan6'
        option device '@wan'
        option proto 'dhcpv6'
        option reqaddress 'try'
        option reqprefix 'auto'
        option peerdns '0'
        list dns '2606:4700:4700::1111'
        list dns '2001:4860:4860::8888'

config interface 'mgmt'
        option proto 'static'
        option device 'br-lan.20'
        option ipaddr '10.20.20.1'
        option netmask '255.255.255.0'

config interface 'guest'
        option proto 'static'
        option device 'br-lan.30'
        option ipaddr '172.172.172.1'
        option netmask '255.255.255.0'
        option ip6assign '64'
        list ip6class 'local'

Yes, that's expected, - we're testing.

What does this mean?

After some time, IPv6 remains on the device, however, IPv6 tests do not detect the addresses

  • How many devices are having this issue?
  • What version of Android are they running?
  • Do you have any other OS to test?
  1. 2 devices
  2. Android 12 and Android 13
  3. No

Try that in your dhcp file

config dhcp 'lan'
        # ...
        option start '100'
        option limit '150'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'
        option preferred_lifetime '5m'
        option ra_useleasetime '1'

Observe the phone's IPv6s on the About phone-Status screen. Log into the router and attempt to ping those IPs (Android does answer pings). Each of the phone's GUAs should also have a /128 route in the router's v6 routing table, which is how relay mode works.

Generally you're going to have two GUAs on the phone, one is MAC based which does not change and one is random which the phone will rotate on its own schedule.

2804:83c4:8019:3840:423e:dbdf:1db0:60da

PING 2804:83c4:8019:3840:423e:dbdf:1db0:60da (2804:83c4:8019:3840:423e:dbdf:1db0:60da): 56 data bytes

--- 2804:83c4:8019:3840:423e:dbdf:1db0:60da ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss

2804:83c4:8019:3840:6096:de23:baff:4fe2

PING 2804:83c4:8019:3840:6096:de23:baff:4fe2 (2804:83c4:8019:3840:6096:de23:baff:4fe2): 56 data bytes

--- 2804:83c4:8019:3840:6096:de23:baff:4fe2 ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss

fe80::7e86:a124:1d21:bd2%wlan0

PING fe80::7e86:a124:1d21:bd2%wlan0 (fe80::7e86:a124:1d21:bd2%15): 56 data bytes

--- fe80::7e86:a124:1d21:bd2%wlan0 ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss

fe80::b04a:77ff:fe3d:8bad%dummy0

ping6: bad address 'fe80::b04a:77ff:fe3d:8bad%dummy0'

PS: I haven't reconnected the device to the network yet. It continues to receive IPv6 addresses, however, it does not ping

Any? Please

Addresses and routes appear to be properly in place (did you check the routes?), but pings do not go through. At that point start to suspect a physical layer problem such as the wifi driver. What model router and chipset do you have? If it's dual band have you tried connecting the Android devices to the other band?

To ping link-locals use the kernel name of the bridge (br-lan) not the name of the interface that is in the bridge.

I think this is a bug in my device's ROM

I don't know if it's the same case than yours, but me and others have suffered this, ONLY for wifi devices, on IPQ807 routers. It seems a bug in the wifi driver/blob.

What router do you have?

DIR-878 A1 (mt76)

With me it's only on wi-fi, I use a POCO/Xiaomi for games, but it really seems to be the ROM

Try /etc/config/dhcp:

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

(...)
config dhcp 'wan6'
        option interface 'wan6'
        option master '1'
        option dhcpv6 'relay'
        option ra 'relay'
        option ndp 'relay'

Then reboot router. If the ip address would be on the router, but not on the other connected device, try to restart just "network" service and then reconnect device.

Hey! I think I have the same problem, every couple of days my android devices lose ipv6 connectivity. I have a IPQ807 device (AX3600) as @McGiverGim saidin dumb AP mode to my main x64 router, both running openwrt. Is that a know problem?