ARP Cache in Linux


You know whenever you contact another machine either by using IP address or FQDN, its hardware address (MAC address) get mapped inside your machine using ARP (Address Resolution Protocol).

You can view the current ARP cache using – arp -a command. Which you have mastered in your Red Hat Linux Training.

But there are couple of more methods to view the ARP cache. Like you can use:

cat /proc/net/arp
ip neighbor list

to view the same ARP cache entries.

Though need not to be done manually, as its been control by the Linux kernel (at this stage) you can, if you wish manually flush the ARP cache using:

ip neighbor flush dev eth0

command. Just replace eth0 with your respective interface.

Here is a small illustration from my machine.

Understanding ARP cache in Linux

Understanding ARP cache in Linux