Displays and modifies entries in the Address Resolution Protocol (ARP) cache, which contains one or more tables that are used to store IP addresses and their resolved Ethernet or Token Ring physical addresses. There is a separate table for each Ethernet or Token Ring network adapter installed on your computer. Used without parameters,Â arp displays help.
arp[-a [InetAddr] [-NIfaceAddr]] [-g [InetAddr] [-NIfaceAddr]] [-dInetAddr [IfaceAddr]] [-sInetAddr EtherAddr [IfaceAddr]]
- -a[Â InetAddr] [Â -NIfaceAddr]
- Displays current ARP cache tables for all interfaces. To display the ARP cache entry for a specific IP address, useÂ arp -a with theÂ InetAddr parameter, whereÂ InetAddr is an IP address. IfÂ InetAddr is not specified, the first applicable interface is used. To display the ARP cache table for a specific interface, use theÂ -NIfaceAddr parameter in conjunction with theÂ -a parameter whereÂ IfaceAddr is the IP address assigned to the interface. TheÂ -N parameter is case-sensitive.
- -g[Â InetAddr] [Â -NIfaceAddr]
- Identical toÂ -a.
- -d InetAddr[Â IfaceAddr]
- Deletes an entry with a specific IP address, whereÂ InetAddr is the IP address. To delete an entry in a table for a specific interface, use theÂ IfaceAddr parameter whereIfaceAddr is the IP address assigned to the interface. To delete all entries, use the asterisk (*) wildcard character in place ofÂ InetAddr.
- -s InetAddr EtherAddr [Â IfaceAddr]
- Adds a static entry to the ARP cache that resolves the IP addressÂ InetAddr to the physical addressÂ EtherAddr. To add a static ARP cache entry to the table for a specific interface, use theÂ IfaceAddr parameter whereÂ IfaceAddr is an IP address assigned to the interface.
- Displays help at the command prompt.
- The IP addresses forÂ InetAddr andÂ IfaceAddr are expressed in dotted decimal notation.
- The physical address forÂ EtherAddr consists of six bytes expressed in hexadecimal notation and separated by hyphens (for example, 00-AA-00-4F-2A-9C).
- Entries added with theÂ -s parameter are static and do not time out of the ARP cache. The entries are removed if the TCP/IP protocol is stopped and started. To create permanent static ARP cache entries, place the appropriateÂ arp commands in a batch file and use Scheduled Tasks to run the batch file at startup.
To display the ARP cache tables for all interfaces, type:
To display the ARP cache table for the interface that is assigned the IP address 10.0.0.99, type:
arp -a -N 10.0.0.99
To add a static ARP cache entry that resolves the IP address 10.0.0.80 to the physical address 00-AA-00-4F-2A-9C, type:
arp -s 10.0.0.80 00-AA-00-4F-2A-9C