Gratuitous ARP after a failover: clearing a stale ARP entry
Configure gratuitous ARP on Windows and Cisco IOS and clear a stale ARP entry on a switch after a cluster failover.
After a failover (for example a SQL Server failover cluster or availability group listener moving to another node), clients and switches may keep a stale ARP entry that points to the old node's MAC address. Connections then fail until the entry expires. This note lists the usual mitigations and shows how to diagnose and clear the entry on a Cisco switch.
Send gratuitous ARP after a failover
On Windows, the number of gratuitous ARP requests sent when an address comes online is controlled by the ArpRetryCount registry value:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
ArpRetryCount = 3
Use the value 3, not 0. Reference: Failover cluster node not sending out gratuitous ARP requests after a failover.
On Cisco IOS, gratuitous ARP is enabled with the interface command:
ip gratuitous-arps
The registry value can be deployed with a Group Policy.
Workaround: static ARP entry
A static neighbor entry can be added on a Windows host:
netsh interface ipv4 add neighbors "Local Area Connection" 192.0.2.10 12-34-56-78-9a-bc
See the Microsoft article about deleting static ARP entries with netsh before relying on this.
Diagnose on a Cisco switch
Symptom: the cluster address does not answer to ping, and the switch ARP table still shows the old MAC address.
switch01#ping 192.0.2.11
Sending 5, 100-byte ICMP Echos to 192.0.2.11, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
switch01#sh ip arp | i 192.0.2.11
Internet 192.0.2.11 187 0050.56ad.8a05 ARPA Vlan40
switch01#sh mac address-table dynamic | i a5b2
40 0050.56ad.a5b2 dynamic ip,ipx,assigned,other Port-channel12
Clear the stale dynamic ARP entry for the address, then test again:
switch01#clear ip arp 192.0.2.11
switch01#ping 192.0.2.11
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
switch01#sh ip arp | i 192.0.2.11
Internet 192.0.2.11 2 0050.56ad.a5b2 ARPA Vlan40
The ARP entry now carries the MAC address of the new active node.