arp
To add a permanent entry in the Address Resolution Protocol (ARP) cache, use the arp command in the appropriate command mode. To remove an entry from the ARP cache, enter the no form of this command.
arp [vrf vrf-name] ip-address hardware-address encapsulation-type [alias]
no arp [vrf vrf-name] ip-address hardware-address encapsulation-type [alias]
Syntax Description
vrf |
(Optional) Specifies VPN routing and forwarding (VRF) instance. |
vrf-name |
(Optional) VRF instance that identifies a VPN. |
ip-address |
IPv4 (network layer) address for which a permanent entry is added to the ARP cache. Enter the IPv4 address in a four-part dotted-decimal format that corresponds to the local data-link address (a 32-bit address). |
hardware-address |
Hardware (data link layer) address that the IPv4 address is linked to. Enter the local data-link address (a 48-bit address), such as 0800.0900.1834. |
encapsulation-type |
Encapsulation type. The encapsulation types are:
For Ethernet interfaces, this is typically the arpa keyword. |
alias |
(Optional) Causes the software to respond to ARP requests as if it were the owner of both the specified IP address and hardware address, whether proxy ARP is enabled or not. |
Command Default
No entries are permanently installed in the ARP cache.
Command Modes
XR Config modeHost-tracking configuration
Command History
Release |
Modification |
---|---|
Release 6.0 |
This command was introduced. |
Release 24.1.1 |
This command was made available in the host-tracking configuration mode. |
Usage Guidelines
The software uses ARP cache entries to translate 32-bit IP addresses into 48-bit hardware addresses.
Because most hosts support dynamic resolution, you generally need not specify static ARP cache entries.
Static entries are permanent entries that map a network layer address (IPv4 address) to a data-link layer address (MAC address). If the alias keyword is specified when creating the entry, the interface to which the entry is attached will act as if it is the owner of the specified addresses, that is, it will respond to ARP request packets for this network layer address with the data link layer address in the entry.
The software does not respond to any ARP requests received for the specified IP address unless proxy ARP is enabled on the interface on which the request is received. When proxy ARP is enabled, the software responds to ARP requests with its own local interface hardware address.
To remove all nonstatic entries from the ARP cache, enter the clear arp-cache in the appropriate configuration mode.
Task ID
Task ID |
Operations |
---|---|
cef |
read, write |
Examples
The following is an example of a static ARP entry for a typical Ethernet host:
Router# configure
Router(config)# arp 192.168.7.19 0800.0900.1834 arpa
The following is an example of configuring ARP in host-tracking configuration mode:
Router#(config)# interface BVI1
Router#(config-if)# host-routing
Router#(config-if)# vrf vrf_1
Router#(config-if)# ipv4 address 10.0.0.1 255.255.0.0
Router#(config-if)# mac-address 0.dc1.dc2
Router#(config-if)# host-tracking
Router#(config-if-host-tracking)# bgp-gateway
Router#(config-if-host-tracking)# arp
Router#(config-if-host-tracking-arp)# bfd fast-detect
Router#(config-if-host-tracking-arp)#