ARP cache

ARP cache

The arp table or arp cache keeps track of all devices on your network that your computer is capable of communicating with. It stores the Layer 2 data ( MAC addresses ) as well as the interface in which the device is connected through (i.e. which interface the traffic came in on ). This table can be viewed, modified, flushed using the arp command in Linux

View Arp Cache Entries

arp -n

The output will something like the following.

Address                  HWtype  HWaddress           Flags Mask            Iface             ether   00:22:aa:63:88:3f   C                     eth0

Add Static Arp Entry

To add an arp entry we can use the following arp command.

arp -i eth0 -s de:aa:bb:ef:fe:eg

Remove Entry From Arp Cache

To remove an entry we can use the below command

 arp -i <if>] -d  <host>

Some example usages are given below

 arp -i eth0 -d
 arp -d

Flush all arp cache entries

 ip neigh flush all --> Flush all arp entires
 ip -s -s neigh flush all --> For verbose output 
 ip neigh flush --> Flush arp entry for host


  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: