You are not logged in.

#1 2023-09-15 15:51:44

mwohah
Member
Registered: 2017-05-31
Posts: 36

[SOLVED] Cannot ping IPv6 addresses (but other local devices work)

My issue is similar to this thread, with the difference that other non-Arch devices in my local network operate fine over IPv6. To reiterate the context:

Since around Monday (11 September) or so, I notice tools needing the network (SSH, pacman, ...) randomly hanging for a noticeable while. After some more digging it turns out they only hang if used with name servers that also support IPv6. My ISP supports IPv6 and I successfully get an IPv6 global address assigned on Arch, so this makes it likely the tools are hanging because they are trying the IPv6 address first, timing out, and then reverting to IPv4. Disabling IPv6 seems to confirm that since it fixes the hang.

Visiting sites like test-ipv6.com also confirms no IPv6 address is 'detected' (whilst in Arch one is displayed). This worked in the past on Arch for me, so this might be related to a recent package update.

Trying to ping IPv6 addresses immediately shows 'Network is unreachable'. Pinging localhost or ::1 works fine, however.

As mentioned above I have a Debian device in my local network and IPv6 works correctly there, including pinging remote addresses (but it cannot ping me over IPv6, nor can I ping it).

Last edited by mwohah (2023-09-17 12:28:12)

Offline

#2 2023-09-15 19:14:28

seth
Member
Registered: 2012-09-03
Posts: 53,286

Re: [SOLVED] Cannot ping IPv6 addresses (but other local devices work)

ip a
getent ahostsv6 google.com
ping -c1 -6 google.com
dig  google.com # resolve google default way
dig -t AAAA google.com # ask for IPv6
dig @8.8.8.8 -t AAAA google.com # ask for IPv6 at googles IPv4 DNS
dig @2001:4860:4860::8888 -t AAAA google.com # ask for IPv6 at googles IPv6 DNS
drill google.com # same stuff w/ drill which doesn't use libns
drill -t AAAA google.com
drill @8.8.8.8 -t AAAA google.com
drill @2001:4860:4860::8888 -t AAAA google.com

dig is in the bind, drill in the ldns package

Online

#3 2023-09-16 05:02:49

-thc
Member
Registered: 2017-03-15
Posts: 531

Re: [SOLVED] Cannot ping IPv6 addresses (but other local devices work)

ip a

should at least provide one globally routable IPv6 address (2000::/3) and one link-local address (fe80::/16).

ip -6 route

should contain routes for the globally routable IPv6 address space and one default route pointing to the link-local address of your router. Try pinging the last one via the scope of the network adapter (example: "eno1"):

ping -6 fe80::xxxx:xxff:fexx:xxxx%eno1

Last edited by -thc (2023-09-16 05:12:32)

Offline

#4 2023-09-16 09:05:24

mwohah
Member
Registered: 2017-05-31
Posts: 36

Re: [SOLVED] Cannot ping IPv6 addresses (but other local devices work)

Thanks for the response. Here is the output, along with the command echoed by 'set -x' in Bash:

+ export LANG=C
+ LANG=C
+ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever
2: enp0s13f0u3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether d0:c0:bf:4e:30:1a brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.252/24 brd 192.168.1.255 scope global noprefixroute enp0s13f0u3
       valid_lft forever preferred_lft forever
    inet6 2a02:1810:9514:8d00::6fcb/128 scope global dynamic noprefixroute 
       valid_lft 215843sec preferred_lft 52433sec
    inet6 fe80::b78:f559:3ba2:30a7/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether c6:05:00:75:d2:91 brd ff:ff:ff:ff:ff:ff permaddr 2c:6d:c1:92:a8:e7
+ getent ahostsv6 google.com
2a00:1450:400e:803::200e STREAM google.com
2a00:1450:400e:803::200e DGRAM  
2a00:1450:400e:803::200e RAW    
+ ping -c1 -6 google.com
ping: connect: Network is unreachable
+ dig google.com

; <<>> DiG 9.18.18 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8148
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;google.com.			IN	A

;; ANSWER SECTION:
google.com.		241	IN	A	142.250.179.206

;; Query time: 3 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Sat Sep 16 10:53:16 CEST 2023
;; MSG SIZE  rcvd: 55

+ dig -t AAAA google.com

; <<>> DiG 9.18.18 <<>> -t AAAA google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6630
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;google.com.			IN	AAAA

;; ANSWER SECTION:
google.com.		102	IN	AAAA	2a00:1450:400e:803::200e

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Sat Sep 16 10:53:16 CEST 2023
;; MSG SIZE  rcvd: 67

+ dig @8.8.8.8 -t AAAA google.com

; <<>> DiG 9.18.18 <<>> @8.8.8.8 -t AAAA google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28372
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;google.com.			IN	AAAA

;; ANSWER SECTION:
google.com.		75	IN	AAAA	2a00:1450:400e:802::200e

;; Query time: 23 msec
;; SERVER: 8.8.8.8#53(8.8.8.8) (UDP)
;; WHEN: Sat Sep 16 10:53:16 CEST 2023
;; MSG SIZE  rcvd: 67

+ dig @2001:4860:4860::8888 -t AAAA google.com
;; UDP setup with 2001:4860:4860::8888#53(2001:4860:4860::8888) for google.com failed: network unreachable.
;; UDP setup with 2001:4860:4860::8888#53(2001:4860:4860::8888) for google.com failed: network unreachable.
;; UDP setup with 2001:4860:4860::8888#53(2001:4860:4860::8888) for google.com failed: network unreachable.
+ drill google.com
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 10255
;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 
;; QUESTION SECTION:
;; google.com.	IN	A

;; ANSWER SECTION:
google.com.	241	IN	A	142.250.179.206

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 0 msec
;; SERVER: 127.0.0.53
;; WHEN: Sat Sep 16 10:53:16 2023
;; MSG SIZE  rcvd: 44
+ drill -t AAAA google.com
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 7219
;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 
;; QUESTION SECTION:
;; google.com.	IN	AAAA

;; ANSWER SECTION:
google.com.	102	IN	AAAA	2a00:1450:400e:803::200e

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 0 msec
;; SERVER: 127.0.0.53
;; WHEN: Sat Sep 16 10:53:16 2023
;; MSG SIZE  rcvd: 56
+ drill @8.8.8.8 -t AAAA google.com
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 62322
;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 
;; QUESTION SECTION:
;; google.com.	IN	AAAA

;; ANSWER SECTION:
google.com.	282	IN	AAAA	2a00:1450:400e:802::200e

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 38 msec
;; SERVER: 8.8.8.8
;; WHEN: Sat Sep 16 10:53:16 2023
;; MSG SIZE  rcvd: 56
+ drill @2001:4860:4860::8888 -t AAAA google.com
Error: error sending query: General LDNS error

Furthermore, to answer -thc's questions: 'ip a' seems to show both types of IPv6 addresses, global and local (see above).

'ip -6 route' shows both routes for the global and local address:

2a02:1810:9514:8d00::6fcb dev enp0s13f0u3 proto kernel metric 100 pref medium
fe80::/64 dev enp0s13f0u3 proto kernel metric 1024 pref medium

And, if I understood the question of pinging with scope correctly, I should try pinging the IPv6 local address of the router, but it doesn't seem to be shown directly - the first address is my own global IPv6 address and the second one the subnet of the link-local address.

I tried doing a traceroute6 from the working device to get the IPv6 address of the router (first hop), and whilst pinging that from that device works, it also yields 'Network is unreachable' from my misbehaving Arch box. Probably expectedly, trying to ping another IPv6 device in my local network that is directly connected to the same gateway also yields 'Network is unreachable' (this is the Debian device on which IPv6 works fine).

Offline

#5 2023-09-16 13:20:19

seth
Member
Registered: 2012-09-03
Posts: 53,286

Re: [SOLVED] Cannot ping IPv6 addresses (but other local devices work)

Here is the output, along with the command echoed by 'set -x' in Bash:

"man script"

Is that the entire "ip -6 r" output?
What does it look like on the debian system?

ping -c1 -6 2001:4860:4860::8888%enp0s13f0u3

Online

#6 2023-09-16 14:36:41

mwohah
Member
Registered: 2017-05-31
Posts: 36

Re: [SOLVED] Cannot ping IPv6 addresses (but other local devices work)

seth wrote:

"man script"

Assuming this means you want the log output that can be replayed through scriptreplay. Since I don't think I can upload files here and the log file is a binary file, ZIP of both timing file and log file can be found on Send here (valid for 3 days or 10 views). In case it's handy, here is a the textual representation of the script log:

Script started on 2023-09-16 16:21:42+02:00 [TERM="xterm-256color" TTY="/dev/pts/5" COLUMNS="192" LINES="32"]
[me@Hephaestus ~]$ ip a
getent ahostsv6 google.com
ping -c1 -6 google.com
dig  google.com # resolve google default way
dig -t AAAA google.com # ask for IPv6
dig @8.8.8.8 -t AAAA google.com # ask for IPv6 at googles IPv4 DNS
dig @2001:4860:4860::8888 -t AAAA google.com # ask for IPv6 at googles IPv6 DNS
drill google.com # same stuff w/ drill which doesn't use libns
drill -t AAAA google.com
drill @8.8.8.8 -t AAAA google.com
drill @2001:4860:4860::8888 -t AAAA google.com
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever
2: enp0s13f0u3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether d0:c0:bf:4e:30:1a brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.252/24 brd 192.168.1.255 scope global noprefixroute enp0s13f0u3
       valid_lft forever preferred_lft forever
    inet6 2a02:1810:9514:8d00::6fcb/128 scope global dynamic noprefixroute 
       valid_lft 216098sec preferred_lft 52688sec
    inet6 fe80::b78:f559:3ba2:30a7/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 0e:bb:3b:b8:34:22 brd ff:ff:ff:ff:ff:ff permaddr 2c:6d:c1:92:a8:e7
2a00:1450:400e:803::200e STREAM google.com
2a00:1450:400e:803::200e DGRAM  
2a00:1450:400e:803::200e RAW    
ping: connect: Netwerk is onbereikbaar

; <<>> DiG 9.18.18 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53059
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;google.com.			IN	A

;; ANSWER SECTION:
google.com.		97	IN	A	142.250.179.206

;; Query time: 3 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Sat Sep 16 16:21:46 CEST 2023
;; MSG SIZE  rcvd: 55


; <<>> DiG 9.18.18 <<>> -t AAAA google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55461
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;google.com.			IN	AAAA

;; ANSWER SECTION:
google.com.		202	IN	AAAA	2a00:1450:400e:803::200e

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Sat Sep 16 16:21:46 CEST 2023
;; MSG SIZE  rcvd: 67


; <<>> DiG 9.18.18 <<>> @8.8.8.8 -t AAAA google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58755
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;google.com.			IN	AAAA

;; ANSWER SECTION:
google.com.		127	IN	AAAA	2a00:1450:400e:802::200e

;; Query time: 23 msec
;; SERVER: 8.8.8.8#53(8.8.8.8) (UDP)
;; WHEN: Sat Sep 16 16:21:46 CEST 2023
;; MSG SIZE  rcvd: 67

;; UDP setup with 2001:4860:4860::8888#53(2001:4860:4860::8888) for google.com failed: network unreachable.
;; UDP setup with 2001:4860:4860::8888#53(2001:4860:4860::8888) for google.com failed: network unreachable.
;; UDP setup with 2001:4860:4860::8888#53(2001:4860:4860::8888) for google.com failed: network unreachable.
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 16920
;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 
;; QUESTION SECTION:
;; google.com.	IN	A

;; ANSWER SECTION:
google.com.	97	IN	A	142.250.179.206

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 0 msec
;; SERVER: 127.0.0.53
;; WHEN: Sat Sep 16 16:21:46 2023
;; MSG SIZE  rcvd: 44
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 5944
;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 
;; QUESTION SECTION:
;; google.com.	IN	AAAA

;; ANSWER SECTION:
google.com.	202	IN	AAAA	2a00:1450:400e:803::200e

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 0 msec
;; SERVER: 127.0.0.53
;; WHEN: Sat Sep 16 16:21:46 2023
;; MSG SIZE  rcvd: 56
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 4591
;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 
;; QUESTION SECTION:
;; google.com.	IN	AAAA

;; ANSWER SECTION:
google.com.	153	IN	AAAA	2a00:1450:400e:802::200e

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 38 msec
;; SERVER: 8.8.8.8
;; WHEN: Sat Sep 16 16:21:46 2023
;; MSG SIZE  rcvd: 56
Error: error sending query: General LDNS error
[me@Hephaestus ~]$ exit
exit

Script done on 2023-09-16 16:21:47+02:00 [COMMAND_EXIT_CODE="1"]
seth wrote:

Is that the entire "ip -6 r" output?

Yes.

seth wrote:

What does it look like on the debian system?

Like this:

2a02:1810:9514:8d00::/64 dev eth0 proto kernel metric 256 expires 216331sec pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
default via fe80::6802:b8ff:febd:4b45 dev eth0 proto ra metric 1024 expires 1648sec hoplimit 64 pref medium
seth wrote:
ping -c1 -6 2001:4860:4860::8888%enp0s13f0u3

Yields this on Arch:

ping: 2001:4860:4860::8888%enp0s13f0u3: Name or service not known

Looks like the default route is somehow missing on the Arch box, which is what I was missing, thanks. Executing this resolves the issue on the Arch box and gets IPv6 working:

sudo ip -family inet6 route add default via fe80::6802:b8ff:febd:4b45 dev enp0s13f0u3

I guess this poses the follow-up question of "why isn't the default route being added automatically (any more)?". Possibly a regression somewhere, or a bug. I'm using an ethernet-to-USB-C adapter which might be handled differently somewhere (laptop unfortunately doesn't have a built-in ethernet port to compare nor do I have any other of these adapters lying around currently).

Offline

#7 2023-09-16 14:45:13

seth
Member
Registered: 2012-09-03
Posts: 53,286

Re: [SOLVED] Cannot ping IPv6 addresses (but other local devices work)

Assuming this means you want the log output that can be replayed through scriptreplay

No, I was merely pointing out an alternative to record a session (you don't even need scriptreplay but can just read the session as plain text)

The routing table is generated by whatever network managing service you use (pot. invoking some lower level tools)
=> How do you configure the network on arch/debian?
In doubt:

find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f

Online

#8 2023-09-16 14:52:50

mwohah
Member
Registered: 2017-05-31
Posts: 36

Re: [SOLVED] Cannot ping IPv6 addresses (but other local devices work)

seth wrote:

How do you configure the network on arch/debian?

It is configured by NetworkManager (GNOME), currently.

NetworkManager has recently been updated to 1.44, so it may (or may not) be related to the update. Also skimming the issue threads on their GitLab in case someone already reported something similar, but not immediately finding anything relevant there.

EDIT: It's GNOME/NetworkManager for Arch, I configured the Debian box statically for IPv4, but need to look into what's being used for IPv6 - might be running a dhcpcd as well.

EDIT2: Not entirely sure how IPv6 on the Debian box is happening currently, actually; I built this Debian box from scratch, and never configured any dhcpcd or other network manager that handles DHCP (not even systemd-networkd) - I only ever statically configured IPv4 on it through /etc/network/interfaces - I guess it must be a default setting somewhere that applies when no explicit configuration exists (although without DHCP not sure how it is being negotiated at all, currently).

Last edited by mwohah (2023-09-16 15:05:03)

Offline

#9 2023-09-16 15:14:43

seth
Member
Registered: 2012-09-03
Posts: 53,286

Re: [SOLVED] Cannot ping IPv6 addresses (but other local devices work)

Post system journals of both systems or at least the list of enables services from #7

Online

#10 2023-09-17 12:28:01

mwohah
Member
Registered: 2017-05-31
Posts: 36

Re: [SOLVED] Cannot ping IPv6 addresses (but other local devices work)

Thanks for helping me debug this, I've managed to solve the remaining issue of the default route not being added. It turns out that IPv6 was set to 'Automatic, DHCP only' in the IPv6 settings in the GNOME network panel. Changing it to 'Automatic' resolved the issue.

I might have set that by accident at some point myself because I'm using a static IPv4 address with custom DNS servers and, at least for IPv4, not doing so in the past appeared to still add upstream DNS servers from the ISP. It's still weird, since I didn't change that setting recently as far as I remember, but several months ago - but maybe I'm misremembering something.

I'll mark the thread as solved.

Last edited by mwohah (2023-09-17 12:29:07)

Offline

Board footer

Powered by FluxBB