- Table of Contents
-
- 04-Layer 3 Command Reference
- 00-Preface
- 01-ARP Commands
- 02-IP Addressing Commands
- 03-DHCP Commands
- 04-DNS Commands
- 05-NAT Commands
- 06-IPv6 Basics Commands
- 07-DHCPv6 Commands
- 08-IPv6 DNS Commands
- 09-Adjacency Table Commands
- 10-Flow Classification Commands
- 11-IP Performance Optimization Commands
- 12-IPv6 Application Commands
- 13-IP Routing Basics Commands
- 14-Static Routing Commands
- 15-IPv6 Static Routing Commands
- Related Documents
-
Title | Size | Download |
---|---|---|
01-ARP Commands | 109.90 KB |
Gratuitous ARP configuration commands
gratuitous-arp-learning enable
ARP snooping configuration commands
ARP fast-reply mechanism configuration commands
arp check enable
Syntax
arp check enable
undo arp check enable
View
System view
Default level
2: System level
Parameters
None
Description
Use arp check enable to enable dynamic ARP entry check.
Use undo arp check enable to disable dynamic ARP entry check.
By default, dynamic ARP entry check is enabled.
Examples
# Enable dynamic ARP entry check.
<Sysname> system-view
[Sysname] arp check enable
arp max-learning-num
Syntax
arp max-learning-num number
undo arp max-learning-num
View
Ethernet interface view, VLAN interface view, Layer 2 aggregate interface view
Default level
2: System level
Parameters
number: Maximum number of dynamic ARP entries that an interface can learn. The value range depends on the device model. For the command matrixes, see About the WX Series Access Controllers Command References.
Description
Use arp max-learning-num to configure the maximum number of dynamic ARP entries that an interface can learn.
Use undo arp max-learning-num to restore the default.
The default setting depends on the device model. For the command matrixes, see About the WX Series Access Controllers Command References.
When the number argument is set to 0, the interface is disabled from learning dynamic ARP entries.
Examples
# Specify VLAN-interface 40 to learn up to 500 dynamic ARP entries.
<Sysname> system-view
[Sysname] interface vlan-interface 40
[Sysname-Vlan-interface40] arp max-learning-num 500
# Specify Layer 2 aggregate interface bridge-aggregation 1 to learn up to 1000 dynamic ARP entries.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] arp max-learning-num 1000
arp static
Syntax
arp static ip-address mac-address [ vlan-id interface-type interface-number ]
undo arp ip-address
View
System view
Default level
2: System level
Parameters
ip-address: IP address in an ARP entry.
mac-address: MAC address in an ARP entry, in the format H-H-H.
vlan-id: ID of a VLAN to which a static ARP entry belongs to, in the range of 1 to 4094.
interface-type interface-number: Interface type and interface number.
Description
Use arp static to configure a static ARP entry in the ARP mapping table.
Use undo arp to remove an ARP entry.
Note that:
· A static ARP entry is effective when the device works normally. However, when the VLAN or VLAN interface to which an ARP entry corresponds is deleted, the entry, if long, will be deleted, and if short and resolved, will become unresolved.
· The vlan-id argument specifies the VLAN corresponding to an ARP entry and must be the ID of an existing VLAN. In addition, the Ethernet interface following the argument must belong to that VLAN. The VLAN interface of the VLAN must have been created.
· If both the vlan-id and ip-address arguments are specified, the IP address of the VLAN interface corresponding to the vlan-id argument must belong to the same network segment as the IP address specified by the ip-address argument.
Related commands: reset arp and display arp.
Examples
# Configure a static ARP entry, with the IP address being 202.38.10.2, the MAC address being 00e0-fc01-0000, and the outbound interface being GigabitEthernet 1/0/1 of VLAN 10.
<Sysname> system-view
[Sysname] arp static 202.38.10.2 00e0-fc01-0000 10 gigabitethernet 1/0/1
arp timer aging
Syntax
arp timer aging aging-time
undo arp timer aging
View
System view
Default level
2: System level
Parameters
aging-time: Aging time for dynamic ARP entries in minutes, in the range of 1 to 1,440.
Description
Use arp timer aging to set aging time for dynamic ARP entries.
Use undo arp timer aging to restore the default.
By default, the aging time for dynamic ARP entries is 20 minutes.
Related commands: display arp timer aging.
Examples
# Set aging time for dynamic ARP entries to 10 minutes.
<Sysname> system-view
display arp
Syntax
display arp [ [ all | dynamic | static ] | vlan vlan-id | interface interface-type interface-number ] [ count ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
all: Displays all ARP entries.
dynamic: Displays dynamic ARP entries.
static: Displays static ARP entries.
vlan vlan-id: Displays the ARP entries of the specified VLAN. The VLAN ID ranges from 1 to 4,094.
interface interface-type interface-number: Displays the ARP entries of the interface specified by the argument interface-type interface-number.
count: Displays the number of ARP entries.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression..
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display arp to display ARP entries in the ARP mapping table.
If no parameter is specified, all ARP entries are displayed.
Related commands: arp static and reset arp.
Examples
# Display the detailed information of all ARP entries.
Type: S-Static D-Dynamic
IP Address MAC Address VLAN ID Interface Aging Type
192.168.0.214 0014-222c-90da 1 GE1/0/4 20 D
192.168.0.61 000f-e222-0022 1 GE1/0/4 20 D
192.168.0.220 0011-43c8-75d2 1 GE1/0/4 20 D
192.168.0.7 0015-e947-e20d 1 GE1/0/4 20 D
Table 1 Command output
Field |
Description |
IP Address |
IP address in an ARP entry. |
MAC Address |
MAC address in an ARP entry. |
VLAN ID |
ID of the VLAN that the ARP entry belongs to. |
Interface |
Outbound interface in an ARP entry. |
Aging |
Aging time for a dynamic ARP entry in minutes ("N/A" means unknown aging time or no aging time.) |
Type |
ARP entry type: D for dynamic and S for static. |
# Display the number of all ARP entries.
<Sysname> display arp all count
Total Entry(ies): 5
display arp ip-address
Syntax
display arp ip-address [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
ip-address: Displays the ARP entry for the specified IP address.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display arp ip-address to display the ARP entry for a specified IP address.
Related commands: arp static and reset arp.
Examples
# Display the corresponding ARP entry for the IP address 20.1.1.1.
<Sysname> display arp 20.1.1.1
Type: S-Static D-Dynamic
IP Address MAC Address VLAN ID Interface Aging Type
20.1.1.1 00e0-fc00-0001 N/A N/A N/A S
display arp timer aging
Syntax
display arp timer aging [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
2: System level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display arp timer aging to display the age timer for dynamic ARP entries.
Related commands: arp timer aging.
Examples
# Display the age timer for dynamic ARP entries.
<Sysname> display arp timer aging
Current ARP aging time is 10 minute(s)
naturemask-arp enable
Syntax
naturemask-arp enable
undo naturemask-arp enable
View
System view
Default level
2: System level
Parameters
None
Description
Use naturemask-arp enable to enable the support for ARP requests that are from a natural network.
Use undo naturemask-arp enable to restore the default.
By default, the support for ARP requests from a natural network is disabled.
Examples
# Enable the support for ARP requests from a natural network.
<Sysname> system-view
[Sysname] naturemask-arp enable
reset arp
Syntax
reset arp { all | dynamic | static | interface interface-type interface-number }
View
User view
Default level
2: System level
Parameters
all: Clears all ARP entries except authorized ARP entries.
dynamic: Clears all dynamic ARP entries.
static: Clears all static ARP entries.
interface interface-type interface-number: Clears the ARP entries for the interface specified by the argument interface-type interface-number.
Description
Use reset arp to clear ARP entries except authorized ARP entries from the ARP mapping table.
With interface interface-type interface-number specified, the command clears only dynamic ARP entries of the interface.
Related commands: arp static and display arp.
Examples
# Clear all static ARP entries.
<Sysname> reset arp static
arp send-gratuitous-arp
Syntax
arp send-gratuitous-arp [ interval milliseconds ]
undo arp send-gratuitous-arp
View
VLAN interface view
Default level
2: System level
Parameters
interval milliseconds: Sets the interval at which gratuitous ARP packets are sent, in the range of 200 to 200000 milliseconds. The default value is 2000.
Description
Use arp send-gratuitous-arp to enable periodic sending of gratuitous ARP packets and set the sending interval on an interface.
Use undo arp send-gratuitous-arp to disable the interface from periodically sending gratuitous ARP packets.
By default, an interface is disabled from sending gratuitous ARP packets periodically.
Note that:
· This function takes effect only when the enabled interface is up and an IP address has been assigned to the interface.
· This function can send gratuitous ARP requests only for a VRRP virtual IP address, or the sending interface's primary IP address or manually configured secondary IP address. The primary IP address can be configured manually or automatically, whereas the secondary IP address must be configured manually.
· If you change the interval for sending gratuitous ARP packets, the configuration is effective at the next sending interval.
· The frequency of sending gratuitous ARP packets may be much lower than is expected if this function is enabled on multiple interfaces, or each interface is configured with multiple secondary IP addresses, or a small sending interval is configured in the preceding cases.
|
NOTE: Support for the arp send-gratuitous-arp command depends on the device model. For the feature matrixes, see About the WX Series Access Controllers Command References. |
Examples
# Enable VLAN-interface 2 to send gratuitous ARP packets every 300 milliseconds.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] arp send-gratuitous-arp interval 300
gratuitous-arp-learning enable
Syntax
gratuitous-arp-learning enable
undo gratuitous-arp-learning enable
View
System view
Default level
2: System level
Parameters
None
Description
Use gratuitous-arp-learning enable to enable the gratuitous ARP packet learning function.
Use undo gratuitous-arp-learning enable to disable the function.
By default, the function is enabled.
With this function enabled, a device receiving a gratuitous ARP packet can add the source IP and MAC addresses carried in the packet to its own dynamic ARP table if it finds no ARP entry in the cache corresponding to the source IP address of the ARP packet exists. If the corresponding ARP entry exists in the cache, the device updates the ARP entry regardless of whether this function is enabled.
Examples
# Enable the gratuitous ARP packet learning function.
<Sysname> system-view
[Sysname] gratuitous-arp-learning enable
gratuitous-arp-sending enable
Syntax
gratuitous-arp-sending enable
undo gratuitous-arp-sending enable
View
System view
Default level
2: System level
Parameters
None
Description
Use gratuitous-arp-sending enable to enable a device to send gratuitous ARP packets when receiving ARP requests from another network segment.
Use undo gratuitous-arp-sending enable to restore the default.
By default, a device cannot send gratuitous ARP packets when receiving ARP requests from another network segment.
Examples
# Disable a device from sending gratuitous ARP packets.
<Sysname> system-view
[Sysname] undo gratuitous-arp-sending enable
arp-snooping enable
Syntax
arp-snooping enable
undo arp-snooping enable
View
System view
Default level
2: System level
Parameters
None
Description
Use arp-snooping enable to enable ARP snooping.
Use undo arp-snooping enable to disable ARP snooping.
By default, ARP snooping is disabled.
Examples
# Enable ARP snooping.
<Sysname> system-view
[Sysname] arp-snooping enable
display arp-snooping
Syntax
display arp-snooping [ ip ip-address | vlan vlan-id ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
2: System level
Parameters
ip ip-address: Displays the ARP snooping entry information for the IP address.
vlan vlan-id: Displays ARP snooping entries of a specified VLAN. The vlan-id argument is in the range of 1 to 4094.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use display arp-snooping to display ARP snooping entries. If no keywords or arguments are specified, the command displays all the ARP snooping entries.
Examples
# Display ARP snooping entries of VLAN 1.
<Sysname> display arp-snooping vlan 1
IP Address MAC Address VLAN ID Interface Aging Status
3.3.3.3 0003-0003-0003 1 GE1/0/1 20 Valid
3.3.3.4 0004-0004-0004 1 GE1/0/1 5 Invalid
---- Total entry(ies) on VLAN 1:2 ----
reset arp-snooping
Syntax
reset arp-snooping [ ip ip-address | vlan vlan-id ]
View
User view
Default level
2: System level
Parameters
ip ip-address: Removes the ARP entry of a specified IP address.
vlan vlan-id: Removes the ARP entries of a specified VLAN. The vlan-id argument is in the range of 1 to 4094.
Description
Use reset arp-snooping to remove ARP snooping entries. If no keywords or arguments are specified, the command removes all ARP snooping entries.
Examples
# Remove ARP snooping entries of VLAN 1.
<Sysname> reset arp-snooping vlan 1
ARP fast-reply mechanism configuration commands
arp fast-reply enable
Syntax
arp fast-reply enable
undo arp fast-reply enable
View
VLAN view
Default level
2: System level
Parameters
None
Description
Use arp fast-reply enable to enable the ARP fast-reply mechanism on the VLAN.
Use undo arp fast-reply enable to restore the default.
By default, the ARP fast-reply mechanism is disabled on a VLAN.
Examples
# Enable the ARP fast-reply mechanism on VLAN 1.
<Sysname> system
[Sysname] vlan 1
[Sysname-vlan1] arp fast-reply enable