The arp-ping ip command configures a device on a LAN to send Address Resolution Protocol (ARP) messages to check whether an IP address is used by another device.
Parameter | Description | Value |
---|---|---|
ip-host |
Specifies a destination IP address or host name. |
If the value is an IP address, it is in dotted decimal notation. If the value is a host name, it is a string of 1 to 255 case-sensitive characters, spaces not supported. |
interface interface-name |
Specifies the name of the interface that sends ARP packets. |
- |
interface interface-type interface-number |
Specifies the interface that sends ARP packets. |
- |
vlan-id vlanId |
Specifies the VLAN to which the interface that sends ARP messages belongs. |
The value is an integer ranging from 1 to 4094. If this parameter is not specified, the VLAN ID of 0 is used. When the specified outbound interface is a Layer 2 interface, you must configure vlan-id; when the specified outbound interface is a Layer 3 interface, you cannot configure vlan-id. |
timeout timeout |
Specifies the timeout period of a test when ARP packets are used to detect whether an IP address is being used by another device. This parameter is recommended when the local IP address is to be detected. |
The value is an integer ranging from 1 to 10, in seconds. The default value is 3s. |
Usage Scenario
To use ARP messages to check whether an IP address is used by another devices on a LAN, run this command.
Alternatively, you can run the ping command to check whether an IP address is used by another device on the network. If the destination host and the Routing device that are enabled with the firewall function are configured not to respond to ping packets, after the ping command is run, the destination host and the Router do not respond to the ping packets. Therefore, the initiator mistakenly considers that the IP address is not in use. As ARP is a Layer 2 protocol, in most cases, ARP messages can pass through the firewall of the device that is configured not to respond to ping packets. In this manner, the preceding situation does not occur. In addition, an ARP request message is smaller than an ICMP packet used in ping operations, and therefore running the arp-ping ip command consumes fewer network resources. This command is recommended for IP address detection.Prerequisites
ARP has been enabled, and ARP messages can be properly sent and received.
Configuration Impact
If you specify a local IP address or loopback address in the arp-ping ip command, the probe will fail.
Precautions
The arp-ping ip command cannot be used to detect a local IP address, whereas the ping command can.