For many years I knew that in order to start sending traffic to some destination on the network in most cases a host needs to resolve IP address to a physical address. And of course saw ARP packets in Wireshark captures, but didn't pay to much attention to them. And only a couple of years ago some I started asking some questions about the way ARP works.
I was looking into different Network Load Balancing and HA solutions, software ones like BalanceNG and hardware ones like old Nortel Alteons. Most of them are based on playing with MAC addresses transitioning, virtual MACs and virtual IPs. The details of the router redundancy protocols are not relevant in this case, what's important is that after a failover has occurred traffic destined to a failed node's MAC address will not reach the destination. The hosts should somehow re-resolve the MAC for the virtual IP. And as you know hosts keep an ARP cache which is there for a reason. So how does the failover occur almost seamlessly then? That was the question I had at the time.
The answer is a Gratuitous ARP packet. In simple terms this broadcast packet refreshes hosts' ARP cache and allows to immediately switch from using old MAC for some IP to a new MAC. In this post I will mostly collect quotes from standards related to the gratuitous ARP packets.