IPv6 on Android not working

Hello,I have a x86_64 environment,my ISP has gave me a /60 prefix.

I configured dhcp options on LAN, IPv6 seems worked fine on Windows,but not working on Android.

the Android got 2 stateless address from LAN,but can't access global network until i pinged LAN 's global address

How can i fix it?

[root@OpenWrt] # ifstatus wan6
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 3655,
        "l3_device": "pppoe-wan",
        "proto": "dhcpv6",
        "device": "pppoe-wan",
        "updated": [
                "prefixes"
        ],
        "ip6table": 254,
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [

        ],
        "ipv6-address": [
                {
                        "address": "2408:8210:3b04:2f4f:62be:b4ec:4c03:bd98",
                        "mask": 64,
                        "preferred": 604745,
                        "valid": 2591945
                }
        ],
        "ipv6-prefix": [
                {
                        "address": "2408:8210:3046:ef0::",
                        "mask": 60,
                        "preferred": 3545,
                        "valid": 3545,
                        "class": "wan6",
                        "assigned": {
                                "lan": {
                                        "address": "2408:8210:3046:ef0::",
                                        "mask": 64
                                }
                        }
                }
        ],
        "ipv6-prefix-assignment": [

        ],
        "route": [
                {
                        "target": "::",
                        "mask": 0,
                        "nexthop": "fe80::d6c1:c8ff:fe95:92d1",
                        "metric": 512,
                        "valid": 1745,
                        "source": "2408:8210:3046:ef0::/60"
                },
                {
                        "target": "::",
                        "mask": 0,
                        "nexthop": "fe80::d6c1:c8ff:fe95:92d1",
                        "metric": 512,
                        "valid": 1745,
                        "source": "2408:8210:3b04:2f4f:62be:b4ec:4c03:bd98/64"
                }
        ],
        "dns-server": [
                "2408:8888::8",
                "2408:8899::8"
        ],
        "dns-search": [

        ],
        "neighbors": [

        ],
        "inactive": {
                "ipv4-address": [

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ],
                "neighbors": [

                ]
        },
        "data": {
                "passthru": "001700202408888800000000000000000000000824088899000000000000000000000008"
        }
}

IPv4: 192.168.199.1/24
IPv6: 2408:8210:3047:86f0::1/64
IPv6: fd00::1/64


config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
option force '1'
option preferred_lifetime '5m'
option ra_useleasetime '1'
list ra_flags 'managed-config'
list ra_flags 'other-config'
list dns 'fd00::1'
option ra_default '1'

Don't use ULAs you don't need them here. Most OS will never initiate a request to an Internet GUA sourced from its ULA, because that is not what ULAs are for. (No one is really sure what ULAs are for). A home router should only have GUAs and link-locals.

In the numbers you posted, the lan IP is not in any of the prefixes. Maybe this is just a mistake in posting an address checked at one time before a reconnect to the ISP changed it. The lan IP should be the ::1 in its /64 delegated out of the /60 received from the ISP.

Android does not support DHCPv6, only RA. With default settings, the RA packets should advertise the LAN interface's link-local as both the default route and the DNS server. Android in default configuration will use the LAN DNS only once to resolve dns.google, then start using secured DNS direct to there. But that first request has to work. Make sure that dnsmasq is able to resolve and respond with AAAA IPv6 addresses.

thank you for your help

I tried remove ULA and set default ra ipv6 dns on Openwrt and still same issue,also need to access {prefix}::1 manually to fix IPv6 not reachable

and unfortunately,I‘m in PRC, dns.google or another safe dns is not allowed(normally dns has been redirected and polluted),but I disabled "private dns" on Android,nothing seems changed

at the moment,I tried to use other hardware router or using Modem builtin dhcp server,that's have not this issue, it's this my fault? or any problem?

IPv4: 192.168.199.1/24
IPv6: 2408:8210:3047:86f0::1/64
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 9860,
        "l3_device": "pppoe-wan",
        "proto": "dhcpv6",
        "device": "pppoe-wan",
        "ip6table": 254,
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [

        ],
        "ipv6-address": [
                {
                        "address": "2408:8210:3b04:588b:62be:b41a:5103:bd98",
                        "mask": 64,
                        "preferred": 604540,
                        "valid": 2591740
                }
        ],
        "ipv6-prefix": [
                {
                        "address": "2408:8210:3047:86f0::",
                        "mask": 60,
                        "preferred": 2740,
                        "valid": 2740,
                        "class": "wan6",
                        "assigned": {
                                "lan": {
                                        "address": "2408:8210:3047:86f0::",
                                        "mask": 64
                                }
                        }
                }
        ],
        "ipv6-prefix-assignment": [

        ],
        "route": [
                {
                        "target": "::",
                        "mask": 0,
                        "nexthop": "fe80::d6c1:c8ff:fe95:92d1",
                        "metric": 512,
                        "valid": 1540,
                        "source": "::/0"
                }
        ],
        "dns-server": [
                "2408:8888::8",
                "2408:8899::8"
        ],
        "dns-search": [

        ],
        "neighbors": [

        ],
        "inactive": {
                "ipv4-address": [

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ],
                "neighbors": [

                ]
        },
        "data": {
                "passthru": "001700202408888800000000000000000000000824088899000000000000000000000008"
        }
}
br-lan    Link encap:Ethernet  HWaddr 45:14:00:44:EB:77
          inet addr:192.168.199.1  Bcast:192.168.199.255  Mask:255.255.255.0
          inet6 addr: fe80::62be:b4ff:fe03:bd98/64 Scope:Link
          inet6 addr: 2408:8210:3047:86f0::1/64 Scope:Global
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:5903356 errors:0 dropped:218 overruns:0 frame:0
          TX packets:1915628 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6780403319 (6.3 GiB)  TX bytes:1476661166 (1.3 GiB)
pppoe-wan Link encap:Point-to-Point Protocol
          inet addr:111.162.225.141  P-t-P:111.162.225.1  Mask:255.255.255.255
          inet6 addr: fe80::62be:b41a:5103:bd98/128 Scope:Link
          inet6 addr: 2408:8210:3b04:588b:62be:b41a:5103:bd98/64 Scope:Global
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:1192158 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1254183 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:771575567 (735.8 MiB)  TX bytes:948647678 (904.7 MiB)

Not preferred or recommend but viable solution:
You are a small business and for reasons have only residential connection and you get from two ISP each an provider aggregated block, then you use ULA internally and use prefix translation at the edge to each ISP...

Edit:
Other use case; a private by design site to site VPN.

1 Like

But the androids selects an GUA via slaac? And in General it's works afterwards you have pinged this GUA address?

yes,I tried,statefull addr seems not working on Android

after I pinged GUA addr, the Android IPV6 is fully worked

ps:I redialed PPPoE, IPV6 prefix is changed,and Android WIFI is like this

a stateless is just an address which you get by slaac.

Statefull would be dhcpv6 but android does not support it.

I also have an android and can use IPv6 just fine... Without such an workaround.

1 Like

my company is using modem builtin dhcp server, and my phone's IPV6 is worked

I've been trying to fix this problem for two weeks,and I tried openwrt 18 ~ 23,every version has same problem, It's an operating issue?

may i have your network and dhcp config to check a lot?

In my OpenWrt, I followed this setting and then my Android/ChromeOS can get address from SLAAC correctly, see if this helps:

2 Likes

I'm Very Very Greatful :heart_eyes: that's working(At least it works now)
and I reboot my phone about 5 times,it still working

but ... I think DHCPv6 Service and RA Flags need enabled too using PD mode,how did it work? Is PD conflict to DHCPv6-Service?

So your (custom) android has buildin dhcpv6? Nice.

Regarding the network and DHCP config.
There is no magic involved. We both use 'server' for the RA option. Only difference maybe that I use dnsmasq-full and not the default odhcpd

It's my preference, I let all devices to use SLAAC instead of mixing DHCPv6 & SLAAC, more things mean more to troubleshoot when problem comes up :slight_smile:

1 Like

Prefix delegation is for connecting routers in series, each one getting a smaller (more specific) prefix routed to it. An endpoint like a phone does not need a PD, it takes an IP within the prefix held by the router.

The ra_flags advertise to a device that receives the RA that it should request further information via DHCPv6. Android will never do that since it does not implement DHCPv6.

1 Like

thank you every one,issue is resolved

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.