IPv6 working from WiFi, but not wired LAN

(I'm starting a new topic since I now have a much better understanding of what's going wrong than in my initial vague problem description.)

Topology is as follows: BT Home Hub 5 with OpenWrt 21.02.1 r16325-88151b8303. Devices connect through WiFi or wired LAN via Powerline adapters. The client device that I'm testing with is a Debian system.

I've previously used a Zyxel DSL Router instead of the OpenWRT one. In this setup, IPv6 worked fine through both wired LAN and WiFI.

However, when using the OpenWrt router, IPv6 is not working right:

When connecting through WiFi, IPv6 is working fine. The client gets a DHCP6 lease and can ping global IPv6 addresses.

When connecting through wired LAN, IPv6 configuration through Network Manager on the client takes a long time (minutes). Afterwards, the device has the right IPv6 address and routes (at least they look right to me), but IPv6 pings to the internet as well as the router itself time out.

If I explicitly configure Network Manager to use DHCPv6 for initializing the wired LAN device, the DHCPv6 requests time out as well.

My configuration is as follows:

root@OpenWrt:~# 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'
	option ula_prefix 'fdbb:473b:26a6::/48'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '64'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0'

config interface 'wan'
	option device 'dsl0.101'
	option proto 'pppoe'
	option username '<redacted>'
	option password '<redacted>'
	option ipv6 'auto'

config device
	option name 'dsl0'

config dsl 'dsl'
	option ds_snr_offset '0'
	option tone 'a'
	option annex 'b'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '0'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '0 1 2 4 6t'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '5 6t'
root@OpenWrt:~# cat /etc/config/wireless 

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '36'
	option hwmode '11a'
	option path 'pci0000:01/0000:01:00.0/0000:02:00.0'
	option htmode 'VHT80'
	option country 'GB'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option encryption 'psk2'
	option key '<redacted>'
	option ssid '<redacted> (5 GHz)'

config wifi-device 'radio1'
	option type 'mac80211'
	option channel '11'
	option hwmode '11g'
	option path 'pci0000:00/0000:00:0e.0'
	option htmode 'HT20'
	option country 'GB'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option ssid '<redacted>'
	option encryption 'psk2'
	option key '<redacted>'
root@OpenWrt:~# cat /etc/config/dhcp 

config dnsmasq
	option domainneeded '1'
	option boguspriv '1'
	option filterwin2k '0'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option nonegcache '0'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option nonwildcard '1'
	option localservice '1'
	option ednspacket_max '1232'

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

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'

Here is the wired LAN configuration on the client when it finally finishes:

nikratio@vostro ~> ip -6 route
::1 dev lo proto kernel metric 256 pref medium
2001:8b0:7bab:b677::/64 dev eth1 proto ra metric 100 pref medium
fdbb:473b:26a6::/64 dev eth1 proto ra metric 100 pref medium
fdbb:473b:26a6::/48 via fe80::b40f:51ff:fe38:9e1b dev eth1 proto ra metric 100 pref medium
fe80::/64 dev eth1 proto kernel metric 100 pref medium
fe80::/64 dev rath proto kernel metric 256 pref medium
default via fe80::b40f:51ff:fe38:9e1b dev eth1 proto ra metric 100 pref medium

nikratio@vostro ~> ip addr show eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 80:3f:5d:07:1b:a8 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.184/24 brd 192.168.1.255 scope global dynamic noprefixroute eth1
       valid_lft 42761sec preferred_lft 42761sec
    inet6 fdbb:473b:26a6:0:4c26:c142:735f:25cf/64 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 2001:8b0:7bab:b677:761c:678b:1a41:1d44/64 scope global dynamic noprefixroute 
       valid_lft 6379sec preferred_lft 6379sec
    inet6 fe80::c0ef:8676:9d86:30d6/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

Here's what it looks like on the router:

root@OpenWrt:~# ip addr show br-lan
5: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether b6:0f:51:38:9e:1b brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 fdbb:473b:26a6::1/64 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 2001:8b0:7bab:b677::1/64 scope global dynamic noprefixroute 
       valid_lft 6342sec preferred_lft 6342sec
    inet6 fe80::b40f:51ff:fe38:9e1b/64 scope link 
       valid_lft forever preferred_lft forever

root@OpenWrt:~# ip addr show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br-lan state UP qlen 1000
    link/ether b6:0f:51:38:9e:1b brd ff:ff:ff:ff:ff:ff

I can ping the router on its link-local address, but not the global one:

nikratio@vostro ~/tmp> ping -6 -c 1 fe80::b40f:51ff:fe38:9e1b  # router, link local
PING fe80::b40f:51ff:fe38:9e1b(fe80::b40f:51ff:fe38:9e1b) 56 data bytes
64 bytes from fe80::b40f:51ff:fe38:9e1b%eth1: icmp_seq=1 ttl=64 time=2.35 ms

--- fe80::b40f:51ff:fe38:9e1b ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 2.351/2.351/2.351/0.000 ms

nikratio@vostro ~/tmp> ping -6 -c 1 2001:8b0:7bab:b677::1   # router, global
PING 2001:8b0:7bab:b677::1(2001:8b0:7bab:b677::1) 56 data bytes
From 2001:8b0:7bab:b677:761c:678b:1a41:1d44 icmp_seq=1 Destination unreachable: Address unreachable

--- 2001:8b0:7bab:b677::1 ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms

Same problem when pinging a remote host:

nikratio@vostro ~/tmp> ping -6 -c 1 www.google.com
PING www.google.com(lhr35s02-in-x04.1e100.net (2a00:1450:4009:80a::2004)) 56 data bytes

--- www.google.com ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

Running tcpdump on the router while attempting to ping from LAN, I get the following:

root@OpenWrt:~# tcpdump -i eth0 ip6   # while pinging global
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
21:25:50.514492 IP6 fe80::b40f:51ff:fe38:9e1b > ip6-allnodes: ICMP6, router advertisement, length 152
21:25:50.532281 IP6 fe80::c0ef:8676:9d86:30d6 > ff02::16: HBH ICMP6, multicast listener report v2, 5 group record(s), length 108
21:25:51.320158 IP6 fe80::c0ef:8676:9d86:30d6 > ff02::16: HBH ICMP6, multicast listener report v2, 5 group record(s), length 108
21:25:51.635585 IP6 fe80::c0ef:8676:9d86:30d6.50761 > ff12::8384.21027: UDP, length 503
^C
4 packets captured
4 packets received by filter
0 packets dropped by kernel

root@OpenWrt:~# tcpdump -i eth0 ip6   # while pinging link local
cpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
21:26:36.550167 IP6 fe80::c0ef:8676:9d86:30d6 > fe80::b40f:51ff:fe38:9e1b: ICMP6, echo request, seq 1, length 64
21:26:36.550613 IP6 fe80::b40f:51ff:fe38:9e1b > fe80::c0ef:8676:9d86:30d6: ICMP6, echo reply, seq 1, length 64
21:26:38.108671 IP6 fe80::9cd0:90b6:da65:1943.64344 > ff12::8384.21027: UDP, length 657
21:26:38.109318 IP6 fe80::9cd0:90b6:da65:1943.64344 > ff12::8384.21027: UDP, length 657
21:26:38.109867 IP6 fe80::9cd0:90b6:da65:1943.64344 > ff12::8384.21027: UDP, length 657
21:26:38.110378 IP6 fe80::9cd0:90b6:da65:1943.64344 > ff12::8384.21027: UDP, length 657
21:26:38.110767 IP6 fe80::9cd0:90b6:da65:1943.64344 > ff12::8384.21027: UDP, length 657
21:26:38.111139 IP6 fe80::9cd0:90b6:da65:1943.64344 > ff12::8384.21027: UDP, length 657
21:26:39.552094 IP6 fe80::9cd0:90b6:da65:1943.54091 > ff02::c.3702: UDP, length 656
21:26:39.735322 IP6 fe80::9cd0:90b6:da65:1943.54091 > ff02::c.3702: UDP, length 656
21:26:40.084429 IP6 fe80::9cd0:90b6:da65:1943.54091 > ff02::c.3702: UDP, length 656
21:26:40.473228 IP6 fe80::9d80:45e3:e60d:5a9d.40507 > ff12::8384.21027: UDP, length 444
21:26:40.784910 IP6 fe80::9cd0:90b6:da65:1943.54091 > ff02::c.3702: UDP, length 656
21:26:41.623120 IP6 fe80::c0ef:8676:9d86:30d6 > fe80::b40f:51ff:fe38:9e1b: ICMP6, neighbor solicitation, who has fe80::b40f:51ff:fe38:9e1b, length 32
21:26:41.623492 IP6 fe80::b40f:51ff:fe38:9e1b > fe80::c0ef:8676:9d86:30d6: ICMP6, neighbor advertisement, tgt is fe80::b40f:51ff:fe38:9e1b, length 24
21:26:41.764889 IP6 fe80::b40f:51ff:fe38:9e1b > fe80::c0ef:8676:9d86:30d6: ICMP6, neighbor solicitation, who has fe80::c0ef:8676:9d86:30d6, length 32
21:26:41.767491 IP6 fe80::c0ef:8676:9d86:30d6 > fe80::b40f:51ff:fe38:9e1b: ICMP6, neighbor advertisement, tgt is fe80::c0ef:8676:9d86:30d6, length 24
21:26:42.168040 IP6 fe80::9cd0:90b6:da65:1943.54091 > ff02::c.3702: UDP, length 656
21:26:44.183799 IP6 fe80::9cd0:90b6:da65:1943.54091 > ff02::c.3702: UDP, length 656
21:26:46.199569 IP6 fe80::9cd0:90b6:da65:1943.54091 > ff02::c.3702: UDP, length 656
^C
20 packets captured
20 packets received by filter
0 packets dropped by kernel

root@OpenWrt:~# tcpdump -i eth0 ip6  # while pinging lhr25s27-in-x04.1e100.net (2a00:1450:4009:80a::2004)
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
21:32:08.074095 IP6 fe80::9cd0:90b6:da65:1943.64344 > ff12::8384.21027: UDP, length 657
21:32:08.074767 IP6 fe80::9cd0:90b6:da65:1943.64344 > ff12::8384.21027: UDP, length 657
21:32:08.075151 IP6 fe80::9cd0:90b6:da65:1943.64344 > ff12::8384.21027: UDP, length 657
21:32:08.075537 IP6 fe80::9cd0:90b6:da65:1943.64344 > ff12::8384.21027: UDP, length 657
21:32:08.075918 IP6 fe80::9cd0:90b6:da65:1943.64344 > ff12::8384.21027: UDP, length 657
21:32:08.076301 IP6 fe80::9cd0:90b6:da65:1943.64344 > ff12::8384.21027: UDP, length 657
21:32:10.468997 IP6 fe80::9d80:45e3:e60d:5a9d.40507 > ff12::8384.21027: UDP, length 444
21:32:10.864689 IP6 4.4.d.1.1.4.a.1.b.8.7.6.c.1.6.7.7.7.6.b.b.a.b.7.0.b.8.0.1.0.0.2.ip6.arpa > lhr35s02-in-x04.1e100.net: ICMP6, echo request, seq 1, length 64
21:32:10.872470 IP6 fe80::b40f:51ff:fe38:9e1b > ff02::1:ff41:1d44: ICMP6, neighbor solicitation, who has 4.4.d.1.1.4.a.1.b.8.7.6.c.1.6.7.7.7.6.b.b.a.b.7.0.b.8.0.1.0.0.2.ip6.arpa, length 32
21:32:11.877031 IP6 fe80::b40f:51ff:fe38:9e1b > ff02::1:ff41:1d44: ICMP6, neighbor solicitation, who has 4.4.d.1.1.4.a.1.b.8.7.6.c.1.6.7.7.7.6.b.b.a.b.7.0.b.8.0.1.0.0.2.ip6.arpa, length 32
21:32:12.901065 IP6 fe80::b40f:51ff:fe38:9e1b > ff02::1:ff41:1d44: ICMP6, neighbor solicitation, who has 4.4.d.1.1.4.a.1.b.8.7.6.c.1.6.7.7.7.6.b.b.a.b.7.0.b.8.0.1.0.0.2.ip6.arpa, length 32
21:32:15.959941 IP6 fe80::c0ef:8676:9d86:30d6 > fe80::b40f:51ff:fe38:9e1b: ICMP6, neighbor solicitation, who has fe80::b40f:51ff:fe38:9e1b, length 32
21:32:15.960292 IP6 fe80::b40f:51ff:fe38:9e1b > fe80::c0ef:8676:9d86:30d6: ICMP6, neighbor advertisement, tgt is fe80::b40f:51ff:fe38:9e1b, length 24
21:32:20.964944 IP6 fe80::b40f:51ff:fe38:9e1b > fe80::c0ef:8676:9d86:30d6: ICMP6, neighbor solicitation, who has fe80::c0ef:8676:9d86:30d6, length 32
21:32:20.967316 IP6 fe80::c0ef:8676:9d86:30d6 > fe80::b40f:51ff:fe38:9e1b: ICMP6, neighbor advertisement, tgt is fe80::c0ef:8676:9d86:30d6, length 24
21:32:21.634829 IP6 fe80::c0ef:8676:9d86:30d6.50761 > ff12::8384.21027: UDP, length 503
^C
16 packets captured
16 packets received by filter
0 packets dropped by kernel

When connecting through WiFi instead of LAN, things look like this:

nikratio@vostro ~/tmp> ip -6 --color route
::1 dev lo proto kernel metric 256 pref medium
2001:8b0:7bab:b677::ab2 dev wlan0 proto kernel metric 600 pref medium
2001:8b0:7bab:b677::/64 dev wlan0 proto ra metric 600 pref medium
fdbb:473b:26a6::ab2 dev wlan0 proto kernel metric 600 pref medium
fdbb:473b:26a6::/64 dev wlan0 proto ra metric 600 pref medium
fdbb:473b:26a6::/48 via fe80::b40f:51ff:fe38:9e1b dev wlan0 proto ra metric 600 pref medium
fe80::/64 dev rath proto kernel metric 256 pref medium
fe80::/64 dev wlan0 proto kernel metric 600 pref medium
default via fe80::b40f:51ff:fe38:9e1b dev wlan0 proto ra metric 600 pref medium
nikratio@vostro ~/tmp> ping -6 -c 1 2001:8b0:7bab:b677::1   # router, global
PING 2001:8b0:7bab:b677::1(2001:8b0:7bab:b677::1) 56 data bytes
64 bytes from 2001:8b0:7bab:b677::1: icmp_seq=1 ttl=64 time=7.10 ms

--- 2001:8b0:7bab:b677::1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 7.103/7.103/7.103/0.000 ms

The only difference that I see in the routing table (apart from eth1 being replaced with wlan0) is the additional 2001:8b0:7bab:b677::ab2 dev wlan0 proto kernel metric 600 pref medium entry - is this significant?

Is anyone able to help?

Someone pointed me to the rdisc6 tool. According to this, the router is sending out router announcements only through WiFi, but not through wired LAN. Running from a client, I get:

root@vostro ~ [1]# rdisc6 wlan0
Soliciting ff02::2 (ff02::2) on wlan0...

Hop limit                 :           64 (      0x40)
Stateful address conf.    :          Yes
Stateful other conf.      :          Yes
Mobile home agent         :           No
Router preference         :       medium
Neighbor discovery proxy  :           No
Router lifetime           :         6000 (0x00001770) seconds
Reachable time            :  unspecified (0x00000000)
Retransmit time           :  unspecified (0x00000000)
 Source link-layer address: B6:0F:51:38:9E:1B
 MTU                      :         1492 bytes (valid)
 Prefix                   : 2001:8b0:7bab:b677::/64
  On-link                 :          Yes
  Autonomous address conf.:          Yes
  Valid time              :         6587 (0x000019bb) seconds
  Pref. time              :         6587 (0x000019bb) seconds
 Prefix                   : fdbb:473b:26a6::/64
  On-link                 :          Yes
  Autonomous address conf.:          Yes
  Valid time              :     infinite (0xffffffff)
  Pref. time              :     infinite (0xffffffff)
 Recursive DNS server     : fdbb:473b:26a6::1
  DNS server lifetime     :         6000 (0x00001770) seconds
 from fe80::b40f:51ff:fe38:9e1b
root@vostro ~# rdisc6 eth1
Soliciting ff02::2 (ff02::2) on eth1...
Timed out.
Timed out.
Timed out.
No response.

As impossible as this may seem, I am now certain that the problem was with the Powerline adapters. In my configuration (TP-Link AV1200 at the router, TP-Link AV1300 at the device) IPv4 is working perfectly, but IPv6 is impaired (e.g. link local addresses work, but neighbor discovery is broken).

A colleague of mine speculates this may be due to a bug when the adapter deals with Ethernet multicast frames (which IPv6 makes use of), since the adapter itself shouldn't even know anything about IPv4 or IPv6.

In any case, switching to a long network cable or switching to AV1300 Powerline adapters on both ends solved all the problems described above.

Hope this is useful to someone else.

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