< Home

arp scan

Function

The arp scan command enables Address Resolution Protocol (ARP) automatic scanning on an interface so that the interface can send ARP Request packets to all interfaces whose IP addresses are in the same network segment with the IP address of the interface.

Format

arp scan [ start-ip-address to end-ip-address ]

Parameters

Parameter Description Value

start-ip-address

Specifies a start IP address for ARP automatic scanning.

The start IP address must be less than or equal to the end IP address.

The value is in dotted decimal notation.

end-ip-address

Specifies an end IP address for ARP automatic scanning.

The end IP address must be greater than or equal to the start IP address.

The value is in dotted decimal notation.

Views

Ethernet interface view, Eth-Trunk interface view, VLANIF interface view, Ethernet sub-interface view, or Eth-Trunk sub-interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The arp scan command enables ARP automatic scanning to allow a device rapidly learn MAC addresses from the neighbor devices whose IP addresses are in the same network segment and generate corresponding ARP entries.

Follow-up Procedure

Enable fixed ARP using the arp fixup command.

ARP automatic scanning is generally used with fixed ARP. A device can use ARP automatic scanning to generate dynamic ARP entries about all its neighbor devices. Then the device can use fixed ARP to convert the dynamic ARP entries to static ARP entries. This process prevents a network from attacks.

Precautions

  • By default, this function is disabled.
  • A start IP address and an end IP address within a specific IP address range must be in the same network segment with the IP address of the specified interface. The IP address of the specified interface can be either the primary IP address or a configured secondary IP address. The start IP address must be less than or equal to the end IP address.
  • If no IP address range is specified, ARP automatic scanning enables a device to scan all its neighbor devices whose IP addresses are in the same network segment with the primary IP address of the specified interface.
  • If a device has already obtained a MAC address corresponding to the IP address, ARP automatic scanning is not performed on the device.
  • ARP automatic scanning consumes system resources. You are advised to perform ARP automatic scanning when system resources are available. Other operations should not be performed during scanning.
  • ARP automatic scanning may be time-consuming. You can press Ctrl_C to stop ARP automatic scanning. If a device receives ARP Reply packets from its neighbor devices when ARP automatic scanning is stopped, the device generates dynamic ARP entries about its neighbors. Run the display arp all command to view all dynamic ARP entries that the device has generated.

Example

# Enable ARP automatic scanning.

<sysname> system-view
[sysname] interface Eth-Trunk 10
[sysname-Eth-Trunk10] arp scan
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >