ARP (Address Resolution Protocol) explained

Hello Juan

It is true that ARP entries by default are kept in the ARP table for four hours. As you mentioned very correctly, this can be a problem if you install a new PC with the same IP address. Other cases where this could be a problem is if a server has a backup NIC card and the first fails, the backup will have the same IP address but a different MAC address.

In order to solve these issues, we use something called a Gratuitous ARP.

Gratuitous ARP is a sort of “advance notification”, it updates the ARP cache of other systems before they ask for it (no ARP request) or to update outdated information. More information about Gratouitous ARP can be found at RFC 5227.

The gratuitous ARP packet has the following characteristics:

* Both source and destination IP in the packet are the IP of the host issuing the gratuitous ARP
* The destination MAC address is the broadcast MAC address (ff:ff:ff:ff:ff:ff)
* This means the packet will be flooded to all ports on a switch
* No reply is expected

Gratuitous ARP is used for some reasons:

* Update ARP tables after a MAC address for an IP changes (failover, new NIC, etc.)
* Update MAC address tables on L2 devices (switches) that a MAC address is now on a different port
* Send gratuitous ARP when interface goes up to notify other hosts about new MAC/IP bindings in advance so that they don’t have to use ARP requests to find out

I hope this has been helpful!

Laz