How to clear 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
192.168.1.100          ether   00:21:a0:63:38:3f   C                     eth0

Add Static Arp Entry

To add an arp entry we simply take advantage of the options that the arp command provides. Lets add an arbitrary entry.

arp -i eth0 -s 10.11.12.13 de:ad:be:ef:fe:ed

Remove Entry From Arp Cache

To remove an entry we can refer to the initial help output I pasted above.

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

Some example usages are given below

arp -i eth0 -d 10.11.12.13
arp -d 192.168.1.100

Clearing arp cache with verbose

ip -s -s neigh flush all

About these ads

4 thoughts on “How to clear ARP cache

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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