Latest

Understanding Gratuitous ARP: What It Is and How It Works

Understanding Gratuitous ARP: What It Is and How It Works 

The ARP known as gratuitous ARP is used to notify the network of changes to IP to MAC mappings. In other terms, it enables a node to update other devices with its IP-MAC mappings. There is simply Gratuitous ARP Reply, which requires no request to be issued.

Use Cases 

1. When devices boot up, they send a Gratuitous ARP to the rest of the network, announcing their presence.

2. If a user manually changes their MAC address; they keep the same IP address but have a different MAC address. As a result, the ARP mapping for all nodes that communicate with this user needs to be modified.

3. If a node's IP to MAC mapping changes (like wise in GLBP/HSRP Scenario), it can perform a Gratuitous ARP to update the ARP mapping of all other hosts on the network.

Scenario using GARP in HSRP/GLBP setup

Usually, GARP is utilized for VIPs and network HA. The backup node will issue a GARP to all nodes letting them know the VIP's mac address as soon as the active node fails and takes over.

Understanding Gratuitous ARP
Fig 1.1- Understanding Gratuitous ARP

The optimal gratuitous ARP request has the destination MAC set to 
(ff:ff:ff:ff:ff;ff:ff), and the source and destination IPs set to the IPs of the machine making the request.

As far as arp is concerned, a device sends a request, and another device replies. The device transmits a reply in a gratuitous arp without acknowledging a request. Upon booting up, certain devices broadcast their presence on the network to other devices using gratuitous arp. An arp response (gratuitous arp) is sent by many devices when their IP address is changed. Systems can identify duplicate addresses in a network by looking for IPv4 address conflicts that arise when a gratuitous ARP reply is received.

The IP addresses of the host issuing the gratuitous ARP are the packet's source and destination IP addresses. The gratuitous ARP broadcasts, to the entire network, a node's IP to MAC mapping together with its destination MAC address (ff:ff:ff:ff:ff;ff:ff).

Assume we're using a redundant gateway protocol GLBP with 10.10.10.1 is the virtual IP address of the Primary Router. The primary and secondary routers have the same virtual IP address and virtual MAC address. All hosts will be alerted of Primary's virtual MAC address using Gratuitous ARP.

Understanding Gratuitous ARP
Fig 1.2- Understanding Gratuitous ARP

If the primary router fails and is unable to serve all hosts. As a result, the secondary router becomes the primary router and sends gratuitous ARPs to update the switch's MAC address table rather than the host's ARP table, allowing it to establish which port is appropriately linked with the shared MAC address.

As a result, Switch does not have to wait for the MAC address table to expire. When the switch receives Gratuitous ARP from another port, it will immediately update the MAC address database.

All host traffic will be diverted to the secondary router, and the switch will send the frame to the appropriate port. We saw how Gratuitous ARP works in a redundant network to help switches learn the changing locations of shared MAC addresses.

we can deduce that all other devices in the local area network (LAN) must be notified of the change in IPv4 address, as there may be MAC address to inaccurate previous IPv4 address mappings inside their ARP tables. A TCP/IP device utilizes gratuitous ARP to notify other devices on the Local Area Network (LAN) about changes to its MAC address or IPv4 address. Because the destination MAC address is the broadcast MAC address, the switch will send Gratuitous ARP packets to all of its linked ports.

Free Tools...