Кэш или таблица (Address Resolution Protocol, протокол определения адреса) хранит соответствия IP-адресов и аппаратных MAC-адресов устройств в локальной сети для быстрой установки соединения без повторного опроса компьютеров в сети.
Обычно, данные, хранящиеся в кэше, проблем не вызывают, но при возникновении ошибок при подключениях в локальной сети можно попробовать выполнить очистку кэша ARP на случай, если в нём хранятся неактуальные данные. Об очистке кэша ARP и пойдет речь далее в инструкции.
Очистка кэша ARP в командной строке
Базовый способ очистки таблицы ARP — использование командной строки. Используйте следующие шаги:
- Запустите командную строку от имени Администратора. В Windows 10 и Windows 11 для этого можно начать набирать «Командная строка» в поиске на панели задач, затем нажать правой кнопкой мыши по найденному результату и выбрать соответствующий пункт контекстного меню.
- Используйте одну из следующих команд для очистки кэша ARP:
netsh interface IP delete arpcache
или
arp -d
- Перезагрузите компьютер.
Кэш ARP очищен.
Просмотреть содержимое кэша ARP можно с помощью команды
arp -a
Учитывайте, что сразу после очистки в нем начнут появляться новые записи — пустой кэш вы, вероятнее всего, не увидите.
Существует возможность настроить время жизни кэша ARP, изменив значения параметров DWORD (по умолчанию могут отсутствовать):
- ArpCacheLife (120 секунд по умолчанию)
- ArpCacheMinReferencedLife (600 секунд по умолчанию)
в разделе реестра
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Время задается в секундах в десятичной системе счисления.
An ARP (Address Resolution Protocol) is a communication protocol that works on a “Physical (Data-Link)” layer of a TCP/IP stack and is used to discover a MAC address of a device on a LAN (local-area network) based on its IP address.
An ARP table is used to store the discovered pairs of the MAC and IP addresses.
In this note i will show how to display the ARP table and how to clear the ARP cache using the Windows arp
command.
Cool Tip: How to show a routing table in Windows! Read more →
Show ARP Table
To display the current ARP table in Windows, use the arp
command with the -a
option:
C:\> arp -a Interface: 192.168.1.31 --- 0x7 Internet Address Physical Address Type 192.168.1.1 60-35-c0-6b-a2-b7 dynamic 192.168.1.255 ff-ff-ff-ff-ff-ff static 224.0.0.22 01-00-5e-00-00-16 static 224.0.0.252 01-00-5e-00-00-fc static
Show the ARP table in a verbose mode:
C:\> arp -av
To record an IP and MAC address of a device on a LAN to the ARP table, simply ping
it:
C:\> ping 192.168.1.95 Pinging 192.168.1.95 with 32 bytes of data: Reply from 192.168.1.952: bytes=32 time=18ms TTL=64 C:\> arp -a Interface: 192.168.1.31 --- 0x7 Internet Address Physical Address Type 192.168.1.1 60-35-c0-6b-a2-b7 dynamic 192.168.1.95 d6-58-01-33-dd-bc dynamic 192.168.1.255 ff-ff-ff-ff-ff-ff static 224.0.0.22 01-00-5e-00-00-16 static 224.0.0.252 01-00-5e-00-00-fc static
To discover all the devices on a LAN, you can ping
them all using this one-liner (adjust the IP of your network):
C:\> FOR /L %i IN (1,1,254) DO ping -n 1 -w 100 192.168.1.%i | FIND /i "Reply"
Clear ARP Cache
To clear an ARP cache it is required to open an elevated command prompt, otherwise you may receive an error as follows: “The ARP entry deletion failed: The requested operation requires elevation.”
To start the elevated command prompt, press the ⊞ Win keybutton to open the start menu, type in cmd
to search for the command prompt and press the Ctrl + Shift + Enter to start the command prompt as an administrator.
To clear the ARP cache in Windows, use the arp
command with the -d
option:
C:\> arp -d
How Does ARP Work – Explained
When one computer wants to communicate with another computer on the same LAN, it creates an IP packet with the source and destination IP addresses carrying the data from an application and encapsulates it in an Ethernet frame with the source and destination MAC addresses.
Address Resolution Protocol: The sending computer obviously knows its source MAC address, but how does it know the destination MAC address? That’s where ARP comes into play!
To find out a MAC address of the destination computer (if it is not in the ARP cache yet), it sends an ARP request to the broadcast MAC address ff:ff:ff:ff:ff:ff
(to the all devices on the LAN), and is basically asking:
Who has IP
192.168.1.95
and what is your MAC address?
The destination computer receives the message and replies with an ARP reply:
That’s me! And my MAC address is
xx:xx:xx:xx:xx:xx
The source computer adds the MAC and IP addresses of the destination computer to its ARP table and starts sending the data.
Cool Tip: Check if TCP port is opened in PowerShell! Read more →
Was it useful? Share this post with the world!
Download Windows Speedup Tool to fix errors and make PC run faster
ARP or Address Resolution Protocol in Windows is responsible for resolving IP addresses to MAC addresses to speed up connection over a local network. So instead of asking the router where a particular device is, again, it would simply use the already resolved IP to connect quickly. To get this done, it maintains a cache named ARP Cache. This post helps you understand and clear ARP Cache in Windows 11 and Windows 10.
Why do you need to Clear the ARP Cache?
Similar to DNS Cache, ARP Cache can get stale. If the IP addresses of the connected devices on the network change, it may be difficult to find those devices. So, if the ARP Cache is stale or has been damaged, you need to fix it. One of the major downsides to clearing the ARP cache is that rebuilding it may result in errors.
To clear Address Resolution Protocol (ARP) Cache on your Windows computer, you can restart the Routing and Remote Services or use the Command Prompt with netsh Tool.
Since it’s an administrative task, the methods will need admin permission or a user account to fix it.
1] Routing and Remote Services
- Press the Start button on the Keyboard and type Computer Management
- Once it appears on the list, click to open it
- Click on Services and Applications and then Services
- Locate the Routing and Remote Services and double-click to open it
- First, stop the service and then choose to disable it.
- Restart the PC, and come back to the same place, and enable it.
This process will clear all ARP or IP to MAC address mapping on the PC.
2] Command Prompt with netsh Tool
netsh tool is a command-line utility that offers a direct option to delete the ARP cache. You can run this command on PowerShell or Windows Terminal, or Command Prompt with admin privileges.
- Use WIN + X to open the Power Menu.
- Select Windows Terminal (administrator) to launch it
- Type netsh interface IP delete arpcache and press the Enter key to execute the command.
- All you will get is an Ok in response.
You can also use the following command to display and clear the ARP cache
arp –a //to display the ARP cache
arp –d //to clear ARP cache
Finally, you can also choose to restart the PC if it helps.
I hope the post was easy to follow, and you now know how to clear the ARP Cache in Windows 11 and Windows 10.
Is it possible to Clear ARP Cache for particular IP
The arp -d command can do that, i.e., arp -d 192.168.100.1. It comes in very handy if a particular IP to MAC address fails, and you want to resolve it quickly.
How long does an ARP Entry last in Windows?
The typical timeout for ARP Cache is 10 to 20 minutes, but the cache is cleared automatically. A fresh mapping is required the next time the PC or any device requests that address.
What is ARP Protocol?
Address Resolution Protocol or APR takes data from IP addresses from the computer hardware, i.e., MAC address or Machine Address. Similar to how a website name is converted into an IP address, IP addresses are further converted to Machine Addresses.
What is an Incomplete ARP Entry?
This is for individual IP addresses. When checking on the ARP entries, if you notice incomplete next to an entry, the device has issued an ARP request but is yet to receive a response.
What problems can occur with ARP?
MAC addresses spoofing and communication delays. While the first happens when ARP is manually configured, the second is when there are multiple ARP broadcasts in a network.
Anand Khanse is the Admin of TheWindowsClub.com, a 10-year Microsoft MVP (2006-16) & a Windows Insider MVP (2016-2022). Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.
Reader Interactions
The following tutorial explains how to use the arp
command in Windows to view and clear the ARP cache.
The Windows operating system maintains an ARP Cache—A table that contains the recent mappings of IP addresses to MAC addresses. The arp
command is the Windows command we use to view and modify the ARP table.
Command Options
The Windows arp
command has only a couple of options: -a
to view the ARP cache and -d
to clear the ARP cache.
-a | Use this option to display the ARP table. |
-d | Use this option to clear the ARP cache. |
-s | Use this option to add manual entries to the ARP table. |
You can run the arp
command from both CMD and Windows PowerShell.
Display ARP Table
To view the ARP cache on a Windows system, run the following command:
arp -a
Running arp -a
on Windows shows output similar to the following:
If the computer has multiple network interfaces, you will see an ARP table under each interface. We can view the ARP table of a specific interface with the -N
option by specifying the IP address of the NIC.
arp -a -N 192.168.1.245
Clear ARP Cache
To clear the ARP cache, we use the -d
option, as shown in the following example:
arp -d
The above command deletes all entries from the ARP table. To delete a single entry from the table, specify the IP address of the destination host, as shown in the following example:
arp -d 10.0.0.10
In the above example, the arp
command deletes the MAC address associated with host 10.0.0.10
.
Add a Static Entry to the ARP Table
The -s
option of the Windows arp
command allows administrators to add manual entries to the ARP cache. To add a static entry, you will run the arp
command as follows:
arp -s 10.0.0.20 00-aa-00-62-c6-09
In the arp -a
output, static entries are marked as «static» in the type column.
Address Resolution Protocol
ARP stands for Address Resolution Protocol. It is a TCP/IP protocol that resolves the MAC address of a destination host.
When the host_a needs to send a packet to host_b, it needs to know the MAC address of host_b. If host_a does not know the MAC address of host_b, it will send a broadcast message to the network asking for the MAC address (all devices in the local network receive this message).
Once the broadcast message is received, host_b responds to host_a with its MAC address. This process is known as Address Resolution.
Misconfigured or expired ARP cache entries in the system might be one of the reasons for network connectivity problems.
Are you aware that clearing the ARP cache in your system may fix loading problems and connectivity errors?
This article will look at how to check and clear the ARP cache in the different operating systems.
But before that…
What is ARP cache?
ARP stands for Address Resolution Protocol, which is responsible for discovering MAC addresses and mapping them to IP addresses in order to communicate successfully with other systems on the local network. This protocol works between the data link layer and network layer.
Instead of asking the router every time where the particular device is located and what its mac address is, our system would just connect using the previously resolved IP address.
When our systems find the MAC addresses for the particular IP address using ARP protocol, they will be stored in a table for future use. This table is called ARP cache. It contains a list of known IP addresses and their MAC addresses.
ARP request is a broadcast, and ARP reply is unicast.
When to clear the ARP cache?
If the IP addresses of the network-linked devices change, ARP entries can get corrupted or expired, and new entries may not always overrule the database’s expired entries.
As a result, it may impact network performance and may cause loading or connectivity problems. In this case, you can simply clear the ARP cache to resolve the issue because clearing the ARP cache will cause all of your requests to go through the entire ARP process again. During this process, the new entries will be saved in the ARP table.
In some cases, you might also experience loading issues not directly related to the ARP cache but rather your browser’s cache. For example, if web pages aren’t updating properly or content appears broken in Google Chrome, it might help to clear cache in Chrome to remove outdated files and force the browser to fetch the latest version of a page.
Some errors may occur during the rebuilding of the ARP cache table, so deleting the ARP cache all the time is not recommended. Instead, you can also reboot your router or system to resolve the connectivity problems.
How to clear the ARP cache?
We can easily clear the ARP cache in any operating system by using the command line. Let’s get started.
Windows
Step 1: Open a command prompt and run it as an administrator.
Step 2: To view the ARP cache table, just type the following command.
arp -a
This command displays the IP addresses, and it’s associated mac addresses.
Step 3: Next, to delete the cache table, you can use netsh utility.
netsh interface IP delete arpcache
or you can simply use
arp -d
Step 4: If you want to delete any specific entry in the cache, not the whole table.
arp -d <ip-address>
Sample Output:
C:\WINDOWS\system32>arp -a
Interface: 192.168.29.64 --- 0xd
Internet Address Physical Address Type
192.168.29.1 a8-da-0c-e8-0e-e6 dynamic
224.0.0.22 01-00-5e-00-00-16 static
224.0.0.251 01-00-5e-00-00-fb static
224.0.0.252 01-00-5e-00-00-fc static
Interface: 192.168.56.1 --- 0x14
Internet Address Physical Address Type
224.0.0.22 01-00-5e-00-00-16 static
224.0.0.251 01-00-5e-00-00-fb static
239.255.255.250 01-00-5e-7f-ff-fa static
C:\WINDOWS\system32>netsh interface IP delete arpcache
Ok.
You will get ‘OK’ as a response if you use the netsh utility to clear the cache table.
Linux
Step 1: Open a terminal and use the following IP utility command to clear the whole ARP table.
ip -s -s neigh flush all
Step 2: If you want to delete the ARP record for a particular address, use arp utility.
arp -d <ip-address>
Step 3: After deleting the entries, you can simply use the following command to view the ARP table in Linux.
arp -n
This command displays the whole arp table.
Sample output:
┌──(root💀kali)-[/home/geekflare]
└─# arp -d 10.0.2.1
┌──(root💀kali)-[/home/geekflare]
└─# arp -n
Address HWtype HWaddress Flags Mask Interface
10.0.2.1 (incomplete)
10.0.2.2 ether 01:00:5e:00:00:fc C eth0
10.0.2.3 ether a8:da:0c:e8:0e:e6 C eth0
Here, you can observe the cache entry for the specific address is cleared.
Mac
Step 1: Open a terminal in your mac and use the following commands.
Step 2: To view the existing ARP entries.
sudo arp -a
Step 3: To delete the cache for a particular interface
sudo arp -d 192.168.29.1 ifscope en0
Step 4: To clear the whole cache table
sudo arp -a -d
Sample output:
$ sudo arp -a
? (192.168.29.1) at 01:00:5e:00:00:fc on en0 ifscope [ethernet]
? (192.168.2.13) at a8:da:0c:e8:0e:e6 on en0 ifscope [ethernet]
? (192.168.1.21) at 01:00:5e:00:0e:16 on en0 ifscope permanent [ethernet]
$ sudo arp -a -d
192.168.29.1 (192.168.29.1) deleted
192.168.2.13 (192.168.2.13) deleted
192.168.1.21 (192.168.1.21) deleted
Conclusion
If you can’t ping a particular IP address in the same network even though they’re working correctly, it’s a sign that something is wrong. Your ARP cache table may need to be reconstructed again.
I hope you found this article helpful in learning how to clear the ARP cache in different operating systems.
You may also be interested in knowing how to change DNS servers for faster browsing or how to detect Rootkits in Windows, Linux and Mac.