Cisco Networking: Static ARP Entry Managment - dummies

Cisco Networking: Static ARP Entry Managment

By Edward Tetz

A static Address Resolution Protocol (ARP) entry is a permanent entry in your ARP cache. A static ARP entry can be managed from a Cisco device or a Windows workstation. Even though it is rarely called for, you can add or delete an entry from your cache.

One reason you may want to add static ARP entries is if you have two hosts that communicate with each other constantly throughout the day; by adding static ARP entries for both systems in each other’s ARP cache, you reduce some network overhead, in the form of ARP requests and ARP replies.

The additional management work you need to do in adding and maintaining static ARP cache entries usually exceeds the network bandwidth that you save because ARP traffic consumes very little bandwidth. To add a static ARP cache entry, simply use a command like this:

C:>arp -s 20-cf-30-3a-f7-c9

This command creates a static entry in your ARP cache, so to start a communication session with the host that has a IP address, you do not need to start the process with an ARP request; you already know the target host’s MAC address. If a similar ARP entry has not been added to the target host, the target host needs to send an ARP request to your computer to find out your MAC address.

After adding the static ARP entry, the ARP cache on your computer looks like this (notice the static entry that has been created):

C:>arp -a
Interface: --- 0x60005
  Internet Address      Physical Address      Type          20-cf-30-3a-f7-c9     static         00-1d-7e-f8-23-d6     dynamic

Communication with the host at would work fine until the MAC address of the target computer changes, which could be because of a network card being changed or some other operation that changes the MAC address. When this happens, you need to delete the invalid ARP entry with an arp -d command, such as arp -d

If you are using a Cisco router, it will also have an option to examine your ARP information. Connect to your Cisco router and enter Privileged EXEC mode. From here, you can run the command show arp to display your current ARP cache:

Router#show arp
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet             -   0005.32af.8d72  ARPA   Ethernet0

The preceding code shows that only the router’s own information is in the ARP cache, and thus that there have not been any other local devices talking to this router. Note the dash in the Age column, which indicates the age of the entry. The hyphen denotes that this entry will not age-out of the cache. If your router has been routing traffic for several computers, the ARP cache looks like this:

Router#show arp
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet             0   000c.2960.4479  ARPA   Ethernet0
Internet             -   0005.32af.8d72  ARPA   Ethernet0
Internet             2   0021.2f31.0c64  ARPA   Ethernet0
Internet            13   0022.15ba.931c  ARPA   Ethernet0
Internet           1   001d.7ef8.23d6  ARPA   Ethernet0

Unlike Windows workstations, which keep ARP entries for a maximum of ten minutes, the ARP entry on a Cisco router remains in the cache for four hours (240 minutes), which is not uncommon because routers tend to spend most of their time dealing with the same hosts. Each time there is a communication session with that device, the counter is reset to 0.

A router is often configured as a default gateway for network devices, which is why they see the same hosts communicating with that for most of a day, and as long as those hosts keep sending data through the router, they will remain in the ARP cache. For a router connected to large network segments, this would result in a rather large ARP listing or ARP table.

A large ARP table consumes more of the router’s memory, so the caching time (or age) that Cisco has chosen was the result of a tradeoff of memory consumed by the ARP cache versus ARP’s need for fresh MAC information.

Similar to the earlier discussion on using ARP for the workstation, there may be times when you want to specify a static ARP entry for a router. This can be done by entering Global Configuration mode. From that mode, the arp command looks like this:

Router(config)#arp 20cf.303a.f7c9 arpa

After typing that command, your ARP cache includes that IP-MAC address pair, which would not age-out of the cache. This can be seen by the dash in the Age column. Static ARP entries are not usually identified to an interface like the dynamic entries are.

Router#show arp
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet             -   0005.32af.8d72  ARPA   Ethernet0
Internet            -   20cf.303a.f7c9  ARPA

If you no longer need the entry, or if you need to change to something else, remove the original entry with the no arp command:

Router(config)#no arp

After removing the entry, you can re-run the show arp command to see that it has been removed from the table:

Router#show arp
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet             -   0005.32af.8d72  ARPA   Ethernet0