arp static

Function

The arp static command configures a static Address Resolution Protocol (ARP) entry.

The undo arp static command deletes a static ARP entry.

By default, no static ARP entry is configured.

Format

arp static ip-address mac-address

undo arp static ip-address [ mac-address ]

undo arp static ip-address [ mac-address ] vpn-instance vpn-instance-name

undo arp static vpn-instance vpn-instance-name

undo arp static all

arp static ip-address mac-address vid vlan-id

arp static ip-address mac-address vpn-instance vpn-instance-name [ vid vlan-id ]

arp static ip-address mac-address [ vid vlan-id ] interface { interface-name | interface-type interface-number }

arp static ip-address mac-address vid vlan-id cevid cevid interface { interface-name | interface-type interface-number }

undo arp static ip-address [ mac-address ] [ vid vlan-id ] interface { interface-name | interface-type interface-number }

undo arp static ip-address [ mac-address ] vid vlan-id cevid cevid interface { interface-name | interface-type interface-number }

Parameters

Parameter Description Value
ip-address

Specifies the IP address in a static ARP entry.

The value is in dotted decimal notation.

mac-address

Specifies the MAC address in a static ARP entry.

The value is a 12-digit hexadecimal number, in the format of H-H-H. Each H is 4 digits. If an H contains fewer than 4 digits, the left-most digits are padded with zeros. For example, e0 is displayed as 00e0.

vid vlan-id

Specifies the outer VLAN ID corresponding to a static ARP entry.

The value is an integer ranging from 1 to 4094.

interface interface-name

Specifies the name of the outbound interface of static ARP packets.

-

interface interface-type interface-number

Specifies the outbound interface of static ARP packets.

-

cevid cevid

Specifies the inner VLAN ID corresponding to a static ARP entry.

The value is an integer ranging from 1 to 4094.

vpn-instance vpn-instance-name

Specifies the VPN instance name of a static ARP entry.

The value is a string of 1 to 31 characters.

all

Deletes all static ARP entries.

-

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
arp write

Usage Guidelines

Usage Scenario

The arp static command usage is as follows:

  • To configure common static ARP entries, run the arp static ip-address mac-address [ vpn-instance vpn-instance-name ] command. If vpn-instance vpn-instance-name parameter is specified, the ARP entry belongs to the specified VPN instance.
  • To configure static ARP entries for a sub-interface, run the arp static ip-address mac-address [ vpn-instance vpn-instance-name ] vid vlan-id command. If vid vlan-id is not specified, the VLAN ID of 0 is used.

Implementation Procedure

Create a static ARP entry. If the static ARP entry already exists, the system updates the entry.

Configuration Impact

After a static ARP entry is configured, the ARP entry cannot be dynamically learned.

Precautions

When configuring static ARP on a QinQ or dot1q VLAN tag termination sub-interface, you must specify an outbound interface. Otherwise, traffic cannot be forwarded. In this case, the QinQ or dot1q VLAN tag termination sub-interface does not learn the outbound interface of packets.

Example

# Configure a static ARP entry with the IP address 1.1.1.1 mapped to the MAC address 00e0-fc12-3456 in VPN 1.
<HUAWEI> system-view
[~HUAWEI] ip vpn-instance vpn1
[*HUAWEI-vpn-instance-vpn1] ipv4-family
[*HUAWEI-vpn-instance-vpn1-af-ipv4] quit
[*HUAWEI-vpn-instance-vpn1] quit
[*HUAWEI] arp static 1.1.1.1 00e0-fc12-3456 vpn-instance vpn1
# Configure a static ARP entry with the IP address 10.0.0.1 mapped to the MAC address aa-fcc-12.
<HUAWEI> system-view
[~HUAWEI] arp static 10.0.0.1 aa-fcc-12
# Configure a static ARP entry with the IP address 1.1.1.1 mapped to the MAC address 00e0-fc12-3456 in VLAN 10.
<HUAWEI> system-view
[~HUAWEI] arp static 1.1.1.1 00e0-fc12-3456 vid 10
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >