Two virtual machines on a test network could ping each other fine. Then one of them changed its network card’s hardware address, the kind of thing that happens when a router is replaced or a virtual machine is moved, and the other machine lost contact with it for roughly half a minute. Nothing in the IP settings had changed. The cause was ARP, the small protocol that turns an IP address into the hardware address an Ethernet frame actually needs, and the cache that remembers the answer. Everything below was observed on two Linux network namespaces joined by a virtual Ethernet cable, with tcpdump watching the wire.
Two kinds of address
IP for routing, MAC for delivery
An IP address says where a device sits in the network. An Ethernet frame can’t be addressed to an IP, though; it needs the destination’s 48-bit hardware address, the MAC. When one computer wants to send a packet to another on the same local network, it has to translate the IP address into a MAC first.
The protocol from 1982
That translation is the job of the Address Resolution Protocol. The original specification, RFC 826, “An Ethernet Address Resolution Protocol,” was written by David C. Plummer and published in November 1982. It defines two message types: a request (ares_op$REQUEST, opcode 1) and a reply (ares_op$REPLY, opcode 2).
The design hasn’t changed much in more than forty years. Every IPv4 device on an Ethernet or Wi-Fi network still does this, constantly, usually without anyone noticing until it goes wrong.

Watching one exchange
The test network
Two network namespaces, A at 10.9.0.1 and B at 10.9.0.2, were connected by a veth pair. A’s interface had the MAC f2:59:06:2c:f5:f5; B’s had 8e:89:bd:27:57:91. Before anything was sent, A’s neighbor table was empty.
Who has 10.9.0.2?
A single ping from A to B produced exactly two ARP frames, captured with tcpdump -n -e:
f2:59:06:2c:f5:f5 > ff:ff:ff:ff:ff:ff, ethertype ARP: Request who-has 10.9.0.2 tell 10.9.0.1
8e:89:bd:27:57:91 > f2:59:06:2c:f5:f5, ethertype ARP: Reply 10.9.0.2 is-at 8e:89:bd:27:57:91
The request went to ff:ff:ff:ff:ff:ff, the broadcast address. RFC 826 describes the sender causing the packet “to be broadcast to all stations on the Ethernet cable.” Every device on the segment receives it, and only the one that owns 10.9.0.2 answers. The reply came straight back to A’s MAC, not broadcast. Then the ping went through: 64 bytes from 10.9.0.2: icmp_seq=1 ttl=64 time=0.052 ms.
Both sides learned something
After that one exchange, A’s table held B’s address, and B’s table held A’s, even though B never asked:
A: 10.9.0.2 dev va lladdr 8e:89:bd:27:57:91 REACHABLE
B: 10.9.0.1 dev vb lladdr f2:59:06:2c:f5:f5 DELAY
That’s in the original design. RFC 826 tells a receiving host to record the sender’s address from the packet, updating an existing entry “with the new information in the packet” if one exists. A’s request carried A’s own IP and MAC, so B filed them away. When B needs to reply, it doesn’t have to ask.
The neighbor table and its states
ip neigh replaces arp
On modern Linux, the cache is shown with ip neigh (or ip neighbour). The older arp command wasn’t even installed in the test environment; /proc/net/arp held the same information in raw form. The ip-neighbour manual page lists the states an entry can be in.
What the states mean
From that man page, with what the test showed for each:
| State | Man page description | Seen in the test |
|---|---|---|
| REACHABLE | “valid until the reachability timeout expires” | right after a successful exchange |
| STALE | “valid but suspicious” | about 48 seconds later, with no traffic |
| DELAY | “validation is currently delayed” | the moment traffic resumed to a STALE entry |
| PROBE | “neighbor is being probed” | when DELAY ended without confirmation |
| INCOMPLETE | “not (yet) been validated/resolved” | right after pinging an address nobody owns |
| FAILED | “max number of probes exceeded without success” | a few seconds after INCOMPLETE |
Pinging 10.9.0.9, which no device had, left 10.9.0.9 dev va INCOMPLETE, then FAILED four seconds later. The ping itself reported 100% packet loss, with no other error. That FAILED entry is the giveaway when a host on the local network is off or misaddressed.
The timers behind it
The test interface reported these defaults:
net.ipv4.neigh.va.base_reachable_time_ms = 30000
net.ipv4.neigh.va.gc_stale_time = 60
net.ipv4.neigh.va.delay_first_probe_time = 5
net.ipv4.neigh.va.mcast_solicit = 3
A confirmed entry stays REACHABLE for a window based on 30 seconds. After that it goes STALE but is still used. When traffic uses a STALE entry, it moves to DELAY, and if nothing confirms the neighbor within about 5 seconds, the kernel sends a probe.
Revalidation goes direct
When A pinged B again after its entry had gone STALE, the capture showed something different from the first exchange:
f2:59:06:2c:f5:f5 > 8e:89:bd:27:57:91, ethertype ARP: Request who-has 10.9.0.2 tell 10.9.0.1
This time the request went straight to B’s known MAC, not to the broadcast address. Re-checking a known neighbor doesn’t bother everyone else on the network. Only a brand-new lookup, or one where the direct probe gets no answer, uses broadcast.

The 28-second outage
Changing a MAC under a live connection
Here is where the cache stops being invisible. With A’s entry for B in REACHABLE state, B’s MAC was changed to 02:00:00:00:00:bb. A had no way to know. It kept sending frames to the old address, and B, no longer owning that address, ignored them.
A ping every second from A showed the sequence, timed from the first failed attempt:
1s fail 8e:89:bd:27:57:91 REACHABLE
19s fail 8e:89:bd:27:57:91 DELAY
25s fail 8e:89:bd:27:57:91 PROBE
27s fail FAILED
28s ok 02:00:00:00:00:bb REACHABLE
For the rest of the REACHABLE window, the kernel trusted its cache and every ping vanished. When the entry aged into DELAY and then PROBE, the unicast probes went to the old MAC and got no answer. Only after the entry hit FAILED did the next ping trigger a fresh broadcast lookup, which found the new address. Total time without connectivity: about 28 seconds from the first failure, longer counting from the moment of the change.
Why real networks hit this
The same thing happens when a router or firewall is swapped for new hardware with the same IP, when a virtual machine moves between hosts and its MAC changes, or when a failover moves an IP from one server to another. Devices that cached the old MAC keep sending to it until their entries expire.
Gratuitous ARP: announcing a change
Telling everyone at once
The fix is for the device that changed to announce itself. RFC 5227, published in July 2008 by Stuart Cheshire of Apple, defines an “ARP Announcement” as an ARP request “broadcast on the local link” in which “both the sender and target IP address fields contain the IP address being announced.” The RFC notes that this is the same packet commonly called gratuitous ARP, and says its purpose is “to make sure that other hosts on the link do not have stale ARP cache entries.”
Testing it
The experiment was repeated with one difference. B’s MAC was changed again, to 02:00:00:00:00:cc, and B immediately sent one announcement with arping -U -c 1 -I vb 10.9.0.2. The capture on A’s side showed it:
02:00:00:00:00:cc > ff:ff:ff:ff:ff:ff, ethertype ARP: Request who-has 10.9.0.2 (ff:ff:ff:ff:ff:ff) tell 10.9.0.2
Sender and target are both 10.9.0.2, exactly as RFC 5227 describes. Half a second later, A’s table already had the new address, 10.9.0.2 dev va lladdr 02:00:00:00:00:cc STALE, and the next ping succeeded on the first try. No outage at all.
A detail from the Linux kernel’s networking sysctl documentation explains why A believed it so readily. The arp_accept setting defines how gratuitous ARP frames are handled “from devices that are not already present in the ARP table,” and by default those don’t create new entries. But when the table already holds that IP, as A’s did, the entry is updated regardless of the setting. Announcements refresh existing neighbors; they don’t add strangers.
When moving an IP address or replacing hardware causes a short blackout, a missing announcement is one place to look, and sending one by hand with arping -U is a quick test.

Clearing a stale entry by hand
Flush the cache
When a device has clearly changed and its neighbors haven’t caught up, the cache can be cleared on the waiting side:
ip neigh flush dev eth0
ip neigh del 192.168.1.1 dev eth0The man page notes that flush “does not run when no arguments are given,” so it needs at least a device or address, and that by default it skips permanent and noarp entries.
Static entries
ip neigh add 192.168.1.1 lladdr aa:bb:cc:dd:ee:ff dev eth0 nud permanent creates an entry that, per the man page, “is valid forever and can be only be removed administratively.” That protects a critical address like a gateway from being changed by any ARP message, at the cost of needing manual updates if the hardware is ever replaced.
The security side of trusting announcements
The test also shows the weakness. A believed B’s announcement instantly, with no proof that B was who it claimed to be. RFC 5227’s security section states it plainly: “A malicious host may send fraudulent ARP packets on the network.” Any device on the local segment can announce that it owns the router’s IP, and neighbors that accept the announcement will send their traffic to it. That’s ARP spoofing. ARP has no authentication of its own, so on a local network, who is allowed to plug in matters as much as who is allowed to log in.
Sources
- RFC 826, “An Ethernet Address Resolution Protocol” (Nov. 1982): https://www.rfc-editor.org/rfc/rfc826
- RFC 5227, “IPv4 Address Conflict Detection” (July 2008): https://www.rfc-editor.org/rfc/rfc5227
- Linux kernel documentation, “IP Sysctl”: https://docs.kernel.org/networking/ip-sysctl.html
- ip-neighbour(8) manual page, man7.org: https://man7.org/linux/man-pages/man8/ip-neighbour.8.html
