Introduction
Every networked device maintains an ARP (Address Resolution Protocol) table to translate IP addresses into MAC (Media Access Control) addresses, enabling seamless communication on a local Ethernet segment. Understanding where the ARP table is stored on a device is essential for network administrators, security analysts, and anyone troubleshooting connectivity issues. This article explores the physical and logical locations of ARP caches across common operating systems, the mechanisms that keep them up‑to‑date, and the tools you can use to view, modify, or clear these tables. By the end of the read, you’ll know exactly where the ARP information lives, how the kernel manages it, and what best‑practice steps you should follow to keep your network healthy Most people skip this — try not to..
What Is an ARP Table?
- Purpose: Maps a known IPv4 address to its corresponding Layer‑2 MAC address.
- Scope: Exists only on the local broadcast domain (e.g., a LAN segment).
- Lifetime: Entries are temporary, usually expiring after 20–30 seconds of inactivity, though static entries can be configured to persist indefinitely.
The ARP table is not a file on disk; it is a runtime data structure maintained by the operating system’s networking stack (the kernel). Because it resides in volatile memory, the table disappears when the device reboots, unless static entries are re‑added at boot time Not complicated — just consistent..
How Different Operating Systems Store the ARP Table
1. Linux
In‑memory Kernel Cache
On Linux, the ARP cache lives inside the kernel’s networking subsystem. On top of that, the kernel stores each entry as a struct neighbour object in a hash table, accessible through the net/ipv4/arp. c source file Worth keeping that in mind..
User‑Space Visibility
-
/proc/net/arp – A virtual file that mirrors the kernel’s ARP cache. Reading this file displays a plain‑text table containing IP address, HW type, Flags, MAC address, Mask, and Device. Example:
$ cat /proc/net/arp IP address HW type Flags HW address Mask Device 192.168.1. -
ip neigh– Modern replacement for the olderarpcommand. It queries the same kernel structures and provides additional options (ip neigh show,ip neigh flush, etc.) Easy to understand, harder to ignore. Practical, not theoretical..
Persistent (Static) Entries
Static entries are stored in /etc/ethers (for the legacy arp command) or defined via ip neigh add with the nud permanent flag. Consider this: to make them survive reboots, administrators typically place a script in /etc/network/interfaces. d/ or use NetworkManager dispatcher scripts that re‑add the entries during interface initialization.
2. Windows
In‑memory ARP Cache
Windows stores the ARP table in the kernel’s TCP/IP stack (the NDIS driver layer). The cache is a dynamic list of MIB_IPNETROW structures, each representing an ARP entry Most people skip this — try not to. Surprisingly effective..
User‑Space Access
arp -a– Displays the current ARP cache in the command prompt. The output includes Interface, Internet Address, Physical Address, and Type (dynamic or static).- PowerShell –
Get-NetNeighborcmdlet provides a richer view, including state (Reachable,Stale, etc.) and link‑layer address.
Persistent Entries
Windows allows static ARP entries via the arp -s <IP> <MAC> command. These entries are stored in the registry under:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\PersistentArpCache
When the system boots, the TCP/IP stack reads this registry key and populates the in‑memory ARP table accordingly. Deleting or editing the key requires a reboot (or a manual arp -d followed by a netsh interface ip delete arpcache) Still holds up..
3. macOS (and iOS)
Kernel ARP Table
macOS, built on the XNU kernel, keeps the ARP cache in the kernel’s ifnet data structures. Like Linux, it is a volatile hash table Small thing, real impact..
User‑Space Tools
arp -a– Shows the ARP cache similar to BSD systems.netstat -nr -f inet– Lists routing tables, including ARP entries.sudo ndp -a– For IPv6 neighbor discovery (the IPv6 counterpart of ARP).
Persistent Entries
Static ARP entries can be added using arp -s <IP> <MAC> but are not automatically persisted across reboots. Which means to make them permanent, administrators add the command to a launch daemon (e. , a .g.plist file in /Library/LaunchDaemons/) that runs at startup.
4. BSD Variants (FreeBSD, OpenBSD, NetBSD)
Kernel Cache
Similar to macOS, BSD kernels maintain an ARP table in memory. The structure is called struct llinfo_arp Easy to understand, harder to ignore..
Access
arp -a– Lists current entries.netstat -an -f inet– Shows both routing and ARP information.
Persistence
Static entries are added with arp -s and can be scripted in /etc/rc.conf (FreeBSD) or /etc/rc.local to survive reboots.
Where the ARP Table Resides Physically
| OS | Physical Location | Persistence Mechanism |
|---|---|---|
| Linux | Kernel memory; exposed via /proc/net/arp (virtual file) |
Static entries via /etc/ethers or startup scripts |
| Windows | Kernel memory; persisted in Registry (PersistentArpCache) |
Registry entry survives reboot |
| macOS/BSD | Kernel memory; visible through arp command |
Startup scripts (launchd or /etc/rc.Worth adding: *) |
| Network devices (routers, switches) | ASIC/TCAM or internal RAM of the OS (e. g. |
Even though the ARP cache is in RAM, each OS provides a virtual representation (procfs, registry, command‑line tools) that users can query. This abstraction is why you can “read” the table from a file or command, even though the real data lives inside the kernel’s address space.
This is where a lot of people lose the thread.
How the ARP Table Is Updated
- ARP Request – When a device needs a MAC address for an IP not in its cache, it broadcasts an ARP request on the LAN.
- ARP Reply – The target host replies with its MAC address. The receiving kernel inserts a new entry (or updates an existing one) with a timestamp.
- Gratuitous ARP – Devices may broadcast unsolicited ARP replies (e.g., after an IP change) to update peers’ caches proactively.
- Cache Expiration – Entries age out based on the ARP timeout (default 60 seconds on many systems). The kernel marks them stale and may remove them after a further timeout if unused.
Understanding this flow helps when you see “incomplete” entries in arp -a—the request has been sent, but no reply has arrived yet.
Common Scenarios Involving ARP Table Location
A. Troubleshooting Duplicate IP Addresses
If two hosts claim the same IP, the ARP table on each may show conflicting MAC addresses. By examining the table (e.g., arp -a on Windows or ip neigh on Linux), you can pinpoint which MAC is being associated with the problematic IP and then locate the offending device physically on the network.
B. Preventing ARP Spoofing
Attackers manipulate the ARP cache to intercept traffic (Man‑in‑the‑Middle). Still, knowing that the ARP table resides in volatile kernel memory means you can use static entries or ARP inspection features on switches to lock down the mapping. On Windows, adding static entries to the registry reduces the window for spoofing Surprisingly effective..
Most guides skip this. Don't That's the part that actually makes a difference..
C. Persistent ARP Entries for Critical Devices
For servers that must always reach a specific printer or gateway, you may configure a static ARP entry. On Linux, adding the entry to /etc/ethers and enabling arpd or a systemd service ensures the mapping is recreated after each reboot Turns out it matters..
Frequently Asked Questions
Q1: Can I directly edit the ARP table file on Linux?
A: No. /proc/net/arp is a read‑only view of the kernel’s cache. To modify entries, use ip neigh add, arp -s, or ip neigh replace.
Q2: Does the ARP table survive a reboot on Windows?
A: Only static entries stored in the registry (PersistentArpCache) survive. Dynamic entries are lost when the system powers down Easy to understand, harder to ignore. Which is the point..
Q3: How much memory does the ARP cache consume?
A: Typically a few kilobytes. Each entry occupies roughly 40–60 bytes, so even with thousands of entries the impact is negligible That's the part that actually makes a difference..
Q4: Is there a way to view ARP entries on a router’s CLI?
A: Yes. On Cisco IOS, the command show ip arp displays the ARP table stored in the router’s RAM or TCAM. On Juniper Junos, use show arp.
Q5: Why do I sometimes see “incomplete” entries?
A: The device has sent an ARP request but hasn’t received a reply yet. This can happen due to network congestion, firewall blocking ARP, or the target host being offline Took long enough..
Best Practices for Managing ARP Tables
- Regularly audit dynamic entries – Use scheduled scripts (
cronon Linux, Task Scheduler on Windows) to log the ARP cache and detect anomalies. - Implement static entries only when necessary – Overusing static ARP can cause maintenance headaches and may break when network topology changes.
- Enable ARP inspection on switches – Port‑security features validate ARP packets against known MAC‑IP bindings, mitigating spoofing.
- Tune ARP timeout values – In high‑latency environments, increase the timeout (
sysctl -w net.ipv4.neigh.default.gc_stale_time=120on Linux) to reduce unnecessary ARP traffic. - Document static ARP configurations – Keep a central inventory of static entries, including the reason for each, to simplify troubleshooting and audits.
Conclusion
The ARP table is a volatile, kernel‑resident data structure that maps IPv4 addresses to MAC addresses, enabling devices to communicate on a local network. While the actual cache lives in RAM, each operating system offers a convenient interface—whether it’s /proc/net/arp on Linux, the registry on Windows, or simple command‑line tools on macOS and BSD—to view and manage these entries. Understanding where the ARP table is stored, how it is updated, and how to make entries persistent empowers you to troubleshoot connectivity problems, defend against ARP‑based attacks, and maintain a reliable network environment. By following the best‑practice guidelines outlined above, you can keep your ARP caches clean, secure, and aligned with the needs of your organization Took long enough..
Easier said than done, but still worth knowing.