Manipulate ARP and neighbor discovery caches

Author: name contact BSD flavour

Reviewer: name contact BSD flavour

Reviewer: name contact BSD flavour


Understand basic ARP(((ARP))) theory as well as the neighbor discovery cache(((neighbor discovery cache))) used on IPv6(((IPv6))) networks. Be able to view, modify and clear these caches and recognize when it is necessary to do so.


arp: address resolution display and control

ndp: control/diagnose IPv6 neighbor discovery protocol

how arp works:

machine1 asks broadcast "who has x.x.x.x?"

broadcast request gets forwarded to all listeners

machine2 answers broadcast request with "machine2 has x.x.x.x"

view arp cache:

""arp -a ""ndp -a

modify arp cache:

""arp -s hostname ether_addr (adds arp entry) ""arp -d hostname (deletes arp entry) ""ndp -s nodename ether_addr [temp] [proxy] ""ndp -d hostname

clear arp cache:

""arp -d -a (combining -d[elete] with -a[ll] deletes all entries) ""ndp -c (erases all ndp entries)


Practice Exercises

More information

arp(8), ndp(8)