Please Whitelist This Site?

I know everyone hates ads. But please understand that I am providing premium content for free that takes hundreds of hours of time to research and write. I don't want to go to a pay-only model like some sites, but when more and more people block ads, I end up working for free. And I have a family to support, just like you. :)

If you like The TCP/IP Guide, please consider the download version. It's priced very economically and you can read all of it in a convenient format without ads.

If you want to use this site for free, I'd be grateful if you could add the site to the whitelist for Adblock. To do so, just open the Adblock menu and select "Disable on tcpipguide.com". Or go to the Tools menu and select "Adblock Plus Preferences...". Then click "Add Filter..." at the bottom, and add this string: "@@||tcpipguide.com^$document". Then just click OK.

Thanks for your understanding!

Sincerely, Charles Kozierok
Author and Publisher, The TCP/IP Guide


NOTE: Using software to mass-download the site degrades the server and is prohibited.
If you want to read The TCP/IP Guide offline, please consider licensing it. Thank you.

The Book is Here... and Now On Sale!

Searchable, convenient, complete TCP/IP information.
The TCP/IP Guide

Custom Search







Table Of Contents  The TCP/IP Guide
 9  TCP/IP Lower-Layer (Interface, Internet and Transport) Protocols (OSI Layers 2, 3 and 4)
      9  TCP/IP Network Interface / Internet "Layer Connection" Protocols
           9  Address Resolution and the TCP/IP Address Resolution Protocol (ARP)
                9  TCP/IP Address Resolution Protocol (ARP)

Previous Topic/Section
ARP Message Format
Previous Page
Pages in Current Topic/Section
1
2
Next Page
Proxy ARP
Next Topic/Section

ARP Caching
(Page 2 of 2)

Cache Entry Expiration

Dynamic entries are added automatically to the cache on an “as needed” basis, so they represent mappings for hosts and routers that a given device is actively using. They do not need to be manually added or maintained. However, it is also important to realize that dynamic entries cannot be added to the cache and left there forever. The reason for this is that due to changes in the network, dynamic entries left in place for a long time can become stale.

Consider device A's ARP cache, which contains a dynamic mapping for device B, another host on the network. If dynamic entries stayed in the cache forever, the following situations might arise:

  • Device Hardware Changes: Device B might experience a hardware failure that requires its network interface card to be replaced. The mapping in device A's cache would become invalid, since the hardware address in the entry is no longer on the network.

  • Device IP Address Changes: Similarly, the mapping in device A's cache also would become invalid if device B's IP address changed.

  • Device Removal: Suppose device B is removed from the local network. Device A would never need to send to it again at the data link layer, but the mapping would remain in device A's cache, wasting space and possibly taking up search time.

To avoid these problems, dynamic cache entries must be set to automatically expire after a period of time. This is handled automatically by the ARP implementation, with typical timeout values being 10 or 20 minutes. After a particular entry times out, it is removed from the cache. The next time that address mapping is needed a fresh resolution is performed to update the cache. This is very slightly less efficient than static entries, but sending two 28-byte messages every 10 or 20 minutes isn't a big deal.

As mentioned in the overview of ARP operation, dynamic cache entries are added not only when a device initiates a resolution, but when it is the destination device as well. This is another enhancement that reduces unnecessary address resolution traffic.

Additional Caching Features

Other enhancements are also typically put into place, depending on the implementation. Standard ARP requires that if device A initiates resolution with a broadcast, each device on the network should update its own cache entries for device A even if they are not the device that A is trying to reach. However, these “third party” devices are not required to create new cache entries for A in this situation.

The issue here is a trade-off: creating a new cache entry would save any of those devices from needing to resolve device A's address in the near future. However, it also means every device on the network will quickly have an ARP cache table filled up with the addresses of most of the other devices on the network. This may not be desirable in larger networks. Even in smaller ones, this model may not make sense, given that modern computing is client/server in nature and peer devices on a LAN may not often communicate directly. Some devices may choose to create such cache entries, but set them to expire after a very short time to avoid filling the cache.

Each ARP implementation is also responsible for any other “housekeeping” required to maintain the cache. For example, if a device is on a local network with many hosts and its cache table is too small, it might be necessary for older, less-frequently-used entries to be removed to make room for newer ones. Ideally, the cache should be large enough to hold all other devices on the network that a device communicates with on a regular basis, along with some room for ones it occasionally talks to.


Previous Topic/Section
ARP Message Format
Previous Page
Pages in Current Topic/Section
1
2
Next Page
Proxy ARP
Next Topic/Section

If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



Home - Table Of Contents - Contact Us

The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005

© Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.