Configuring ARP-Ping
ARP-Ping is classified as ARP-Ping IP or ARP-Ping MAC.
Usage Scenario
Before configuring an IP address for a device on a LAN, run the arp-ping ip command to check whether the IP address to be configured is being used by another device on the network.
The ping command can also be used to check whether this IP address is used by another device on the network. If the destination host and the Router that are enabled with the firewall function are configured not to reply to ping packets, the destination host and the Router do not reply to ping packets. This means that the ping always fails and the IP address mistakenly considered available. To resolve this problem, use the ARP-Ping IP feature. ARP packets are Layer 2 protocol messages and, in most cases, can pass through a firewall configured not to respond to ping messages.
When a device knows a specific MAC address on a network segment but does not know the corresponding IP address, the arp-ping mac command can be run on the device to broadcast ICMP packets to obtain the corresponding IP address.
Configuring ARP-Ping IP
ARP-Ping IP sends ARP packets onto a LAN to check whether an IP address is being used by another device on the LAN.
Procedure
- Run arp-ping ip ip-host [ interface interface-type interface-number [ vlan-id vlan-id ] ] [ timeout timeout ]
ARP-Ping IP is enabled to check whether an IP address is being used by another device.
Result
There are two possible results after the command is run:
If the IP address is not being used by another device, the command output is as follows:
[*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 The IP address is not used by anyone!
If the IP address is being used by another device, the command output is as follows:
[*HUAWEI] arp-ping ip 10.1.1.1
ARP-Pinging 10.1.1.1: 10.1.1.1 is used by 00e0-fc7d-f202
Configuring ARP-Ping MAC
ARP-Ping MAC sends ICMP packets onto a LAN to check whether a MAC address is used by another device on the LAN.
Procedure
- Run arp-ping mac mac-address { ip-address [ vpn-instance vpn-instance-name ] | interface interface-type interface-number }
ARP-Ping MAC is enabled to check whether a MAC address is being used by another device.
There are two possible results after the command is run:
If the MAC address is not being used by another device, the command output is as follows:
[*HUAWEI] arp-ping mac 00e0-fc7d-f201 interface gigabitethernet 0/1/0
OutInterface: GigabitEthernet0/1/0 MAC[00-E0-FC-7D-F2-01], press CTRL_C to break Request timed out Request timed out 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 MAC address is being used by another device, the command output displays the IP address corresponding to this MAC address. The command output is as follows:
[*HUAWEI] arp-ping mac 00e0-fc7d-f202 interface gigabitethernet 0/1/0
OutInterface: GigabitEthernet0/1/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