After the learning of gratuitous ARP packets is configured, a device adds the source IP address and source MAC address carried in gratuitous ARP packets to the dynamic ARP mapping table when no ARP entry matches the source IP address in ARP packets.
Before configuring gratuitous ARP, set the IP address of the interface enabled with gratuitous ARP. For details on how to set the IP address, see Overview of Interfaces.
If an ARP entry matches the source IP address of ARP packets, the device updates this dynamic ARP entry, regardless of the learning of gratuitous ARP packets.
system-view
interface interface-type interface-number
gratuitous-arp learn enable