464
Examples
# Configure GigabitEthernet 3/0/1 as an ARP trusted port.
<Sysname> system-view
[Sysname] interface gigabitethernet 3/0/1
[Sysname-GigabitEthernet3/0/1] arp detection trust
arp detection validate
Use
arp detection validate
to enable ARP packet validity check. You can specify one or more
objects to be checked in one command line.
Use
undo arp detection validate
to disable ARP packet validity check. If no keyword is specified,
this command deletes all objects.
Syntax
arp detection validate
{
dst-mac
|
ip
|
src-mac
} *
undo arp detection validate
[
dst-mac
|
ip
|
src-mac
] *
Default
ARP packet validity check is disabled.
Views
System view
Default command level
2: System level
Parameters
dst-mac
: Checks the target MAC address of ARP responses. If the target MAC address is all-zero,
all-one, or inconsistent with the destination MAC address in the Ethernet header, the packet is
considered invalid and discarded.
ip
: Checks the source and destination IP addresses of ARP packets. The all-zero, all-one, or
multicast IP addresses are considered invalid and the corresponding packets are discarded. With
this keyword specified, the source and destination IP addresses of ARP replies, and the source IP
address of ARP requests are checked.
src-mac
: Checks whether the sender MAC address of an ARP packet is identical to the source MAC
address in the Ethernet header. If they are identical, the packet is considered valid. Otherwise, the
packet is discarded.
Examples
# Enable ARP packet validity check by checking the MAC addresses and IP addresses of ARP
packets.
<Sysname> system-view
[Sysname] arp detection validate dst-mac src-mac ip
arp restricted-forwarding enable
Use
arp restricted-forwarding enable
to enable ARP restricted forwarding.
Use
undo arp restricted-forwarding enable
to disable ARP restricted forwarding.
Syntax
arp restricted-forwarding enable
undo arp restricted-forwarding enable