Configuring ARP-Ping
Context
ARP-Ping includes ARP-Ping IP and ARP-Ping MAC. ARP-Ping is used to check whether a specified IP address or MAC address is used by sending ARP Request packets or ICMP Request packets.
ARP-Ping IP
ARP-Ping IP checks whether an IP address is being used by another device on a LAN by sending ARP packets.
The ping command can also do this. However, if the device already using the IP address is forbidden to respond to ping packets because of a firewall, the ping command will not discover that the IP address is already in use. The ARP-Ping IP feature resolves this problem by sending ARP Request packets, that are not blocked by the firewall.
ARP-Ping MAC
When you know a specific MAC address but not the corresponding IP address on a network segment, you can use ARP-Ping MAC to obtain the IP address through an ICMP packet (Layer 3).
Procedure
- Run the arp-ping ip ip-address [ timeout time-out-value ] [ interface interface-type interface-number ] command to check whether the IP address is being used through an ARP packet in the LAN. If the IP address is being used, you can query the MAC address corresponding to the IP address.
If the following information is displayed, the IP address is not used.
<HUAWEI> arp-ping ip 10.1.1.2 ARP-Pinging 10.1.1.2: Error: Request timed out. Error: Request timed out. Error: Request timed out. Info: The IP address is not used by anyone!
If the following information is displayed, the IP address is being used.
<HUAWEI> arp-ping ip 10.1.1.1 ARP-Pinging 10.1.1.1: 10.1.1.1 is used by 00e0-517d-f202
- Run the arp-ping mac mac-address { ip-address [ vpn-instance vpn-instance-name ] | interface interface-type interface-number[.subinterface-number ] } command to check whether the MAC address is being used. If the MAC address is used, you can query the IP address corresponding to the MAC address.
If the following information is displayed, the MAC address is not being used.
<HUAWEI> arp-ping mac 00e0-517d-f201 interface gigabitethernet 1/0/1 OutInterface: GigabitEthernet1/0/1 MAC[00-E0-51-7D-F2-01], press CTRL_C to break Error: Request timed out. Error: Request timed out. Error: Request timed out. ----- ARP-Ping MAC statistics ----- 3 packet(s) transmitted 0 packet(s) received MAC[00-E0-51-7D-F2-01] not be used
If the following information is displayed, the MAC address is being used.
<HUAWEI> arp-ping mac 00e0-517d-f202 interface gigabitethernet 1/0/1 OutInterface: GigabitEthernet1/0/1 MAC[00-E0-51-7D-F2-02], press CTRL_C to break ----- ARP-Ping MAC statistics ----- 1 packet(s) transmitted 1 packet(s) received IP ADDRESS MAC ADDRESS 10.1.1.1 00-E0-51-7D-F2-02