< Home

arp validate (interface view)

Function

The arp validate command enables MAC address consistency check in an ARP packet on an interface. This function compares the source and destination MAC addresses in ARP packets with those in the Ethernet frame header.

The undo arp validate command disables MAC address consistency check in an ARP packet on an interface.

By default, MAC address consistency check in an ARP packet is disabled.

Format

arp validate { source-mac | destination-mac } *

undo arp validate { source-mac | destination-mac } *

Parameters

Parameter Description Value
source-mac Indicates that the device compares the source MAC address in a received ARP packet with that in the Ethernet frame header. -
destination-mac Indicates that the device compares the destination MAC address in a received ARP packet with that in the Ethernet frame header. -

Views

Ethernet interface view, GE interface view, 40GE interface view, XGE interface view, 25GE interface view, 100GE interface view, MultiGE interface view, port group view, Eth-Trunk interface view, VE interface view

Default Level

2: Configuration level

Usage Guidelines

The MAC address consistency check function for ARP packets prevents attacks from bogus ARP packets in which the source and destination MAC addresses are different from those in the Ethernet frame header. This function is usually configured on gateways.

After the arp validate command is run, the gateway checks the MAC address consistency in an ARP packet before ARP learning. If the source and destination MAC addresses in an ARP packet are different from those in the Ethernet frame header, the device discards the packet as an attack. If the source and destination MAC addresses in an ARP packet are the same as those in the Ethernet frame header, the device performs ARP learning.

When using this command, note the following points:
  • If source-mac is specified:
    • When receiving an ARP Request packet, the device checks only the source MAC address consistency.
    • When receiving an ARP Reply packet, the device checks only the source MAC address consistency.
  • If destination-mac is specified:
    • When receiving an ARP Request packet, the device does not check the destination MAC address consistency because the ARP Request packet is broadcast.

    • When receiving an ARP Reply packet, the device checks the destination MAC address consistency.
  • If source-mac and destination-mac are specified:
    • When receiving an ARP Request packet, the device checks only the source MAC address consistency.
    • When receiving an ARP Reply packet, the device checks the source and destination MAC address consistency.

Example

# Enable MAC address consistency check in an ARP packet on Layer 2 interface GE0/0/1.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] arp validate source-mac destination-mac
# Enable MAC address consistency check in an ARP packet on Layer 3 interface GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo portswitch
[HUAWEI-GigabitEthernet0/0/1] arp validate source-mac destination-mac
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >