cisco — Defining a Static ARP Cache

Defining a Static ARP Cache ARP and other address resolution protocols provide dynamic mapping between IP addresses and MAC addresses. Because most hosts support dynamic address resolution, you usually do not need to specify static ARP cache entries. If you must define a static ARP cache entry, you can do so globally, which installs a permanent entry in the ARP cache that the device uses to translate IP addresses into MAC addresses. Optionally, you can also specify that the device responds to ARP requests as if it were the owner of the specified IP address. If you do not want the ARP entry to be permanent, you can specify a timeout period for the ARP entry.

To define a static arp cache, perform this procedure: Procedure Configuring IP Unicast Routing Defining a Static ARP Cache Command or Action Purpose Step 1 enable Example: Device>enable Enables privileged EXEC mode. Enter your password if prompted. Step 2 configure terminal Example: Device#configure terminal Enters global configuration mode. Step 3 arp ip-address hardware-address type Example: Device(config)#ip 10.1.5.1 c2f3.220a.12f4 arpa Associates an IP address with a MAC (hardware) address in the ARP cache, and specifies encapsulation type as one of these: • arpa—ARP encapsulation for Ethernet interfaces • sap—HP’s ARP type Step 4 arp ip-address hardware-address type [alias] Example:

Device(config)#ip 10.1.5.3 d7f3.220d.12f5 arpa alias (Optional) Specifies that the switch responds to ARP requests as if it were the owner of the specified IP address. Step 5 interface interface-id Example: Device(config)#interface gigabitethernet 1/0/1 Enters interface configuration mode, and specifies the interface to configure. Step 6 arp timeout seconds Example: (Optional) Sets the length of time an ARP cache entry stays in the cache. The recommended value of ARP timeout is 4 hours Configuring IP Unicast Routing 15