arp
To add a static entry in the Address Resolution Protocol (ARP) table, use the arp command in the global configuration mode. To remove an entry from the ARP table, use the no form of the command.
[ no] arpip-address macmac-address[ vid vlan-id | port port-id]
Syntax Description
ip-address |
IPv4 address for which a permanent entry is added to the ARP table. Enter the IPv4 address in a four-part dotted-decimal format that corresponds to the local data-link address (a 32-bit address) |
mac mac-address |
Hardware MAC address that the IPv4 address is linked to. Enter the MAC address in dotted-hexadecimal notation. |
vid vlan-id |
(Optional) Specifies the configured VLAN. |
port port-id |
(Optional) Specifies the configured port |
Command Default
None
Command Modes
Global configuration (config)
Usage Guidelines
You can manually configure and maintain a static ARP entry. It cannot be aged or overwritten by dynamic ARP entry. A static ARP entry can be a long or a short entry. A static ARP entry comprises IP address and the corresponding MAC address. A long static ARP entry comprises the VLAN and egress interface details along with the IP address and MAC address. Long Static ARP entries can be directly used for packet forwarding.
When you manually configure a Long Static ARP entry, the IP address in the entry must be in the same network segment as the IP address of the VLAN interface on which the egress interface resides.
A short static ARP entry comprises the IP Address and the MAC Address. A short static ARP entry cannot be directly used for packet forwarding. A shorts static ARP request packet is sent by the host. If the source IP address and the source MAC address in the received response packet are the same as the configured IP address and MAC address, the ARP entry will be completed. Then it can be used for packet forwarding.
Examples
This example shows how to configure a short static ARP entry:
Device> enable
Device# configure terminal
Device(config)# arp 192.168.1.19 mac 00:02:9a:3b:94:d9