We have discussed the traditional ARP and Proxy ARP is my previous posts.
ARP – Hosts request other host’s MAC address.
Proxy-ARP – Hosts request other host’s MAC address but other hosts belong to a different network and a node sits between source and destination to answers on behalf of the destination host.
What is Gratuitous ARP?
It is a special type of Broadcast ARP Response and used in advance network scenarios. ARP Reply is not a response to an ARP request, It’s a way for a host to update or announce its IP to MAC mapping to other hosts in the network.
If a node receives ARP reply that means another host on the network has got the same IP address as configured on your device. It is used to make sure that no other nodes on the network have the same IP address.
It is something which is generated by a node while booting up. When the node boots up for the first time then It automatically sends Gratuitous ARP broadcast to the entire network.
In the ARP Reply packet, The source and destination IP address are both set to the same IP of the node, The destination MAC address is the Ethernet broadcast address (ffff.ffff.ffff).
Proxy ARP Use Cases:-
1 – Redundancy – Use to announce the secondary Device’s mac address if primary fails
2 – Updating ARP Mapping table if any change in MAC address of the host
3- To detect duplicate IPv4 address in the same network
4 -They inform the switch to update the MAC table to transmit data to another side
First Use case in LAN:-
The second use case in Redundant Network:-
It’s about the behaviour in the redundant network. Gratuitous ARP is really important in the redundant network if any failover happens. To keep a constant connection to the gateway without making delay makes more sense.
Suppose we are running a redundant gateway protocol like HSRP, VRRP, GLBP. R1 is a primary device with 172.16.0.254 virtual IP. R1 and R2 both are sharing the same virtual IP and same virtual MAC address. R1 will announce Gratuitous ARP and let all the hosts know about it’s virtual MAC address.
The switch will update the MAC address table along with the port number and virtual MAC address on port 1 and then All traffic will pass through R1.
Now if any failure occurs on R1 and it is no longer available to serve all the Hosts. R2 becomes primary and sends gratuitous ARP not for the sake of updating host’s ARP table, but for the sake of updating the switch’s MAC address table so that switch can decide which port is correctly associated to shared MAC (0000.0c9f.f00a) address.
Now Switch doesn’t have to wait for the MAC address table to get aged out. Instead, the switch will update the MAC address table immediately once It hears Gratuitous ARP from other port.
Traffic will get redirected to R2 from all the Hosts and switch will forward the frame on the correct port. In the above post, we have learnt how a Gratuitous ARP works in the redundant network and helps switch to learn new location of the shared MAC address.
I hope this has been informative for you. If it seems helpful then Like, Share and Don’t forget to subscribe to my channel