TCP/IP Troubleshooting

Previous Topic Next Topic

Arp

Arp allows you to view and modify the ARP cache. If two hosts on the same subnet cannot ping each other successfully, try running the arp -a command on each computer to see whether the computers have the correct media access control (MAC) addresses listed for each other. You can use Ipconfig to determine a host's correct MAC address.

You can also use Arp to view the contents of the ARP cache by typing arp -a at a command prompt. This displays a list of the ARP cache entries, including their MAC addresses. Following is an example list of ARP cache entries.

C:\>arp -a


Interface: 172.16.0.142 on Interface 0x2

   Internet address     Physical Address      Type

   172.16.0.1           00-e0-34-c0-a1-40     dynamic

   172.16.1.231         00-00-f8-03-6d-65     dynamic

   172.16.3.34          08-00-09-dc-82-4a     dynamic

   172.16.4.53          00-c0-4f-79-49-2b     dynamic

   172.16.5.102         00-00-f8-03-6c-30     dynamic


If another host with a duplicate IP address exists on the network, the ARP cache might have the MAC address for the other computer placed in it, and this can lead to intermittent problems with address resolution. When a computer on the local network sends an ARP Request to resolve the address, it forwards its data to the MAC address corresponding to the first ARP Reply it receives. Arp can help by listing, adding, and removing the relevant entries.

You can use arp -d <IP address> to delete incorrect entries. Use arp -s <MAC address> (where the MAC address is formatted as hexadecimal bytes separated by dashes) to add new static entries; these static entries do not expire from the ARP cache. However, static entries do not persist after a reboot. For persistent static ARP cache entries, you must create a batch file run from the Startup group.

Use arp -N <IP address> to list all the ARP entries for the network interface specified by <IP address>. Table 3.2 lists all Arp switches.

Table 3.2 Arp Switches

Switch Name Effect
-d <IP address> Delete Removes the listed entry from the ARP cache
-s <MAC address> Static Adds a static entry to the ARP cache
-N <Interface IP address> Interface Lists all ARP entries for the interface specified
-a Display Displays all the current ARP entries for all interfaces
-g Display Displays all the current ARP entries for all interfaces

© 1985-2000 Microsoft Corporation. All rights reserved.