ARP-Ping is classified as ARP-Ping IP or ARP-Ping MAC and is used to maintain a network on which Layer 2 features are deployed. ARP-Ping uses ARP messages to detect whether an IP or MAC address to be configured for a device is in use.
ARP-Ping IP
Before configuring an IP address for a device, check whether the IP address is being used by another device. Generally, the ping operation can be used to check whether an IP address is being used. However, if a firewall is configured for the device using the IP address and the firewall is configured not to respond to ping messages, the IP address may be mistakenly considered available. To resolve this problem, use the ARP-Ping IP feature. ARP messages are Layer 2 protocol messages and, in most cases, can pass through a firewall configured not to respond to ping messages.
ARP-Ping MAC
The host's MAC address is the fixed address of the network adapter on the host. It does not normally need to be configured manually; however, there are exceptions. For example, if a device has multiple interfaces and the manufacturer does not specify MAC addresses for these interfaces, the MAC addresses must be configured, or a virtual MAC address must be configured for a VRRP group. Before configuring a MAC address, use the ARP-Ping MAC feature to check whether the MAC address is being used by another device.
ARP-Ping IP
A device obtains the specified IP address and outbound interface number from the configuration management plane, saves them to the buffer, constructs an ARP request message, and broadcasts the message on the outbound interface. If the device does not receive an ARP reply message within a specified period, the device displays a message indicating that the IP address is not being used by another device. If the device receives an ARP reply message, the device compares the source IP address in the ARP reply message with the IP address stored in the buffer. If the two IP addresses are the same, the device displays the source MAC address in the ARP reply message and displays a message indicating that the IP address is being used by another device.
ARP-Ping MAC
The ARP-Ping MAC process is similar to the ping process but ARP-Ping MAC is applicable only to directly connected Ethernet LANs or Layer 2 Ethernet virtual private networks (VPNs). A device obtains the specified MAC address and outbound interface number (optional) from the configuration management plane, constructs an Internet Control Message Protocol (ICMP) Echo Request message, and broadcasts the message on all outbound interfaces. If the device does not receive an ICMP Echo Reply message within a specified period, the device displays a message indicating that the MAC address is not being used by another device. If the device receives an ICMP Echo Reply message within a specified period, the device compares the source MAC address in the message with the MAC address stored on the device. If the two MAC addresses are the same, the device displays the source IP address in the ICMP Echo Reply message and displays a message indicating that the MAC address is being used by another device.
ARP-Ping IP implementation
As shown in Figure 1, DeviceA uses ARP-Ping IP to check whether IP address 10.1.1.2 is being used. After DeviceA receives an ARP reply message from HostA with IP address 10.1.1.2, DeviceA displays the MAC address of HostA along with a message indicating that the IP address is in use by another host.
The ARP-Ping IP implementation process is as follows:
After IP address 10.1.1.2 is specified using the arp-ping ip command on DeviceA, DeviceA broadcasts an ARP request message and starts a timer for ARP reply messages.
After HostA on the same LAN receives the ARP request message, HostA finds that the destination IP address in the message is the same as its own IP address and sends an ARP reply message to DeviceA.
If DeviceA does not receive any ARP reply messages before the timer for ARP reply messages expires, it displays a message indicating that the IP address is not being used by any host.
A device cannot allow the arp-ping ip command to ping its own IP address, whereas the ping command allows this function.
ARP-Ping MAC implementation
As shown in Figure 2, DeviceA uses ARP-Ping MAC to check whether MAC address 00E0-FCE7-2EF5 is being used by another host. After receiving ICMP Echo Reply messages from all hosts on the network, DeviceA displays the IP address of the host with the MAC address 00E0-FCE7-2EF5 and displays a message indicating that the MAC address is being used by another host.
The ARP-Ping MAC implementation process is as follows:
After MAC address 00E0-FCE7-2EF5 is specified using a command on DeviceA, DeviceA broadcasts an ICMP Echo Request message and starts a timer for ICMP Echo Reply messages.
After receiving the ICMP Echo Request message, all the other hosts on the same LAN send ICMP Echo Reply messages to DeviceA.
If DeviceA does not receive any ICMP Echo Reply messages before the timer for ICMP Echo Reply messages expires, it displays a message indicating that the MAC address is not being used by any host.
ARP-Ping applies to directly connected Ethernet LANs or Layer 2 Ethernet VPNs.
ARP-Ping checks whether an IP or MAC address to be configured is being used, preventing address conflicts.