Arp command
The arp (Address Resolution Protocol) command displays, adds, and removes arp information from network devices.
Availability
Arp is an external command accessed through the C:\Windows or C:\Winnt\System32 directory, and is available for the following Microsoft operating systems as arp.exe.
- Windows 95
- Windows 98
- Windows Me
- Windows NT
- Windows 2000
- Windows XP
- Windows Vista
- Windows 7
- Windows 8
- Windows 10
- Windows 11
Arp syntax
ARP -s inet_addr eth_adr [if_addr] ARP -d inet_addr [if_addr] ARP -a [inet_addr] [-N if_addr]
-a | Displays current ARP entries by interrogating the current protocol data. If inet_addr is specified, the IP (Internet Protocol) and physical addresses for only the specified computer are displayed. If more than one network interface uses ARP, entries for each ARP table are displayed. |
-g | Same as -a |
inet_addr | Specifies an Internet address. |
-N if addr | Displays the ARP entries for the network interface specified by if_addr. |
-d | Deletes the host specified by inet_addr. |
-s | Adds the host and associates the Internet address inet_addr with the physical address eth_addr. The physical address is given as 6 hexadecimal bytes separated by hyphens. It should be noted that the entry is permanent. |
eth_addr | Specifies a physical address. |
if_addr | If present, this command specifies the Internet address of the interface whose address translation table should be modified. If not present, the first applicable interface will be used. |
Arp examples
arp -a
Interface 220.0.0.80 Internet Address Physical address Type 220.0.0.160 00-50-04-65-F7-23 static
The physical address or MAC (media access control) address as shown above in the format aa-bb-cc-dd-ee-ff is the unique manufacturer identification number. This number should always be a unique address.
arp -s 220.0.0.161 00-50-04-62-F7-23
Above, is an example of how to change the above IP address 220.0.0.160 to 220.0.0.161.
If an IP address has already been assigned to the specific network adapter, it is not possible to change that assigned IP address to a new address. DHCP (Dynamic Host Configuration Protocol), BOOTP (BOOTstrap Protocol) or RARP (Reverse Address Resolution Protocol) networks automatically assign the card an IP address. Therefore, this command would not be utilized.