Hi, I am using OpenWrt as my home router, with 2 routers act as wireless AP. Openwrt utilize PPPOE to get Internet access. My ISP got IPv6 PD support and I actually need it.
I set up the IPv6 on OP but occasionally I found out IPv6 connection problems, client in the LAN cannot ping IPv6 hosts but my OP always can.
On my NAS, I use Home Assistant's Ping intergration to notify me if the IPv6 connection breaks. When outrage happens, ip addr
on NAS shows a fdxx
address as a prefered address.
I realize it may be some address ditribution issue, I used tcpdump -i br-lan -evn 'icmp6 && ip6[40] == 134'
to capture RA packages. And I found something strange.
09:52:49.280252 OPENWRT_MAC_ADDR > 33:33:00:00:00:01, ethertype IPv6 (0x86dd), length 174: (flowlabel 0x325b4, hlim 255, next-header ICMPv6 (58) payload length: 120) fe80::open:wrt > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 120
hop limit 64, Flags [managed, other stateful], pref high, router lifetime 9000s, reachable time 0ms, retrans timer 0ms
source link-address option (1), length 8 (1): OPENWRT_MAC_ADDR
mtu option (5), length 8 (1): 1492
prefix info option (3), length 32 (4): 2xxx:xxxx:xxxx:xxxx::/64, Flags [onlink, auto], valid time 43200s, pref. time 3521s
route info option (24), length 24 (3): 2xxx:xxxx:xxxx:xxxx::/60, pref=high, lifetime=9000s
rdnss option (25), length 24 (3): lifetime 9000s, addr: 2xxx:xxxx:xxxx:xxxx::1
advertisement interval option (7), length 8 (1): 150000ms
09:53:40.645101 APPLETV_MAC_ADDR > 33:33:00:00:00:01, ethertype IPv6 (0x86dd), length 102: (flowlabel 0xf0300, hlim 255, next-header ICMPv6 (58) payload length: 48) fe80::apple:tv > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 48
hop limit 0, Flags [none], pref medium, router lifetime 0s, reachable time 0ms, retrans timer 0ms
route info option (24), length 16 (2): fd7a:3a79:8c2d::/64, pref=medium, lifetime=1800s
unknown option (26), length 8 (1):
0x0000: 8000 0000 0000
First I found my bedroom's Apple TV is send out RAs every 3 mins, I googled this problem, there are many people also found this. But theirs IPv6 connection was not interrupted.
I tried to shorten the RA interval, raise RA preference to high, increase RA lifetime to 9000. But every 12 hour or a day, problem just keep going. Then during the connection issue, I found this:
13:38:19.726222 OPENWRT_MAC_ADDR > 33:33:00:00:00:01, ethertype IPv6 (0x86dd), length 174: (flowlabel 0x325b4, hlim 255, next-header ICMPv6 (58) payload length: 120) fe80::open:wrt > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 120
hop limit 64, Flags [managed, other stateful], pref high, router lifetime 9000s, reachable time 0ms, retrans timer 0ms
source link-address option (1), length 8 (1): OPENWRT_MAC_ADDR
mtu option (5), length 8 (1): 1492
prefix info option (3), length 32 (4): 2xxx:xxxx:xxxx:xxxx::/64, Flags [onlink, auto], valid time 43200s, pref. time 0s
route info option (24), length 24 (3): 2xxx:xxxx:xxxx:xxxx::/60, pref=high, lifetime=9000s
rdnss option (25), length 24 (3): lifetime 9000s, addr: 2xxx:xxxx:xxxx:xxxx::1
advertisement interval option (7), length 8 (1): 150000ms
"pref. time 0s"? which means this address is deprecated, but this address actually works, they can be pinged from outside. I found the pref time number does reset to 3600s at around every 30mins, but sometimes it stopped refreshing and down straight to 0.
So I went through some config again, I modified the preferred_lifetime ra_useleasetime
on the lan but no luck.
Is there a way to find out the where real problem is?
My config:
# cat /etc/config/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'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0'
config device
option name 'eth1'
option macaddr 'MAC1'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.3.1'
option ip6assign '64'
option delegate '0'
config device
option name 'eth0'
option macaddr 'MAC2'
config interface 'wan'
option proto 'pppoe'
option device 'eth1'
option username 'XXXX'
option password 'XXXX'
option ipv6 'auto'
# cat /etc/config/dhcp
...
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option ra_management '1'
option ra_preference 'high'
option ra 'server'
list ra_flags 'managed-config'
list ra_flags 'other-config'
option ra_maxinterval '150'
option ra_mininterval '30'
option dhcpv6 'server'
option ra_lifetime '9000'
option ra_useleasetime '1'
option preferred_lifetime '150m'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '7'
...
Running Openwrt 21.02.7