Lesson 7 of 9 · 25m
Debugging Neighbor Discovery and Local-Link Behavior
Use cache state, packet captures, and scoped commands to separate address resolution, duplicate detection, and local routing failures.
When IPv6 fails on a local segment, operators often reach for DNS first. Usually the problem is lower: no router advertisement, no neighbor resolution, duplicate address detection failure, or link-local confusion. IPv6 replaced ARP with Neighbor Discovery over ICMPv6, and that changes what you inspect.
Start with the interface's own truth
Check addresses, routes, and neighbor state before touching the application:
ip -6 addr show dev eth0
ip -6 route show dev eth0
ip -6 neigh show dev eth0A healthy neighbor entry may look like:
fe80::1 lladdr 52:54:00:12:34:56 router REACHABLE
2001:db8:1112:4001::1 lladdr 52:54:00:12:34:56 router STALESTALE is not automatically bad; it means the entry has not been recently confirmed. FAILED during active communication is a stronger signal.
Watch the actual discovery exchange
Use tcpdump on the interface, not assumptions:
sudo tcpdump -ni eth0 'icmp6 and (ip6[40] == 135 or ip6[40] == 136 or ip6[40] == 133 or ip6[40] == 134)'If you see solicitations without advertisements, layer-2 delivery, switch security features, or the target host firewall may be broken. If you see advertisements but the cache does not update, validate interface state, sysctl acceptance settings, and whether the target address is actually on-link.
Mind router and interface acceptance controls
Linux exposes controls such as:
sysctl net.ipv6.conf.eth0.accept_ra
sysctl net.ipv6.conf.eth0.accept_ra_defrtr
sysctl net.ipv6.conf.eth0.forwardingIf forwarding is enabled, many distributions stop accepting router advertisements by default because a router is expected to know its own routing. Accidentally enabling forwarding on a host can therefore remove its default IPv6 route. This is one of the most common "IPv6 disappeared" causes on Linux systems that also run containers or virtualization.
Scoped troubleshooting matters
For link-local tests, include the zone:
ping -6 -c3 fe80::1%eth0Without %eth0, the command may fail even though the neighbor and link are healthy. For global tests, use the full global destination and compare route selection with:
ip -6 route get 2001:db8:1112:4001::1Field notes
- Neighbor cache entries are timing-sensitive; a single
ip neigh showis a snapshot, not a diagnosis. - Bridge, bonding, VPN, and container interfaces often have different
accept_raor forwarding behavior than the physical interface. - tcpdump may show multicast control traffic even when unicast forwarding is broken; verify both planes.
- A
tentativeaddress often means Duplicate Address Detection has not completed; look for loops, broken bridging, or devices answering solicitations they should not answer. - Do not disable IPv6 as the first fix. That hides the root cause and makes the eventual deployment more dangerous.
Was this lesson helpful?