Syntax
arp check enable
undo arp check enable
View
System view
Parameter
None
Description
Use the arp check enable command to
enable the ARP entry checking function on a switch, that is, to disable the
switch from creating ARP entries for multicast MAC addresses.
Use the undo arp check enable
command to disable the ARP entry checking function. In this case, the switch
creates ARP entries for multicast MAC addresses.
By default, the ARP entry checking function
is enabled.
Example
# Configure to create multicast MAC address
ARP entries for MAC addresses learned.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] undo arp check enable
Syntax
arp static ip-address mac-address [ vlan-id
interface-type interface-number ]
arp static ip-address mac-address vlan-id (in
Ethernet port view)
undo arp ip-address
View
System view/Ethernet port view
Parameter
ip-address:
IP address contained in the ARP mapping entry to be created/removed.
mac-address:
MAC address contained in the ARP mapping entry to be created, in the format of
H-H-H.
vlan-id: ID
of the VLAN to which the static ARP entry belongs, in the range of 1 to 4,094.
interface-type: Type of the port to which the static ARP entry belongs.
interface-number: Number of the port to which the static ARP entry belongs.
Description
Use the arp static command to create
a static ARP mapping entry.
Use the undo arp command to remove
an ARP mapping entry.
By default, the system ARP mapping table is
empty and the dynamic address mapping entries are generated by ARP.
Note that:
l
Static ARP mapping entries are valid as long as
the Ethernet switch operates. However, an ARP mapping entry is removed if the
corresponding VLAN is removed. By default, a dynamic ARP mapping entry remains
valid for 20 minutes.
l
As for the arp static command, the value
of the vlan-id argument must be the ID of an existing VLAN, and the port
identified by the interface-type and interface-number arguments
must belong to the VLAN.
l
Currently, static ARP mapping entries cannot be
configured on aggregation ports.
Related command: reset arp, and display
arp.
Example
# Create a static ARP mapping entry, with
the IP address of 202.38.10.2, the MAC address of 00e0-fc01-0000. The ARP
mapping entry belongs to Ethernet1/0/1 which belongs to VLAN 1.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] arp static 202.38.10.2 00e0-fc01-0000 1 Ethernet 1/0/1
Syntax
arp timer aging aging-time
undo arp timer aging
View
System view
Parameter
aging-time:
Aging time (in minutes) of the dynamic ARP mapping entries. This argument
ranges from 1 to 1,440.
Description
Use the arp timer aging command to
configure the aging time for dynamic ARP mapping entries.
Use the undo arp timer aging command
to restore the default aging time.
By default, the aging time for dynamic ARP
mapping entries is 20 minutes.
Related command: display arp timer aging.
Example
# Configure the aging time to be 10 minutes
for dynamic ARP mapping entries.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] arp timer aging 10
1.1.4 display arp
Syntax
display arp
[ dynamic | static | ip-address ]
View
Any view
Parameter
dynamic:
Displays dynamic ARP mapping entries.
static:
Displays static ARP mapping entries.
ip-address:
IP address. ARP mapping entries containing the IP address are to be displayed.
Description
Use the display arp command to
display specific ARP mapping entries.
If you execute this command with no
keyword/argument specified, all the ARP mapping entries are displayed.
Related command: arp static, and reset
arp.
Example
# Display all the ARP mapping entries.
<H3C> display arp
Type: S-Static
D-Dynamic
IP Address MAC Address VLAN
ID Port Name / AL ID Aging Type
10.2.72.162 000a-000a-0aaa
N/A N/A N/A S
192.168.0.77 0000-e8f5-6a4a
1 Ethernet1/0/2 13 D
192.168.0.2 000d-88f8-4e88
1 Ethernet1/0/2 14 D
192.168.0.200 0014-222c-9d6a
1 Ethernet1/0/2 14 D
192.168.0.45 000d-88f6-44c1
1 Ethernet1/0/2 15 D
192.168.0.110 0011-4301-991e
1 Ethernet1/0/2 15 D
192.168.0.32 0000-e8f5-73ee
1 Ethernet1/0/2 16 D
192.168.0.3 0014-222c-aa69
1 Ethernet1/0/2 16 D
192.168.0.17 000d-88f6-379c
1 Ethernet1/0/2 17 D
192.168.0.115 000d-88f7-9f7d
1 Ethernet1/0/2 18 D
192.168.0.43 000c-760a-172d
1 Ethernet1/0/2 18 D
192.168.0.33 000d-88f6-44ba
1 Ethernet1/0/2 20 D
192.168.0.35 00e0-fc02-2181
1 Ethernet1/0/2 20 D
192.168.0.5 000f-3d80-2b38
1 Ethernet1/0/2 20 D
--- 14 entries found ---
Table 1-1 Description on the fields of
the display arp command
|
Field
|
Description
|
|
IP Address
|
IP address contained in an ARP mapping
entry
|
|
MAC Address
|
MAC address contained in an ARP mapping
entry
|
|
VLAN ID
|
ID of the VLAN which an ARP mapping entry
belongs to
|
|
Port Name / AL ID
|
Name of the port which an ARP mapping
entry belongs to
|
|
Aging
|
Aging time (in minutes) of a dynamic ARP mapping
entry
|
|
Type
|
Type of an ARP mapping entry
|
1.1.5 display arp |
Syntax
display arp
[ dynamic | static] | { begin | exclude | include
} text
View
Any view
Parameter
dynamic:
Displays dynamic ARP mapping entries.
static:
Displays static ARP mapping entries.
| { begin
| exclude | include } text: Regular expression, where:
begin:
Displays the ARP mapping entries from the first ARP entry that contains the
specified string given by the text argument.
exclude:
Displays the ARP mapping entries that do not contain the specified string given
by the text argument.
include:
Displays the ARP mapping entries that contain the specified string given by the
text argument.
text: String
used to filter ARP mapping entries.
Description
Use the display arp | command to
display the ARP mapping entries related to string in a specified way.
Related command: arp static, and reset
arp.
Example
# Display all the ARP mapping entries that
contain the string “77”.
<H3C>display
arp | include 77
Type: S-Static
D-Dynamic
IP Address MAC Address VLAN
ID Port Name / AL ID Aging Type
192.168.0.77 0000-e8f5-6a4a
1 Ethernet1/0/2 12 D
--- 1 entry found ---
# Display all the ARP entries that do not
contain the string “68”.
<H3C>display arp | exclude 68
Type: S-Static
D-Dynamic
IP Address MAC Address VLAN
ID Port Name / AL ID Aging Type
10.2.72.162 000a-000a-0aaa
N/A N/A N/A S
--- 1 entry found ---
Refer to Table 1-1 for the description on the above output information.
Syntax
display arp count
[ [ dynamic | static ] [ | { begin | exclude
| include } text ] | ip-address ]
View
Any view
Parameter
dynamic:
Counts the dynamic ARP mapping entries.
static:
Counts the static ARP mapping entries.
| { begin
| exclude | include } text: Regular expression, where:
begin:
Counts the ARP mapping entries from the first ARP entry that contains the
string given by the text argument.
exclude:
Counts the ARP mapping entries that do not contain the string given by the text
argument.
unts the ARP mapping entries that contain
the string given by the text argument.
text: String
used to filter ARP mapping entries.
ip-address:
IP address. The ARP mapping entries containing the IP address are to be counted
in.
Description
Use the display arp count command to
display the number of the specified ARP mapping entries. If no parameter is
specified, the total number of ARP mapping entries is displayed.
Related command: arp static, and reset
arp.
Example
# Display the total number of ARP mapping
entries.
<H3C> display arp count
1 entry found
Syntax
display arp timer aging
View
Any view
Parameter
None
Description
Use the display arp timer aging
command to display the setting of the ARP aging timer.
Related command: arp timer aging.
Example
# Display the setting of the ARP aging
timer.
<H3C> display arp timer aging
Current ARP aging time is 20
minute(s)(default)
The displayed information shows that the
ARP aging timer is set to 20 minutes.
Syntax
gratuitous-arp-learning enable
undo gratuitous-arp-learning enable
View
System view
Parameter
None
Description
Use the gratuitous-arp-learning enable
command to enable the gratuitous ARP packet learning function.
Use the undo gratuitous-arp-learning
enable command to disable the gratuitous ARP packet learning function.
By default, the gratuitous ARP packet
learning function is enabled.
With the gratuitous ARP packet learning
function enabled, a switch operates as follows when receiving a gratuitous ARP
packet:
l
If the cache of the switch contains ARP mapping entries
that match the packet, the switch updates the ARP mapping entries using the sender
hardware address carried in the gratuitous ARP packet.
l
If no ARP mapping entry in the cache matches the
packet, an ARP mapping entry corresponding to the packet is created.
Example
# Enable the gratuitous ARP packet learning
function on a switch.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] gratuitous-arp-learning enable
Syntax
reset arp
[ dynamic | static | interface interface-type
interface-number ]
View
User view
Parameter
dynamic:
Clears dynamic ARP mapping entries.
static:
Clears static ARP mapping entries.
interface-type: Port type.
interface-number: Port number.
Description
Use the reset arp command to clear specific
ARP mapping entries.
Related command: arp static, and display
arp.
Example
# Clear static ARP mapping entries.
<H3C> reset arp static