arp static
Use arp static to configure a static ARP entry.
Use undo arp to remove an ARP entry.
Syntax
arp static ip-address mac-address [ vlan-id interface-type interface-number ] [ vpn-instance vpn-instance-name ]
undo arp ip-address [ vpn-instance-name ]
Default
No static ARP entries are configured.
Views
System view
Predefined user roles
network-admin
Parameters
ip-address: Specifies an IP address for the static ARP entry.
mac-address: Specifies a MAC address for the static ARP entry, in the format of H-H-H.
vlan-id: Specifies the ID of a VLAN to which the static ARP entry belongs. The value range is 1 to 4094. The VLAN and VLAN interface must already exist.
interface-type interface-number: Specifies an interface by its type and number. Make sure the interface belongs to the specified VLAN.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN for the static ARP entry. The vpn-instance-name argument is a case-sensitive string of 1 to 31 characters. The VPN instance must already exist. To specify a static ARP entry on the public network, do not specify this option.
Usage guidelines
A static ARP entry is manually configured and maintained. It does not age out and cannot be overwritten by any dynamic ARP entry.
Static ARP entries can be classified into long and short static ARP entries. A short static ARP entry contains an IP-to-MAC mapping. A long static ARP entry contains an IP-to-MAC mapping, a VLAN, and an output interface.
A static ARP entry is effective when the device works correctly.
When the VLAN or VLAN interface is deleted, long static ARP entries in the VLAN are deleted, and resolved short static ARP entries in the VLAN become unresolved.
A resolved short static ARP entry becomes unresolved upon certain events, for example, when the output interface goes down.
A long static ARP entry is ineffective when the corresponding VLAN interface or output interface is down. An ineffective long static ARP entry cannot be used to forward packets.
If you specify both the vlan-id and ip-address arguments, the IP address of the corresponding VLAN interface must be on the same network as the specified IP address.
If you do not specify a VPN, the undo arp command removes ARP entries only for the public network.
Examples
# Configure a static ARP entry that comprises IP address 202.38.10.2, MAC address 00e0-fc01-0000, and output interface Ten-GigabitEthernet 1/0/1 in VLAN 10.
<Sysname> system-view [Sysname] arp static 202.38.10.2 00e0-fc01-0000 10 Ten-GigabitEthernet 1/0/1
Related commands
display arp
reset arp