ARP Table

[!important]
ARP Table starts empty and gets populated when needed

Store ip address -> mac address

Read the arp table

Cisco switch

show arp

For cisco, the age column will show that the ARP is removed after a certain time to prevent old information occupied space

Martha#show arp  
Protocol  Address         Age (min)     Hardware Addr  Type  Interface  
Internet  10.158.43.34           2     0002.6779.0f4c  ARPA  Ethernet0  
Internet  10.158.43.1            -     0000.0c0a.2aa9  ARPA  Ethernet0  
Internet  10.158.43.25          18     00a0.24a8.a1a5  ARPA  Ethernet0  
Internet  10.158.43.100          6     0000.0c0a.2c51  ARPA  Ethernet0

By default, cisco router holds ARP for 4 hours (14400 seconds). This can be changes by:

Martha(config)# interface ethernet 0  
Martha(config-if)# arp timeout 1800

To set an ARP permanently, we can run the following command

Martha(config)# arp 172.21.5.131 0000.00a4.b74c snap

This will add the IP with MAC address and the protocol is SNAP (Subnetwork Access Protocol)

To force clear all dynamic entry from ARP table, we can run

clear arp-cache

Linux / windows

arp -a -n

-n is to not resolve DNS (faster)