Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NbrMgr::setNeighbor doesn't work for IPv6 #22014

Open
stephenxs opened this issue Mar 12, 2025 · 0 comments
Open

NbrMgr::setNeighbor doesn't work for IPv6 #22014

stephenxs opened this issue Mar 12, 2025 · 0 comments
Labels

Comments

@stephenxs
Copy link
Collaborator

stephenxs commented Mar 12, 2025

NbrMgr::setNeighbor doesn't work for IPv6.
Step to reproduce the issue

  1. Configure an IPv6 address on an interface: config interface ip add Ethernet0 2001:1::2/64
  2. Configure an IPv6 routing with the IPv6 address configured in step 1 as the next hop: config route add prefix 2001::/64 nexthop 2001:1::1

SONiC will eventually resolve the neighbor of 2001:1::2 in function NbrMgr::setNeighbor. However, the NS packet isn't sent.
The neighbor can be resolved correctly using ping command.

The same flow works for IPv4.

IPv6 debug information

admin@sonic:~$ sudo config interface ip add Ethernet0 2001:1::2/64
admin@sonic:~$ sudo config  route add prefix 2001::/64 nexthop 2001:1::1

admin@sonic:~$ ip monitor dev Ethernet0
561: Ethernet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9100 qdisc fq_codel state UP group default 
    link/ether ec:0d:9a:55:55:38 brd ff:ff:ff:ff:ff:ff permaddr ec:0d:9a:55:56:28
2001:1::/64 proto kernel metric 256 pref medium
561: Ethernet0    inet6 2001:1::2/64 scope global tentative 
       valid_lft forever preferred_lft forever
561: Ethernet0    inet6 2001:1::2/64 scope global 
       valid_lft forever preferred_lft forever
local 2001:1::2 table local proto kernel metric 0 pref medium
anycast 2001:1:: table local proto kernel metric 0 pref medium
id 22 dev Ethernet0 scope link proto zebra 
id 161 via 2001:1::1 dev Ethernet0 scope link proto zebra 
2001::/64 nhid 161 via 2001:1::1 proto 196 metric 20 pref medium
2001:1::1 FAILED 

admin@sonic:~$ sudo tcpdump -i Ethernet0
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on Ethernet0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
11:57:51.487499 LLDP, length 230: sonic
11:57:55.234653 LLDP, length 178: server
11:58:03.675627 IP6 fe80::ee0d:9aff:fe55:5538 > ff02::16: HBH ICMP6, multicast listener report v2, 4 group record(s), length 88
11:58:03.859619 IP6 fe80::ee0d:9aff:fe55:5538 > ff02::16: HBH ICMP6, multicast listener report v2, 4 group record(s), length 88
11:58:07.282305 IP6 fe80::ee0d:9aff:fe55:5538 > ff02::1:ff00:1: ICMP6, neighbor solicitation, who has 2001:1::1, length 32
11:58:08.307628 IP6 fe80::ee0d:9aff:fe55:5538 > ff02::1:ff00:1: ICMP6, neighbor solicitation, who has 2001:1::1, length 32
11:58:09.331633 IP6 fe80::ee0d:9aff:fe55:5538 > ff02::1:ff00:1: ICMP6, neighbor solicitation, who has 2001:1::1, length 32
11:58:21.489894 LLDP, length 230: sonic
11:58:25.265679 LLDP, length 178: server
11:58:51.496345 LLDP, length 230: sonic
11:58:55.296506 LLDP, length 178: server
11:59:21.501980 LLDP, length 230: sonic
11:59:25.327515 LLDP, length 178: server
11:59:51.506511 LLDP, length 230: sonic
11:59:55.353817 LLDP, length 178: server

IPv4 debug information

admin@sonic:~$ sudo config interface ip add Ethernet504 4.1.1.2/24
admin@sonic:~$ sudo config  route add prefix 4.0.0.0/8 nexthop 4.1.1.1

admin@sonic:~$ ip monitor dev Ethernet504
632: Ethernet504    inet 4.1.1.2/24 brd 4.1.1.255 scope global Ethernet504
       valid_lft forever preferred_lft forever
local 4.1.1.2 table local proto kernel scope host src 4.1.1.2 
broadcast 4.1.1.255 table local proto kernel scope link src 4.1.1.2 
4.1.1.0/24 proto kernel scope link src 4.1.1.2 
id 142 dev Ethernet504 scope link proto zebra 
id 163 dev Ethernet504 scope host proto zebra 
id 165 via 4.1.1.1 dev Ethernet504 scope link proto zebra 
4.0.0.0/8 nhid 165 via 4.1.1.1 proto 196 metric 20 
4.1.1.1 FAILED 

admin@sonic:~$ sudo tcpdump -i Ethernet504
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on Ethernet504, link-type EN10MB (Ethernet), snapshot length 262144 bytes
12:02:51.948731 LLDP, length 233: moose
12:02:55.997680 LLDP, length 178: server
12:03:12.158391 ARP, Request who-has ae31-419.bar2.saltlakecity1.level3.net tell pathgroup.car1.nashville1.level3.net, length 28
12:03:13.175606 ARP, Request who-has ae31-419.bar2.saltlakecity1.level3.net tell pathgroup.car1.nashville1.level3.net, length 28
12:03:14.195615 ARP, Request who-has ae31-419.bar2.saltlakecity1.level3.net tell pathgroup.car1.nashville1.level3.net, length 28
12:03:21.953817 LLDP, length 233: moose
^C
6 packets captured
6 packets received by filter
0 packets dropped by kernel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants