- Table of Contents
-
- 04-Layer 3 Command Reference
- 00-Preface
- 01-ARP Commands
- 02-IP Addressing Commands
- 03-DHCP Commands
- 04-DHCPv6 Commands
- 05-DNS Commands
- 06-IPv6 DNS Commands
- 07-NAT Commands
- 08-Adjacency Table Commands
- 09-Flow Classification Commands
- 10-IPv6 Basics Commands
- 11-IP Performance Optimization Commands
- 12-Basic IP Routing Commands
- 13-Static Routing Commands
- 14-IPv6 Static Routing Commands
- 15-GRE Commands
- 16-RIP Commands
- 17-RIPng Commands
- 18-Policy-Based Routing Commands
- Related Documents
-
Title | Size | Download |
---|---|---|
01-ARP Commands | 72.56 KB |
Gratuitous ARP configuration commands
gratuitous-arp-learning enable
ARP snooping configuration commands
ARP fast-reply mechanism configuration commands
ARP configuration commands
arp check enable
Use arp check enable to enable dynamic ARP entry check.
Use undo arp check enable to disable dynamic ARP entry check.
Syntax
arp check enable
undo arp check enable
Default
Dynamic ARP entry check is enabled.
Views
System view
Default command level
2: System level
Examples
# Enable dynamic ARP entry check.
<Sysname> system-view
[Sysname] arp check enable
arp max-learning-num
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.
Syntax
arp max-learning-num number
undo arp max-learning-num
Default
A Layer 2 interface does not limit the number of dynamic ARP entries. The maximum number of dynamic ARP entries that a Layer 3 interface can learn varies with devices. For more information, see About the H3C Access Controllers Command References.
Views
Layer 2 Ethernet interface view, Layer 3 Ethernet interface view, VLAN interface view, Layer 2 aggregate interface view
Default command level
2: System level
Parameters
number: Specifies the maximum number of dynamic ARP entries that an interface can learn. The value range varies with devices. For more information, see About the H3C Access Controllers Command References.
Usage guidelines
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
Use arp static to configure a static ARP entry.
Use undo arp to remove an ARP entry.
Syntax
arp static ip-address mac-address [ vlan-id interface-type interface-number ]
undo arp ip-address
Views
System view
Default command level
2: System level
Parameters
ip-address: Specifies the IP address in an ARP entry.
mac-address: Specifies the MAC address in an ARP entry, in the format H-H-H.
vlan-id: Specifies the ID of an existing VLAN to which a static ARP entry belongs. The value range is 1 to 4094.
interface-type interface-number: Specifies an interface by interface type and interface number.
Usage guidelines
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, is deleted, and if short and resolved, becomes unresolved.
The Ethernet interface following the vlan-id argument must belong to the 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 be in the same network segment as the IP address specified by the ip-address argument.
Examples
# Configure a static ARP entry, with IP address 202.38.10.2, MAC address 00e0-fc01-0000 and outbound interface 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
· reset arp
· display arp
arp timer aging
Use arp timer aging to set the aging timer for dynamic ARP entries.
Use undo arp timer aging to restore the default.
Syntax
arp timer aging aging-time
undo arp timer aging
Default
The aging timer for dynamic ARP entries is 20 minutes.
Views
System view
Default command level
2: System level
Parameters
aging-time: Specifies the aging time for dynamic ARP entries in minutes, in the range of 1 to 1440.
Examples
# Set the aging timer to 10 minutes for dynamic ARP entries.
<Sysname> system-view
display arp timer aging
display arp
Use display arp to display ARP entries.
Syntax
display arp [ [ all | dynamic | static ] | vlan vlan-id | interface interface-type interface-number ] [ count ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command 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 value range is 1 to 4094.
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.
Usage guidelines
If you do not specify any parameter, this command displays all ARP entries.
Examples
# Display detailed information about all ARP entries.
Type: S-Static D-Dynamic A-Authorized
IP Address MAC Address VLAN ID Interface Aging Type
192.168.11.13 5866-ba84-8f40 N/A M-GE1/0/0 14 D
192.168.11.2 6666-5555-6669 N/A M-GE1/0/0 9 D
192.168.11.14 3ce5-a613-7461 N/A M-GE1/0/0 15 D
192.168.11.12 000f-e2f3-7da4 N/A M-GE1/0/0 15 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 to which the ARP entry belongs. |
Interface |
Outbound interface in an ARP entry. |
Aging |
Aging time for a dynamic ARP entry in minutes. If the aging time is unknown, or the entry has no aging time, this field displays N/A. |
Type |
ARP entry type: · D—Dynamic. · S—Static. · A—Authorized. |
# Display the number of all ARP entries.
<Sysname> display arp all count
Total Entry(ies): 5
· arp static
· reset arp
display arp ip-address
Use display arp ip-address to display the ARP entry for an IP address.
Syntax
display arp ip-address [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command 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.
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 A-Authorized
IP Address MAC Address VLAN ID Interface Aging Type
20.1.1.1 00e0-fc00-0001 N/A N/A N/A S
Related commands
· arp static
· reset arp
display arp timer aging
Use display arp timer aging to display the aging timer for dynamic ARP entries.
Syntax
display arp timer aging [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command 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.
Examples
# Display the aging timer for dynamic ARP entries.
<Sysname> display arp timer aging
Current ARP aging time is 10 minute(s)
Related commands
arp timer aging
naturemask-arp enable
Use naturemask-arp enable to enable natural mask support for ARP requests.
Use undo naturemask-arp enable to restore the default.
Syntax
naturemask-arp enable
undo naturemask-arp enable
Default
Natural mask support for ARP requests is disabled.
Views
System view
Default command level
2: System level
Examples
# Enable natural mask support for ARP requests.
<Sysname> system-view
[Sysname] naturemask-arp enable
reset arp
Use reset arp to clear ARP entries except authorized ARP entries from the ARP table.
Syntax
reset arp { all | dynamic | static | interface interface-type interface-number }
Views
User view
Default command 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.
Usage guidelines
If you specify an interface, the command clears only the dynamic ARP entries for the interface.
Examples
# Clear all static ARP entries.
<Sysname> reset arp static
· arp static
· display arp
Gratuitous ARP configuration commands
arp send-gratuitous-arp
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.
Syntax
arp send-gratuitous-arp [ interval milliseconds ]
undo arp send-gratuitous-arp
Default
An interface is disabled from sending gratuitous ARP packets periodically.
Views
VLAN interface view
Default command 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.
Usage guidelines
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 might 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.
Support for this command depends on the device model. For more information, see About the H3C 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
Use gratuitous-arp-learning enable to enable the gratuitous ARP packet learning function.
Use undo gratuitous-arp-learning enable to disable the function.
Syntax
gratuitous-arp-learning enable
undo gratuitous-arp-learning enable
Default
The function is enabled.
Views
System view
Default command level
2: System level
Usage guidelines
With this function enabled, a device creates a dynamic ARP entry by using the sender IP and MAC addresses in a received gratuitous ARP packet if no matching ARP entry exists. If a matching ARP entry exists, 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
Use gratuitous-arp-sending enable to enable sending gratuitous ARP packets upon receiving ARP requests whose target IP address is on a different subnet.
Use undo gratuitous-arp-sending enable to restore the default.
Syntax
gratuitous-arp-sending enable
undo gratuitous-arp-sending enable
Default
A device does not send gratuitous ARP packets upon receiving ARP requests whose target IP address is on a different subnet.
Views
System view
Default command level
2: System level
Examples
# Disable a device from sending gratuitous ARP packets upon receiving ARP requests whose target IP address is on a different subnet.
<Sysname> system-view
[Sysname] undo gratuitous-arp-sending enable
ARP snooping configuration commands
arp-snooping enable
Use arp-snooping enable to enable ARP snooping.
Use undo arp-snooping enable to disable ARP snooping.
Syntax
arp-snooping enable
undo arp-snooping enable
Default
ARP snooping is disabled.
Views
System view
Default command level
2: System level
Examples
# Enable ARP snooping.
<Sysname> system-view
[Sysname] arp-snooping enable
display arp-snooping
Use display arp-snooping to display ARP snooping entries. If you do not specify any parameters, the command displays all ARP snooping entries.
Syntax
display arp-snooping [ ip ip-address | vlan vlan-id ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
2: System level
Parameters
ip ip-address: Displays the ARP snooping entry information about the IP address.
vlan vlan-id: Displays ARP snooping entries for a VLAN. The value range for the vlan-id argument is 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.
Examples
# Display ARP snooping entries for 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 XGE1/0/1 20 Valid
3.3.3.4 0004-0004-0004 1 XGE1/0/2 5 Invalid
---- Total entry(ies) on VLAN 1:2 ----
reset arp-snooping
Use reset arp-snooping to remove ARP snooping entries. If no parameters are specified, the command removes all ARP snooping entries.
Syntax
reset arp-snooping [ ip ip-address | vlan vlan-id ]
Views
User view
Default command level
2: System level
Parameters
ip ip-address: Removes the ARP entry for the specified IP address.
vlan vlan-id: Removes the ARP entries for the specified VLAN. The value range for the vlan-id argument is 1 to 4094.
Examples
# Remove ARP snooping entries for VLAN 1.
<Sysname> reset arp-snooping vlan 1
ARP fast-reply mechanism configuration commands
arp fast-reply enable
Use arp fast-reply enable to enable ARP fast-reply for a VLAN.
Use undo arp fast-reply enable to restore the default.
Syntax
arp fast-reply enable
undo arp fast-reply enable
Default
ARP fast-reply is disabled on a VLAN.
Views
VLAN view
Default command level
2: System level
Examples
# Enable ARP fast-reply for VLAN 1.
<Sysname> system
[Sysname] vlan 1
[Sysname-vlan1] arp fast-reply enable