After the router restarts, ipv6 cannot be used

After a lot of testing, after the router restarts, windows ipv6 becomes unusable.
However, after my detailed test, the network card data obtained:

1 Connect to a specific DNS suffix.......: Lan
2 IPv6 address..........: 2009:33d:9abe:1500::109
3 IPv6 address..........: 2009:33d:9abe:1500:d469:6f61:a8f5:6d17
4 IPv6 address..........: 2009:33d:9ad2:5900:d469:6f61:a8f5:6d17
5 IPv6 address..........: 2009:33d:9ad2:9c00:d469:6f61:a8f5:6d17
6 Temporary IPv6 address........: 2009:33d:9abe:1500:dc8f:cbb4:649:3127
7 Temporary IPv6 address........: 2009:33d:9ad2:5900:dc8f:cbb4:649:3127
8 Temporary IPv6 address.........: 2009:33d:9ad2:9c00:dc8f:cbb4:649:3127
9 Local link IPv6 address...: fe80::d469:6f61:a8f5:6d17%20
10 IPv4 address...........: 192.168.6.109
11 Subnet mask............: 255.255.255.0
12 Default gateway...........: Fe80::5e85:7eff:fe41:927e%20
192.168.6.1

Find

5 IPv6 address..........: 2009:33d:9ad2:9c00:d469:6f61:a8f5:6d17
8 Temporary IPv6 address.........: 2009:33d:9ad2:9c00:dc8f:cbb4:649:3127
It can be used normally, but the push position is ranked at the bottom, causing windows to fail to connect with ip6.

I think if the router is restarted, it should be pushed to the top position so that ip6 can be used all the time.

You have stale addresses from the prefix assigned to the router from your ISP before the restart. Windows should not prefer the old IPs. Tweak the RA and DHCP options ra_lifetime, ra_useleasetime, ra_mininterval, ra_maxinterval.

1 Like

How do I set it up specifically?
Can you give me an example?

config dnsmasq
	option domainneeded '1'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option domain 'lan'
	option expandhosts '1'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option localservice '1'
	option local '/lan/'
	list server '/#/2001:da8::666#53'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv6 'server'
	option ra 'server'
	option ra_slaac '1'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'
	option ra_management '1'

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 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option dhcpv6 'server'
	option ra 'server'
	option ra_slaac '1'
	option ra_useleasetime '0'
	option ra_lifetime '600'
	option ra_mininterval '200'
	option ra_maxinterval '600'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'
	option ra_management '0'
	option leasetime '11m'

After setting, restart the router, the windows host still cannot access the Internet

Try with these values, remove the other options that were not there by default.

Connect to a specific DNS suffix.......: Lan
    IPv6 address..........: 2009:33d:9ae9:be00::109
    IPv6 address..........: 2009:33d:9ae9:be00:d469:6f61:a8f5:6d17
    IPv6 address..........: 2009:33d:9aeb:be00:d469:6f61:a8f5:6d17
    Temporary IPv6 address........: 2009:33d:9ae9:be00:493f:a6c3:e589:134a
    Temporary IPv6 address........: 2009:33d:9aeb:be00:40d9:85da:7abe:8061
    Link local IPv6 address...: fe80::d469:6f61:a8f5:6d17%20
    IPv4 address...........: 192.168.6.109
    Subnet mask............: 255.255.255.0
    Default gateway...........: Fe80::5e85:7eff:fe41:927e%20
                                        192.168.6.1

It still doesn’t work. Pushing new ipv6 is ranked at the bottom, but not at the top, so you still can’t access the Internet through ipv6.

    IPv6 address..........: 2009:33d:9aeb:be00:d469:6f61:a8f5:6d17
    Temporary IPv6 address........: 2009:33d:9aeb:be00:40d9:85da:7abe:8061

It is the ipv6 obtained after the router restarts, but it ranks at the bottom instead of becoming the first choice.

In one minute the old prefix should be removed.
If that can't help you, I am out of ideas, as basically this is a windows problem.

Connect to a specific DNS suffix.......: Lan
    IPv6 address..........: 2009::33d:9aec:1600::109
    IPv6 address..........: 2009::33d:9aec:1600:d469:6f61:a8f5:6d17
    IPv6 address..........: 2009::33d:9aec:1e00:d469:6f61:a8f5:6d17
    Temporary IPv6 address........: 2009::33d:9aec:1600:1d6d:59b1:f9fd:d219
    Temporary IPv6 address........: 2009::33d:9aec:1e00:a89c:8f47:647f:4a15
    Link local IPv6 address...: fe80::d469:6f61:a8f5:6d17%20
    IPv4 address...........: 192.168.6.109
    Subnet mask............: 255.255.255.0
    Default gateway...........: Fe80::5e85:7eff:fe41:927e%20
                                        192.168.6.1

After one minute, the previous ip was not deleted, and ipv6 can only be used by restarting the windows network card.
This situation only occurs after restarting the router, but re-dial pppoe, you can normally push ipv6 to the first position.

Verify with tcpdump the lifetime of the RA
tcpdump -i br-lan -evn 'ip6[40] == 134'