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          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 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
arp -d

Clearing arp cache with verbose

ip -s -s neigh flush all


Author: vishnulinux

Linux admin

5 thoughts on “How to clear ARP cache”

  1. LUL to … liluinux …
    windows command: arp -ad will flush entire arp cache with the … ARP PROGRAM
    linux command ip -s -s -blablabla (long and … LONG) also won’t clear “incomplete” entries
    alternative to that ip command ALSO LONG AND … LONG ^^
    for ip in `arp -an| cut -d\( -f2 |cut -d\) -f1` ; do arp -d $ip ; done

    so, since when windows networking stuff is better than linux one ? 😀

    thanks for your post anyway, it is good, but i have no intention whatsoever to memorize such long stuff 😛

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s