1

I'm quite new to the IPv6 world.

I'm trying to ping the address fc00::a6:32:67:c9:23 from another host on the same network but it doesn't work so far (although I am able to ping the device with the Link-Local unicast address).

The network configuration on my local host (the source of the ping) looks like this:

host1$ ip addr
2: wlp6s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 10:4a:7d:cd:e6:73 brd ff:ff:ff:ff:ff:ff
    inet 192.168.55.61/24 brd 192.168.55.255 scope global dynamic noprefixroute wlp6s0
       valid_lft 348sec preferred_lft 348sec
    inet6 fe80::68b0:2809:2bab:2e8b/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
5: enx000ec6a6aea4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:0e:c6:a6:ae:a4 brd ff:ff:ff:ff:ff:ff
    inet 192.168.55.198/24 metric 1024 brd 192.168.55.255 scope global dynamic enx000ec6a6aea4
       valid_lft 599sec preferred_lft 599sec
    inet6 fc00::e:c6a6:aea4/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::2576:c20e:e91d:7677/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

The local routing table looks like:

$ ip -6 route
::1 dev lo proto kernel metric 256 pref medium
2001:db8:100:1ff:ff:ff:ff:ff dev enx000ec6a6aea4 proto static metric 1024 pref medium
fc00::/64 dev enx000ec6a6aea4 proto kernel metric 256 pref medium
fe80::/64 dev wlp6s0 proto kernel metric 1024 pref medium
fe80::/64 dev enx000ec6a6aea4 proto kernel metric 1024 pref medium
default via 2001:db8:100:1ff:ff:ff:ff:ff dev enx000ec6a6aea4 proto static metric 1024 pref medium

The interface on the target host looks like this:

host2$ ip a
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether dc:a6:32:67:c9:23 brd ff:ff:ff:ff:ff:ff
    inet 192.168.55.187/24 brd 192.168.55.255 scope global dynamic noprefixroute eth0
       valid_lft 599sec preferred_lft 524sec
    inet6 fc00::a6:32:67:c9:23/64 scope global tentative noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 2001::a6:32:67:c9:23/64 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::a790:54e2:224b:f14/64 scope link 
       valid_lft forever preferred_lft forever

I was wondering why is there a tentative next to my fc00-prefixed IP address on the target host?

Does anyone knows ? Is it the cause of my pinging problem ?

Jona
  • 147
  • 1
    What address are you trying to ping? What does "it doesn't work so far" mean...are you getting errors? Some other unexpected behavior? What do your ipv6 routes look like (ip -6 route)? Are you trying to ping to the raspberry pi or from the raspberry pi? What does the network configuration on the other device look like? – larsks Sep 15 '22 at 17:17
  • I'm trying to ping to "fc00::a6:32:67:c9:23". On the other machine, I get "Address unreachable". On the other machine, ip -6 route gives three lines: one for ::1, two for fe80::. I tried to ping to the RPi. The network configuration on the other machine has the entry : inet6 fc00::e:c6a6:aea4/64 scope global valid_lft forever preferred_lft forever – Jona Sep 16 '22 at 11:25
  • It would be great if you could update your question with that information, and include the actual output of ip -6 route, ip addr, etc on the remote machine (because that's easier to understand than the prose description). – larsks Sep 16 '22 at 11:28
  • @larsks I updated the question with the information you asked. – Jona Sep 16 '22 at 12:25

1 Answers1

2

While your source host has:

inet6 fc00::e:c6a6:aea4/64 scope global

The output of ip -6 route shows no route to the corresponding network, nor does it show a default ipv6 route. Your source host doesn't know how to reach the target address.

If I assign that address on a local system, it automatically generates an appropriate route:

host1$ ip addr add fc00::e:c6a6:aea4/64 dev eth0
host1$ ip -6 route
::1 dev lo proto kernel metric 256 pref medium
fc00::/64 dev eth0 proto kernel metric 256 pref medium   # <-- this one here
fe80::/64 dev eth0 proto kernel metric 1024 pref medium

But there's a second problem: The address fc00::e:c6a6:aea4/64 is on network fc00::/64. However, your target address, fc00::a6:32:67:c9:23/64, is on network fc00:0:0:a6::/64. That means even if you have the automatically generated route on host1, it's still not going to be able to reach your target address on host2.

To get this to work in my test setup, I needed to add routes on both systems.

  1. On host1, I need to add a route to fc00:0:0:a6::/64:
host1$ ip route add fc00:0:0:a6::/64 dev eth0
  1. On host2, I need to add a route to fc00::/64:
host2$ ip route add fc00::/64 dev wlan0

With these changes in place I can successfully ping fc00::a6:32:67:c9:23 from fc00::e:c6a6:aea4:

[root@host1 ~]# ip -6 addr show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    altname eno2
    altname enp0s31f6
    inet6 fc00::e:c6a6:aea4/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::ed9c:756f:92a:ef21/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

[root@host1 ~]# ip -6 route | grep -v fe80 ::1 dev lo proto kernel metric 256 pref medium fc00::/64 dev eth0 proto kernel metric 256 pref medium fc00:0:0:a6::/64 dev eth0 metric 1024 pref medium

[root@host1 ~]# ping -c2 fc00::a6:32:67:c9:23 PING fc00::a6:32:67:c9:23(fc00::a6:32:67:c9:23) 56 data bytes 64 bytes from fc00::a6:32:67:c9:23: icmp_seq=1 ttl=64 time=107 ms 64 bytes from fc00::a6:32:67:c9:23: icmp_seq=2 ttl=64 time=15.3 ms

--- fc00::a6:32:67:c9:23 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 15.287/61.178/107.070/45.891 ms

larsks
  • 34,737
  • Sorry, the ouput of ip -6 route was wrong, I edited it. Don't look at the 2001::... address, this address is a dummy one. – Jona Sep 16 '22 at 13:37
  • 1
    This answer is still accurate: your two IPv6 addresses are on different networks and you need to add explicit routes for this to work. – larsks Sep 16 '22 at 13:40
  • Is it a valid solution to change the IP from fc00::a6:32:67:c9:23 to fc00::32:67:c9:23 then ? – Jona Sep 16 '22 at 13:42
  • 1
    Sure, that puts the two addresses on the same network so that no additional routes will be necessary. – larsks Sep 16 '22 at 13:54
  • The IPv6 in the RPi was set with slaac hwaddr in /etc/dhcpcd.conf so I changed the IP on the other device from fc00::e:c6a6:aea4 to fc00::a6:0:e:c6a6:aea4 and it works ! Thank you. – Jona Sep 16 '22 at 14:09
  • If this answer helped you out, consider marking it "accepted" by checking the checkmark to the left of the question. – larsks Sep 16 '22 at 19:16