16

In IPv4 world, when you want to talk to another computer, you ask which MAC address claims a given IPv4 address, the arp who-has ... tell ... exchange as per tcpdump, and a cache of such mappings from IPv4 to MAC addresses is usually available though arp -an.

What about IPv6, with manual configuration? IPv6 addresses don't show up on arp -an.

How does one computer discover another one over IPv6 within the same prefix?

cnst
  • 2,435
  • 6
  • 28
  • 45

2 Answers2

17
ip -6 neigh show 

Above command is to check arp table for ipv6

Vijay S B
  • 283
  • 2
  • 5
  • This should be the accepted answer, as the ndp command provided in the other answer doesn't exist in Linux (at least not in Debian and Red Hat based ones) – Alan Evangelista Jul 31 '21 at 09:46
9

Neighbor Discovery Protocol (NDP) is the IPv6 equivalent of the Address Resolution Protocol (ARP), and on the Unix flavors I'm most familiar with (mostly BSDs) the ndp(8) command is the IPv6 equivalent of the arp(8) command.

The command-line options for ndp are often the same as for arp, so ndp -an does exactly what you'd expect.

Spiff
  • 101,729
  • 17
  • 175
  • 229
  • 12
    And `ip -6 neigh` under Linux. See [this question](http://superuser.com/questions/374440/ndp-entries-on-linux) – Dubu Jul 19 '13 at 09:46