Windows operating systems provide the arp
command in order to list arp cache content with related IP address and MAC address matches. The ARP
or Address Resolution Protocol
is used to translate IP addresses to the MAC addresses or reverse. This resolution operation is stored in a table named ARP table. The arp command simply displays in formation from this ARP table.
List All Arp Table
The ARP records are stored in the arp table and all of them can be listed with the /a
option like below. This lists the Internet or IP Address, Physical or MAC Address, and Type like below. The dynamic
type means this record is learned via the arp requests and temporarily lost after a timeout.
> arp /a
![](/wp-content/uploads/2022/07/image-48.png)
List Specific IP Address
We can also use the arp command in order to list specific IP address arp records. This can be useful if the ARP table contains lots of records which makes it hard to find specific records. By listing specific IP addresses we can get related MAC addresses about this IP address The IP address is provided as a parameter to the arp command.
> arp /a 192.168.31.2
![](/wp-content/uploads/2022/07/image-49.png)
List Specific MAC Address
We can list ARP records according to the MAC address. The find
command is used to filter for the specified MAC address like below. The arp command output is redirected to the find command and filtered with the specified MAC address.
> arp /a | find "00-50-56-f6-2c-16"
Add Static ARP Record (IP Address and MAC Address)
The ARP table can be populated with a static entry for an IP address and related MAC address. The /s
option is used to add static ARP records like below.
> arp /s 192.168.31.2 00-50-56-f6-2c-16