Configuring ARP-Ping
ARP-Ping includes ARP-Ping IP and ARP-Ping MAC. ARP-Ping sends ARP Request packets or ICMP Request packets to check whether a specified IP address or MAC address is used.
Context
ARP-Ping IP
ARP-Ping IP checks whether an IP address is used by another device on a LAN by sending ARP packets.
You can also run the ping command to check whether an IP address is used by another device on the network. When the destination host or router configured with firewall is disabled from responding to ping packets, there is no response to ping packets. As a result, the destination host or router incorrectly considers the IP address idle. ARP is a Layer 2 protocol. In most cases, ARP packets can pass through the firewall that is disabled from replying to the ping packets to prevent the preceding situation.
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 used through an ARP packet in the LAN. If the IP address is used, you can query the MAC address mapping 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 used.
<Huawei> arp-ping ip 10.1.1.1 ARP-Pinging 10.1.1.1: 10.1.1.1 is used by 00e0-fc7d-f202
- Run the arp-ping mac mac-address { ip-address [ vpn-instance vpn-instance-name ] | interface interface-type interface-number } command to check whether the MAC address is used. If the MAC address is used, you can query the IP address mapping the MAC address.
If the following information is displayed, the MAC address is not used.
<Huawei> arp-ping mac 00e0-fc7d-f201 interface gigabitethernet 1/0/0 OutInterface: GigabitEthernet1/0/0 MAC[00-E0-FC-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-FC-7D-F2-01] not be used
If the following information is displayed, it means that the MAC address is used.
<Huawei> arp-ping mac 00e0-fc7d-f202 interface gigabitethernet 1/0/0 OutInterface: GigabitEthernet1/0/0 MAC[00-E0-FC-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-FC-7D-F2-02