The arp learning strict command enables strict ARP learning on the interface.
The undo arp learning strict command restores the global configuration on the interface.
By default, strict ARP learning is disabled on the interface.
Parameter | Description | Value |
---|---|---|
force-enable |
Indicates that strict ARP learning is enabled. |
- |
force-disable |
Indicates that strict ARP learning is disabled. |
- |
trust |
Indicates that the configuration of strict ARP learning is the same as the global configuration. NOTE:
The effect of the trust parameter is the same as the effect of the undo arp learning strict command. |
- |
Usage Scenario
To avoid the preceding problems, enable strict ARP learning on the gateway. This function indicates that the device learns only ARP entries for ARP Reply packets in response to ARP Request packets sent by itself, but does not allow the device to learn the ARP entries for the ARP packets received from other devices. In this way, the device can defend against most ARP attacks.
Prerequisites
On an Ethernet interface working in Layer 2 mode, the undo portswitch command has been run to switch the interface to Layer 3 mode.
Only the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support switching between Layer 2 and Layer 3 modes.
Precautions
The configuration on an interface takes precedence over the global configuration.
When ARP attacks occur on many interfaces of the device, you can run the arp learning strict command to enable strict ARP learning globally.
<HUAWEI> system-view [HUAWEI] vlan 100 [HUAWEI-vlan100] quit [HUAWEI] interface vlanif 100 [HUAWEI-Vlanif100] arp learning strict force-enable
<HUAWEI> system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo portswitch [HUAWEI-GigabitEthernet0/0/1] arp learning strict force-enable