Score:0

Why can't I ping local IPv6 address?

de flag

OS: almalinux9

2610:150:c002::1:a563 is the IPv6 address of my local network card eno2.

[root@alpha ~]# ip addr show eno2
3: eno2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether b8:ca:3a:f9:54:f8 brd ff:ff:ff:ff:ff:ff
    altname enp1s0f1
    inet 192.168.3.242/29 brd 192.168.3.247 scope global noprefixroute eno2
       valid_lft forever preferred_lft forever
    inet6 2610:150:c002::1:a563/124 scope global tentative noprefixroute
       valid_lft forever preferred_lft forever
    inet6 fe80::baca:3aff:fef9:54f8/64 scope link tentative noprefixroute
       valid_lft forever preferred_lft forever

I can ping lo ::1:

[root@alpha ~]# ping ::1
PING ::1(::1) 56 data bytes
64 bytes from ::1: icmp_seq=1 ttl=64 time=0.081 ms
64 bytes from ::1: icmp_seq=2 ttl=64 time=0.173 ms
64 bytes from ::1: icmp_seq=3 ttl=64 time=0.071 ms
64 bytes from ::1: icmp_seq=4 ttl=64 time=0.080 ms

But I can't ping 2610:150:c002::1:a563:

[root@alpha ~]# ping6 2610:150:c002::1:a563
PING 2610:150:c002::1:a563(2610:150:c002::1:a563) 56 data bytes
^C
--- 2610:150:c002::1:a563 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3063ms

Here is the result of command ip -6 route

[root@alpha ~]# ip -6 route
::1 dev lo proto kernel metric 256 pref medium
2610:150:c002::1:a560/124 dev eno2 proto kernel metric 104 linkdown pref medium
fe80::/64 dev vnet0 proto kernel metric 256 pref medium
fe80::/64 dev vnet1 proto kernel metric 256 pref medium
fe80::/64 dev vnet3 proto kernel metric 256 pref medium
fe80::/64 dev vnet4 proto kernel metric 256 pref medium
fe80::/64 dev vnet8 proto kernel metric 256 pref medium
fe80::/64 dev vnet9 proto kernel metric 256 pref medium
fe80::/64 dev vnet10 proto kernel metric 256 pref medium
fe80::/64 dev vnet13 proto kernel metric 256 pref medium
fe80::/64 dev vnet16 proto kernel metric 256 pref medium
fe80::/64 dev vnet17 proto kernel metric 256 pref medium
fe80::/64 dev vnet18 proto kernel metric 256 pref medium
fe80::/64 dev vnet26 proto kernel metric 256 pref medium
fe80::/64 dev eno2 proto kernel metric 1024 linkdown pref medium
default via 2610:150:c002::1:a561 dev eno2 proto static metric 104 linkdown pref medium
[root@alpha ~]#
[root@alpha ~]# ip route
default via 192.168.3.241 dev eno1 proto static metric 101
192.168.3.240/29 dev eno1 proto kernel scope link src 192.168.3.242 metric 101
192.168.3.240/29 dev eno2 proto kernel scope link src 192.168.3.243 metric 104 linkdown
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1
[root@alpha ~]#

Here is the result of command ip route get 2610:150:c002::1:a563

[root@alpha ~]# ip route get 2610:150:c002::1:a563
2610:150:c002::1:a563 dev eno2 proto kernel src ::1 metric 102 pref medium
[root@alpha ~]#

Can anyone help me. grateful.

ng flag
Can you edit your question to include the output of `ip -6 route`? Plus, you have a 124 bit subnet mask? It's very unlikely you intended that.
djdomi avatar
za flag
please also read carefully [ask] there's a lot of missing
A.B avatar
cl flag
A.B
I notice the interface has NO-CARRIER and the route confirms with linkdown. No link, no connectivity? (also, not using /64 will probably give additional issues)
Joshua Shaw avatar
de flag
Yes, this is a network card without a network cable. But the ipv6 I pinged is the address of the network card itself. For ipv6, if I don't plug in the network cable, can't I ping my own ipv6? Because I am a novice in ipv6. If the network card is not plugged in with a network cable, the ipv4 address of the network card should be able to be pinged by itself.
A.B avatar
cl flag
A.B
Ah never mind. The problem is not solved. But... what is the result of this command then? `ip route get 2610:150:c002::1:a563`. If there's no route, that's a routing problem (yet to be solved), if there's a route through the lo interface, then that's probably a *firewall* problem.
Joshua Shaw avatar
de flag
2610:150:c002::1:a563 is the address on the network card, just like 192.168.3.243. These two addresses are bound to a network card. But 192.168.3.243 can be pinged, 2610:150:c002::1:a563 cannot be pinged. I also listed the routing table for ipv4 above. For the local address, is there a routing policy on the routing table? Because there is no routing policy for 192.168.3.243 and 192.168.3.242 on the routing table of ipv4
A.B avatar
cl flag
A.B
But **again**, can you give the result of this command? `ip route get 2610:150:c002::1:a563`? Don't add IPv4 in the problem. The question is about IPv6.
Joshua Shaw avatar
de flag
here is the result [root@alpha ~]# ip route get 2610:150:c002::1:a563 2610:150:c002::1:a563 dev eno2 proto kernel src ::1 metric 102 pref medium [root@alpha ~]#
Score:3
cn flag

tentative flag on iproute on Linux output implies duplicate address detection (DAD) has not happened. For you this is both the address in question and your link local. On IPv6, a standard DAD exists, and the network stack should not pass traffic until this happens. IPv6 prevents difficult to troubleshoot duplicate address problems, unlike IPv4.

linkdown and NO-CARRIER means the associated interface is not available due to media unplugged or similar. As you said in comments.

Starting with the obvious option and going more advanced:

Plug the NIC in and bring it up to let DAD finish. Its not that the network stack doesn't know its own addresses, but is doing a safe action. Like in distributed systems, do not trust you have a unique user provided ID until you ask your peers.

Set the address on some other up interface. Without more context in what you are doing, difficult to say what exactly. Could be some other ethernet physical or virtual, could be a loopback.

Disable DAD on the interface. A return to the bad old days of duplicate address, only recommended if you know for sure there are no duplicates on link.

Further reading: some blog post on DAD.

Tom Yan avatar
in flag
To state the obvious, while an ipv6 address is still `tentative`, no local route for it will be added to the route table `local`, so the traffic won't get looped back to the host itself.
Joshua Shaw avatar
de flag
Thank you so much. As you said. This problem is indeed caused by the network cable not being plugged in. Unlike IPV4, in IPV6, if the network cable is not plugged in. I can't ping the IPV6 address. Because the server is in IDC, I spent some time communicating with them and asked them to help plug in the network cable. After the network cable was plugged in, all problems were solved. Thank you so much.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.