Android IPV6 not working - missing gateway

Started by brot1337, September 25, 2024, 12:27:16 AM

Previous topic - Next topic
Hey guys,

I can't get IPv6 running on all my android devices. Ive tried almost every Router Advertisement mode. Unmanaged/Managed/Assisted/Stateless. Other devices are working flawlessly.

The android devices are getting an IP address via SLAAC but no route/gateway. When I check the connection via whatismyip.com I get "My Public IPv6: Not Detected"

Any idea how to fix this?

I'm running the latest opnsense version.

Does your firewall interface on the LAN/WiFi subnet have a static IPv6 in the delegated range from your ISP with a netmask of /64?

Check with radvdump on the firewall shell (option 8 on the console or SSH) if your broadcasts look okay.

Yes, the interface does have own IPv6 IP in the delegated. All other devices are working as expected, only my android devices can't establish an IPv6 connection.

This is the radvdump output. Seems ok for me.

@opnsense:~ # radvdump
#
# radvd configuration generated by radvdump 2.19
# based on Router Advertisement from fe80::aab8:e0ff:fe03:f340
# received by interface igc1
#

interface igc1 (LAN)
{
AdvSendAdvert on;
# Note: {Min,Max}RtrAdvInterval cannot be obtained with radvdump
AdvManagedFlag off;
AdvOtherConfigFlag off;
AdvReachableTime 0;
AdvRetransTimer 0;
AdvCurHopLimit 64;
AdvDefaultLifetime 1800;
AdvHomeAgentFlag off;
AdvDefaultPreference medium;
AdvLinkMTU 1500;
AdvSourceLLAddress on;

prefix 2a00:XXXX:XXXX:6700::/64
{
AdvValidLifetime 86400;
AdvPreferredLifetime 14400;
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr off;
}; # End of prefix definition


RDNSS 2a00:XXX:XXXX:6700:XXXX:e0ff:fe03:XXXX
{
AdvRDNSSLifetime 600;
}; # End of RDNSS definition


DNSSL localdomain
{
AdvDNSSLLifetime 600;
}; # End of DNSSL definition

}; # End of interface definition
G#
# radvd configuration generated by radvdump 2.19
# based on Router Advertisement from fe80::ff:fe02:201
# received by interface igc0
#

interface igc0 (WAN)
{
AdvSendAdvert on;
# Note: {Min,Max}RtrAdvInterval cannot be obtained with radvdump
AdvManagedFlag on;
AdvOtherConfigFlag off;
AdvReachableTime 0;
AdvRetransTimer 0;
AdvCurHopLimit 64;
AdvDefaultLifetime 1800;
AdvHomeAgentFlag off;
AdvDefaultPreference medium;
AdvSourceLLAddress on;
AdvLinkMTU 1500;
}; # End of interface definition

How are you observing "no gateway" on the Android device? My Android 14 phone shows IPv6 addresses when I view the currently-connected WiFi network, but it does not show IPv6 Gateways, yet IPv6 is working. You may have something else going on....

I can see multiple IPV6 addresses in the wifi settings (dns,link-local and two addresses within the delegated ipv6-subnet)

When I check the routing via "ip route get" on my android device, I get an: "Network is unrechable" error.

'ip route get' on link-local addresses is working.

ip -6 route show table wlan0 shows:

2a00:XXX:XXX:6700::/64 dev wlan0 proto kernel metric 256 expires 86293sec pref medium
2a00:XXX:XXX:6700::/64 dev wlan0 proto static metric 1024 pref medium
fe80::/64 dev wlan0 proto kernel metric 256 pref medium

The gateway is the source address of the router advertisement, so that's weird, because you obviously get an address, so you should also get the gateway.

AdvRouterAddr off;
might be the cause. Explicitly enable "advertise default gateway" and set it to the link local address of OPNsense in that particular LAN.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

"Advertise Default Gateway" is enabled in the GUI though.  :o

When I set the link-local-address/64 under "Advertise Routes" the RA daemon crashes.

No, sorry. You don't get to pick the router address in the UI unless you have multiple, e.g. in the case of CARP. So like in my screen shot should "just work". Android does not support DHCP6, only SLAAC - again, should be all fine with these minimal settings.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

FWIW, I see "AdvRouterAddr off;" too, but my Android (14) phone is working.

Google says Android has a long history of not supporting IPv6 well. Are we dealing with an older Android version here, perhaps?

Latest Android15 Beta (Pixel 7) a new Pixel 8 with Android 14 and an older Samsung Phone (Android 13 or something like that) Every device has the same issue. :-/