How Can I Configure Static ARP Entries on an Interface?
Based on the interface type, you can configure static ARP entries in the following methods:
For Layer 3 physical interfaces and Layer 3 Eth-Trunk interfaces, run the arp static ip-address mac-address command to configure static ARP entries.
For example:
<Huawei> system-view [Huawei] arp static 1.1.1.1 00e0-fc11-1111
For Dot1q termination sub-interfaces, run the arp static ip-address mac-address vid vlan-id interface interface-type interface-number command to configure static ARP entries.
For example: # Configure a static ARP entry for a sub-interface for dot1q VLAN tag termination. The static ARP entry's IP address 2.1.1.1 maps the MAC address 00e0-fce5-f7e4. GE1/0/0.1 is added to VLAN 20.# Configure a sub-interface for dot1q VLAN tag termination and add the sub-interface to VLAN 20.
<Huawei> system-view [Huawei] interface gigabitethernet 1/0/0.1 [Huawei-GigabitEthernet1/0/0.1] control-vid 100 dot1q-termination [Huawei-GigabitEthernet1/0/0.1] dot1q termination vid 20 [Huawei-GigabitEthernet1/0/0.1] ip address 2.1.1.2 24 [Huawei-GigabitEthernet1/0/0.1] quit
- # Configure a static ARP entry for the sub-interface for dot1q VLAN tag termination.
[Huawei] arp static 2.1.1.1 00e0-fce5-f7e4 vid 20 interface gigabitethernet1/0/0.1
For QinQ termination sub-interfaces, run the arp static ip-address mac-address vid vlan-id cevid ce-vid interface interface-type interface-number command to configure static ARP mapping entries with double tags.
For example: # Configure a static ARP entry for a sub-interface for QinQ VLAN tag termination. The static ARP entry's IP address 2.1.1.1 maps the MAC address 00e0-fce5-f7e4. The inner and outer VLAN IDs of the outbound interface GE1/0/0.1 are 20 and 10 respectively.# Configure a sub-interface for QinQ VLAN tag termination and the inner and outer VLAN IDs of the outbound interface GE1/0/0.1 are 20 and 10 respectively.
<Huawei> system-view [Huawei] interface gigabitethernet 1/0/0.1 [Huawei-GigabitEthernet1/0/0.1] control-vid 100 qinq-termination [Huawei-GigabitEthernet1/0/0.1] qinq termination pe-vid 10 ce-vid 20 [Huawei-GigabitEthernet1/0/0.1] ip address 2.1.1.2 24 [Huawei-GigabitEthernet1/0/0.1] quit
- # Configure a static ARP entry for the sub-interface for QinQ VLAN tag termination.
[Huawei] arp static 2.1.1.1 00e0-fce5-f7e4 vid 10 cevid 20 interface gigabitethernet1/0/0.1
For VLANIF interfaces, run the arp static ip-address mac-address vid vlan-id interface interface-type interface-number command to configure static ARP entries.
For example:
<Huawei> system-view [Huawei] arp static 192.168.1.88 00e0-fc11-1111 vid 4094 interface ethernet 0/0/7
The outbound interface here indicates the Layer 2 interface bound to the VLAN.
In V200R002C01 and later versions, VLANIF interface support short ARP entries. You can directly configure the mapping between IP addresses and MAC addresses without specifying the VID and outbound interface.
For example:
<Huawei> system-view
[Huawei] arp static 192.168.1.88 00e0-fc11-1111