arp
Linux · Network · reference only
What it does
Shows and modifies the ARP cache, which maps IP addresses to MAC addresses of hosts on your local network.
Syntax
arp [opciones] [equipo]
Options and parameters
-aShows all entries in BSD format.
-nShows numeric addresses, without resolving names.
-d equipoRemoves that host's entry.
-s equipo macAdds a static entry.
-i interfazLimits the operation to that interface.
-vShows more detail.
Usage examples
arp -aLists the local network hosts your machine knows.
arp -nShows the cache with numeric IP addresses.
sudo arp -d 192.168.1.20Deletes that host's entry so it is discovered again.
sudo arp -s 192.168.1.20 aa:bb:cc:dd:ee:ffSets a host's MAC address by hand.
Notes and common mistakes
- It belongs to the net-tools package; the modern equivalent is ip neigh.
- It only sees local network hosts you have already communicated with.