Hello,
I don't get what androids problem is. Windows and Linux Clients can use IPv6 just fine on my network, android simply refuses after 10 seconds beeing connected to my wifi to use IPv6 again. I looked with tcpdump and the device does not even attempt to make AAAA lookups. Pinging a IPv6 address from that device works just fine. What do I need to do to my OpenWRT so Android is happy and uses IPv6?
/etc/config/network
config interface 'lan'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.1.1'
option ip6weight '5'
option ip6assign '63'
option device 'br-lan'
list ip6class 'local'
list ip6class 'wan6'
/etc/config/dhcp
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option dhcpv4 'server'
option force '1'
option ra_management '1'
option leasetime '12h'
option ra 'server'
list ra_flags 'managed-config'
list ra_flags 'other-config'
option dhcpv6 'server'
Maybe try searching this forum. I roughly remember we had something ~2-3 months ago, which was very similar from topic. I cant seem to remember/find what it was.
You can remove both RA flags. Specifically, "Managed" is not a functionally compatible config with Android - which only uses SLAAC. "Other" should be OK, which means additional configs are available via DHCPv6.
I can not confirm if a gua nameserver address is needed or not. I got gua and ULA addresses via slaac on my Android but have set a nameserver with ULA address in /etc/config/DHCP explicit. (I have multiple Vlans but all get served by one nameserver service address. The only difference I can think of is that I don't use odhcpd but dnsmasq-full for DHCP, DHCPv6 and RA.)
I set dhcp_option 'option6: dns-server, [fd.....]'
I don't know how and why but this address shows up in the rdnss RA option. Verified with radvdump on linux
Thank you very much for showing me radvdump. I only get outputs there if I do changes on the network, like changing under IPv6 RA Settings the Default Router between automatic and forced. I would have expected to see a output immediately and then atleast ones per Max RA interval but maybe I don't understand well enough RA to get what to expect right.
Do you get directly a output if you start radvdump and then in a interval again?
Edit: I think I did understand wrong how it works, you get in a interval radvd and not if you ask for it it seems.
That is what I currently get
radvdump
#
# radvd configuration generated by radvdump 2.18
# based on Router Advertisement from fe80::f415:7aff:fe44:e7ef
# received by interface eth0
#
interface eth0
{
AdvSendAdvert on;
# Note: {Min,Max}RtrAdvInterval cannot be obtained with radvdump
AdvManagedFlag on;
AdvOtherConfigFlag on;
AdvReachableTime 0;
AdvRetransTimer 0;
AdvCurHopLimit 64;
AdvDefaultLifetime 1800;
AdvHomeAgentFlag off;
AdvDefaultPreference medium;
AdvSourceLLAddress on;
AdvLinkMTU 1500;
AdvIntervalOpt on;
prefix 2a02:xxx::/64
{
AdvValidLifetime 83788;
AdvPreferredLifetime 40588;
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr off;
}; # End of prefix definition
prefix fd00:13:37::/64
{
AdvValidLifetime infinity; # (0xffffffff)
AdvPreferredLifetime infinity; # (0xffffffff)
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr off;
}; # End of prefix definition
RDNSS fd00:13:37::1
{
AdvRDNSSLifetime 1800;
}; # End of RDNSS definition
}; # End of interface definition
Does this look like your working config _bernd?
I can do DNS lookups via fd00:13:37::1 so that shouldn't be the problem but I don't know yet what else is.
Removing the flags
and also explain here why.
Both are may be valid points but I would like to understand why they would matter.
Thank you
@_bernd thank you for your output, but I don't see any difference. Maybe the problem is that my wifi filters RA but then I would have thought my android clients would have no IPv6 connectivity at all instead of online failing to resolve AAAA records.
Are you maybe aware of a alternative to radvdump on android because it doesn't seem like radvdump does exists for termux?
Are you running on mvebu platform like WRT32X etc? Those seem to trash Ipv6 when I was running them. Switched like 4-5 years ago and everything just works.
as you can see on the radvdump output it uses a /64 via slaac but since I want to allocate from time to time to a router downstream via dhcpv6-pd also a /64 I need the /63 in the config.
I've recently fixed the Android IPv6 problem in my network and the issue for me was that the preferred lifetime was greater than the valid life time.
The valid life time has to be always equal or greater than the preferred life time, and although the router was announcing bad values, other clients were accepting it.
In your case, the valid life time is greater, but in my tests I've seen that Android rejects the prefix if the two life times are not equal.
Can you try to make both values equal? this is my setup for reference:
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option dhcpv4 'server'
list dhcp_option '6,192.168.10.1'
list ra_flags 'managed-config'
list ra_flags 'other-config'
option dhcpv6 'server'
option ra 'server'
option ra_useleasetime '1'
option leasetime '10m'
option preferred_lifetime '10m'
Thank you, sadly did not resolve my problem, my One Plus 8 still refuses to use ipv6 with my network. I'm starting to believe that the problem is maybe not my wifi but my phone. Sadly I don't have any other android device to test with, the linux and windows clients don't have any problem on that network even if I turn DHCPv6 off and do SLAAC only.