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, that is, to disable a switch from creating multicast MAC address ARP entries for MAC
addresses learned.
Use the undo arp check enable command
to disable the ARP entry checking function. In this case, a switch creates multicast MAC address ARP entries for MAC addresses learned.
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 (Ethernet
interface view)
undo arp ip-address
View
System view, Ethernet interface 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 4094.
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.
The system ARP mapping table is empty when
a switch is just started. 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, it is not supported to configure
static ARP mapping entry on aggregation port
Related command: reset arp, display
arp, debugging arp.
Example
# Create a static ARP mapping entry, with
the IP address of 202.38.10.2, the MAC address of 000f-e20f-0000. The ARP
mapping entry belongs to Ethernet1/0/1 port (assuming that Ethernet1/0/1 port
belongs to VLAN1).
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] arp static 202.38.10.2 000f-e20f-0000
1 ethernet1/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.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] arp timer aging 10
Syntax
debugging arp packet
undo debugging arp packet
View
User view
Parameter
packet:
Enables debugging for ARP packets.
Description
Use the debugging arp packet command
to enable debugging for ARP packets.
Use the undo debugging arp packet
command to disable debugging output.
By default, all types of ARP debugging is
disabled.
Related command: arp static, display
arp.
Example
# Enable debugging for ARP packets.
<H3C> debugging arp packet
*0.946169229 S3100-8C-SI_5
ARP/8/arp_send:- 1 -Send an ARP Packet, operation : 1, sender_eth_addr :
000f-e20f-c415, sender_ip_addr : 31.31.31.5, target_eth_addr : 0000-0000-0000, target_ip_addr
: 31.31.31.1
*0.946169473 S3100-8C-SI_5 ARP/8/arp_rcv:-
1 -Receive an ARP Packet, operation : 2, sender_eth_addr : 000f-e20f-1751, sender_ip_addr
: 31.31.31.1, target_eth_addr : 000f-e20f-c415, target_ip_addr : 31.31.31.5
Table 1-1 Description on the fields of
the debugging arp packet command
|
Field
|
Description
|
|
operation
|
ARP packet type, which can be one of the
following:
l
1: ARP request packet
l
2: ARP reply packet
|
|
sender_eth_addr
|
Source MAC address
|
|
sender_ip_addr
|
Source IP address
|
|
target_eth_addr
|
MAC address of the target. For an ARP
request packets, it is all zeros. This field is set to the target MAC address
in the ARP reply packets.
|
|
target_ip_addr
|
Target IP address
|
1.1.5 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, reset
arp, debugging 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.1.1.2 000f-e20f-0102 N/A N/A
N/A Static
10.110.91.175 0050-ba22-6fd7 1
Ethernet1/0/1 20 Dynamic
--- 2 entries found ---
Table 1-2 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
|
Index 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.6 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 expressions, 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, reset
arp, debugging 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 14 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
30.3.3.3 1000-2000-3000
1 Ethernet1/0/3 N/A S
202.38.10.2 000f-e20f-0000
1 Ethernet1/0/2 N/A S
--- 2 entries found ---
Refer to Table 1-2 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.
Include:
Counts 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, reset
arp, debugging 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 the switch nameed H3CA.
<H3CA> system-view
System View: return to User View with
Ctrl+Z.
[H3CA] 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
the ARP mapping entries related to a specified interface.
Related command: arp static, display
arp.
Example
# Clear static ARP mapping entries.
<H3C> reset arp static