The arp static command configures a static Address Resolution Protocol (ARP) mapping table.
The undo arp static command removes the static mapping entries corresponding to the specified IP addresses in the ARP mapping table.
By default, the ARP mapping table is empty and the address mapping can be obtained through dynamic ARP.
arp static ip-address mac-address [ vpn-instance vpn-instance-name ] [ vid vlan-id ] [ interface interface-type interface-number ]
undo arp static ip-address [ mac-address ] [ vpn-instance vpn-instance-name | vid vlan-id interface interface-type interface-number ]
| Parameter | Description | Value |
|---|---|---|
ip-address |
Specifies the IP address of the ARP mapping entry. If static ARP and VRRP are enabled on a device simultaneously, the virtual IP address of the VRRP backup group configured on the sub-interface for dot1q termination, or VLANIF interface cannot be the IP address contained in the static ARP entry; otherwise, incorrect host routes are generated and hence packets cannot be normally forwarded. |
The value is in dotted decimal notation. |
ip-address |
Specifies the IP address of the ARP mapping entry. |
The value is in dotted decimal notation. |
mac-address |
Specifies the MAC address of the ARP mapping entry. |
It is in the format of H-H-H. Here, H is a hexadecimal number with 1 to 4 bits. |
vpn-instance vpn-instance-name |
Specifies the name of a VPN instance. The parameter is used for the MPLS VPN feature. When this parameter is set, it indicates that the ARP entry is of the VPN instance. |
The value is a string of 1 to 31 characters. |
vpn-instance vpn-instance-name |
Specifies the name of a VPN instance. The parameter is used for the MPLS VPN feature. When this parameter is set, it indicates that the ARP entry is of the VPN instance. |
The value is a string of 1 to 31 characters. |
vid vlan-id |
Specifies the VLAN ID of the IP address. If this parameter is not specified, the VLAN ID is considered as 0; When this parameter is set, the ARP entry is the one within the corresponding VLAN. |
The value is an integer ranging from 1 to 4094. |
interface interface-type interface-number |
Specifies the outgoing interface of ARP packets. |
- |
IP and MAC addresses mapping in the static ARP mapping entry is fixed. Neither the host nor the device can adjust the mapping relationship. Static ARP entries keep valid when a device works normally.
Configure static ARP entries in the following situations:
To configure common static ARP entries, run the arp static ip-address mac-address [ vpn-instance vpn-instance-name ] command.
To configure static ARP entries for sub-interfaces, run the arp static ip-address mac-address [ vpn-instance vpn-instance-name ] vid vlan-id command.
The specified ip-address and the actual IP address of the outbound interface specified in interface must be on the same network segment.
The ARP mapping table only applies to the LAN. For address resolution in the WAN, other methods such as the Reverse Address Resolution Protocol (RARP) of FR are adopted.
# Configure the mapping between the Ethernet MAC address 00e0-fc01-0000 and the IP address 192.168.0.1.
<sysname> system-view
[sysname] arp static 192.168.0.1 00e0-fc01-0000
# Configure the static mapping, the IP address being 1.1.1.1 and the MAC address being 00e0-fc01-0001. This static ARP mapping belongs to VLAN 10.
<sysname> system-view
[sysname] arp static 1.1.1.1 00e0-fc01-0001 vid 10
# Configure the static mapping, the IP address being 1.1.1.1 and the MAC address being 00e0-fc01-0001. This static ARP mapping belongs to both vpn1 and VLAN 10.
<sysname> system-view
[sysname] arp static 1.1.1.1 00e0-fc01-0001 vpn-instance vpn1 vid 10