Gratuitous ARP
Gratuitous ARP is an unsolicited ARP message that announces an IPv4 address and its link-layer address on a local network. It is commonly used to refresh neighbors after an address moves to another device.
Why an unsolicited announcement is useful
ARP normally starts with a device asking who owns a next-hop IPv4 address. An unsolicited announcement can instead tell neighbors that an address is associated with a particular MAC without waiting for that question. This is useful when an address moves between hosts or a device's link-layer address changes.
The term gratuitous ARP is used for more than one packet form. RFC 5227 defines an ARP Announcement as a broadcast ARP Request whose sender and target protocol addresses both contain the announced IPv4 address. Some systems also use unsolicited ARP Replies. Inspect the actual packet fields rather than assuming the name specifies one opcode.
Virtual-IP failover example
A service has virtual address 192.0.2.100. Initially, node A handles traffic for it, and clients cache node A's MAC address.
- The service's failover mechanism selects node B.
- Node B is configured to handle the virtual address.
- An announcement associates
192.0.2.100with the MAC used by the new owner. - Neighbors that accept the update can send subsequent frames to the new location.
These announcements stay within the local broadcast domain. They do not advertise an IP prefix across routers or prove that the application behind the virtual address is healthy.
Announcement versus probe
An IPv4 Address Conflict Detection probe is different: it uses sender IP 0.0.0.0 while checking whether a candidate address is in use. An announcement claims an address after that stage. Treating both as identical makes packet captures harder to interpret.
Observe the behavior
These read-only Linux commands show cached mappings and capture ARP traffic. Packet capture normally requires appropriate privileges:
ip -4 neigh show
sudo tcpdump -ni eth0 arp
Look at Ethernet source, ARP sender address, ARP sender hardware address and opcode together. Interface names vary.
Common confusions
An announcement does not force every neighbor to update. Host settings, inspection features and network security policy can affect acceptance. Gratuitous ARP is also specific to IPv4 ARP behavior; an IPv6 failover design uses Neighbor Discovery mechanisms instead.