ipv6 ndptool for neighbor discovery

Solution 1:

ndptool is just a wrapper over Neighbor Discovery Protocol messages. So it allows only sending and receiving NDP messages. If I understand correctly the protocol messages (e.g. from How to: IPv6 Neighbor Discovery), an NA will be sent in response to an NS. Try monitoring for NAs in one window, and sending NSs in another, and you will see that a neighbor responds with an NA.

Example, assuming eth0 and a neighbor with 2001:db8::2:

  • in window A, run ndptool -t na -i eth0 monitor
  • in window B, run ndptool -t ns -i eth0 -D 2001:db8::2 send
  • in window A, observe NDP payload len 24, from addr: 2001:db8::2, iface: eth0 ...

If you need to know a neighbor's MAC address, try ndisc6

# ndisc6 2001:db8::2 eth0
Soliciting 2001:db8::2 (2001:db8::2) on eth0...
Target link-layer address: 02:42:AC:14:00:02
 from 2001:db8::2

or ip neighbor

# ip neigh show
2001:db8::2 dev eth0 lladdr 02:42:ac:14:00:02 STALE