ARP cache
termKept in this browser · My desk
A host's table of IP-to-MAC address mappings learned through the Address Resolution Protocol (ARP), consulted before every frame is sent to a neighbour on the local network.
RFC 826 calls it the translation table and leaves ageing to the implementer; Linux keeps it as the neighbour table, whose entries move through the states reachable, stale, delay, probe and failed, with permanent and noarp for entries the kernel does not validate. Its weakness is the merge rule: an existing entry takes the hardware address of any ARP packet whose sender claims that IP address, which is what ARP poisoning exploits.
What it is. The ARP cache is a host's table of IP-to-MAC (media access control) address mappings learned through the Address Resolution Protocol (ARP); the host consults it before every frame it sends to a neighbour on the local network, and only asks the network when the entry is missing or doubtful. RFC (Request for Comments) 826 (November 1982) calls it the translation table and stores triplets of protocol type, sender protocol address and sender hardware address; Linux keeps it as the IPv4 half of its neighbour table, beside the IPv6 neighbour cache.
How long an entry lives. RFC 826 left ageing outside the protocol: it may be desirable to have table ageing and timeouts, Plummer wrote, and suggested either resetting an entry's timer whenever a packet arrives from that host or having a daemon send a unicast REQUEST to the cached address and delete the entry if no REPLY comes. Linux follows the second idea, the same Neighbor Unreachability Detection written down for IPv6 in RFC 4861 (September 2007), whose constants match Linux's ARP defaults: an entry is reachable for a random time between half and one and a half times base_reachable_time, 30 seconds, so between 15 and 45 seconds; positive feedback from a higher layer, such as a TCP acknowledgement, extends it; then it goes stale. Sending to a stale entry moves it to delay for delay_first_probe_time (5 seconds), then to probe, with up to ucast_solicit (3) unicast probes; if those fail the kernel broadcasts mcast_solicit (3) requests and the entry fails. The garbage collector keeps at least gc_thresh1 (128) entries, may exceed gc_thresh2 (512) for 5 seconds and never holds more than gc_thresh3 (1,024); locktime (1 second) stops thrashing when two hosts claim one address; unres_qlen limits to 3 the packets queued while an address is unresolved.
States you will see. Linux keeps it as the neighbour table, whose entries move through the states reachable, stale, delay, probe and failed, with permanent and noarp for entries the kernel does not validate; ip neigh show prints them, and incomplete marks a request still waiting for a reply. A worked timeline: at second 0 a host resolves its gateway 192.0.2.1 (an RFC 5737 documentation address) and the entry is reachable; TCP traffic keeps confirming it; the gateway reboots with a new network card, the confirmations stop, and some 15 to 45 seconds later the entry is stale; the next packet moves it to delay, 5 seconds later to probe, three unicast probes to the old address go unanswered, a broadcast request finds the new card, and the entry is reachable again with the new address. Routers behave differently: their ARP entries commonly last hours (4 hours is the Arista EOS default Ivan Pepelnjak cites, and the GTER 45 slides give the same for Cisco and Juniper), which is long enough to outlive a switch's 5-minute MAC table and flood traffic.
Reading it. A complete entry for the default gateway is the first thing to check when a host cannot leave its subnet, and an entry for the gateway that carries an unfamiliar hardware address is the first sign of poisoning. An incomplete or failed entry means no reply came back: wrong VLAN (virtual local area network), a cable, a filter, or a host that is down.
Its weakness. The cache's weakness is the merge rule: an existing entry takes the hardware address of any ARP packet whose sender claims that IP address, which is what ARP poisoning exploits. The National Vulnerability Database (NVD) record CVE-1999-0667 says it in one line for the protocol as a whole, and implementations have made it worse: CVE-2000-0612 records that Windows 95 and Windows 98 let spoofed ARP packets overwrite even static entries, and Cisco's 2002 tests found static entries overwritten by gratuitous ARP on Windows NT 4 and Windows 2000. Tools that write to other hosts' caches are ordinary: iputils arping sends unsolicited ARP with -U or -A precisely to update neighbours' caches, and its manual warns against installing it set-uid root for that reason.
Protecting it. A static or permanent entry stops the host believing neighbours about one address, as H D Moore's hardcoded router entry did for the metasploit.com server in 2008; the Linux arp_accept setting only decides whether gratuitous ARP may create new entries, because an existing one is updated regardless. Permanent entries are never garbage-collected, which is their strength and their cost: when the gateway's card changes, every static entry must change too. The rest of the protection lives outside the host: dynamic ARP inspection on the switch, arpwatch on the segment, encryption for what crosses it. Neighbours: ARP, ARP poisoning, gratuitous ARP, address conflict detection, the MAC address, and in IPv6 the neighbour cache of Neighbor Discovery.
Also known as: arp cache, arp table, neighbour cache, neighbor cache, tabela arp, cache arp
Sources
- RFC 826, An Ethernet Address Resolution Protocol, David C. Plummer, November 1982 (read 2026-11-23): the reception algorithm merges the sender's protocol and hardware addresses into an existing table entry before the opcode is examined, and a new hardware address supersedes the old one; no authentication
- The Linux kernel documentation, IP sysctl (read 2026-11-23): arp_accept decides whether gratuitous ARP creates new entries, but an existing entry is updated regardless; drop_gratuitous_arp; neighbour probe counters
- ip-neighbour(8), Linux manual page (read 2026-11-23): neighbour states permanent, noarp, stale, reachable, incomplete, delay, probe, failed
- H D Moore, Re: Metasploit - Hack ?, Full-Disclosure, 2 June 2008, 13:06 (read 2026-11-23): the router's address poisoned at the hosting provider; a hardcoded ARP entry fixed one server; 250 other servers exposed; 29 unsolicited unicast replies in about 8.5 seconds in the posted sample
- arp(7), Linux manual page, man7.org (read 2026-11-23): the kernel ARP cache and its /proc tunables; base_reachable_time 30 s (valid for a random time between half and one and a half times it), delay_first_probe_time 5 s, gc_stale_time 60 s, gc_thresh1, gc_thresh2 and gc_thresh3 of 128, 512 and 1,024 entries, locktime 1 s, ucast_solicit and mcast_solicit 3, unres_qlen 3; permanent entries never garbage-collected
- IETF, RFC 4861, Neighbor Discovery for IP version 6 (IPv6), T. Narten, E. Nordmark, W. Simpson and H. Soliman, September 2007 (read 2026-11-23): neighbour cache states INCOMPLETE, REACHABLE, STALE, DELAY and PROBE; REACHABLE_TIME 30,000 ms with a random factor of 0.5 to 1.5, RETRANS_TIMER 1,000 ms, DELAY_FIRST_PROBE_TIME 5 s, MAX_MULTICAST_SOLICIT and MAX_UNICAST_SOLICIT 3; a Hop Limit of 255 makes Neighbor Discovery immune to off-link senders; the Override flag
- NIST National Vulnerability Database (NVD), CVE-1999-0667, record through the NVD API (read 2026-11-23): the ARP protocol allows any host to spoof ARP replies and poison the ARP cache to conduct IP address spoofing or a denial of service; published date 19 September 1997; reference a Bugtraq post
- NIST National Vulnerability Database (NVD), CVE-2000-0612, record through the NVD API (read 2026-11-23): Windows 95 and Windows 98 do not properly process spoofed ARP packets, which lets remote attackers overwrite static entries in the cache table; published 29 June 2000
- arping(8), iputils, Alexey Kuznetsov, Debian bookworm manual page (read 2026-11-23): -D duplicate address detection mode with sender address 0.0.0.0, exit status 0 when no reply arrives (citing RFC 2131 4.4.1); -U and -A unsolicited ARP to update neighbours' caches; not to be installed set-uid root because it lets a user modify neighbours' ARP caches
- Sean Convery (Cisco Systems), Hacking Layer 2: Fun with Ethernet Switches, Black Hat USA 2002 (read 2026-11-23): Cisco and @stake tests; DTP frames to 0100.0ccc.cccc with SNAP type 0x2004; basic and double-encapsulated VLAN hopping, the latter one-way and working with trunking off; gratuitous ARP misuse, static entries overwritten on NT4 and Windows 2000, port security does not help; STP root claims, TCN ageing in 15 s, BPDU guard and root guard with their first releases
- IETF, RFC 5737, IPv4 Address Blocks Reserved for Documentation, J. Arkko, M. Cotton and L. Vegoda, January 2010, Informational (read 2026-11-23): 192.0.2.0/24 (TEST-NET-1), 198.51.100.0/24 (TEST-NET-2) and 203.0.113.0/24 (TEST-NET-3) for documentation
- Ivan Pepelnjak, On ARP and MAC Aging Timers, ipSpace.net, May 2026 (read 2026-11-23): Arista EOS defaults of a 4-hour ARP timer and a 5-minute MAC ageing timer, quoting a reader; the 5-minute value a guessed compromise
- Douglas Fernando Fischer, Unicast Storm em link para o IX, GTER 45, 22 May 2018, NIC.br registro.br (read 2026-11-23): unicast flooding on IX links from MAC table expiry; ARP kept 4 hours on Cisco and Juniper against 30 seconds on MikroTik, MAC 5 minutes; raising the ageing helps and matching ARP and MAC timers makes sense