Bill Detwiler: If a bad ARP cache entry is causing networkconnectivity problems on your Windows machine, then flushing the cache couldfix the problem.
I'm Bill Detwiler, and during this episode of TR Dojo, I'llshow you how to clear a specific entry from the ARP cache and how to flush thewhole thing.
The Address Resolution Protocol (or ARP) is a crucialcomponent of IP networking on any operating system - not just Windows.
Basically, it links Ethernet (or IP) addressing to hardware(or MAC) addressing.
The ARP Cache is a collection of ARP entries (mostlydynamic) that are created when a hostname is resolved to an IP address and thenan IP address is resolved to a MAC address (so the computer can effectivelycommunicate with the IP address). The PC stores the mapped address in the ARPcache, and they stay there until the ARP cache entry timeout expires.
This isn’t usually a problem, but sometimes a bad ARP entrycan cause issues with Internet connections and Web page loading. When thisoccurs, deleting the problem entry can fix the problem. And if it doesn’t, youcan flush the whole thing and let Windows rebuild the cache.
You can manage and clear entries from the ARP cache usingthe ARP command from a command prompt that’s running with elevated privileges.
So, click Start and then type cmd in the search dialog box,right-click the cmd.exe icon, select Run as Administrator, and respond to theUAC prompt.
The ARP command has several switches, but for the purpose ofthis exercise, we’re only concerned with two of them.
The -a switch displays all the ARP entries for allinterfaces
And, the -d switch deletes a specific entry from the ARPcache.
So if we’re trying to troubleshoot a connection problem thatwe suspect is cause an invalid ARP entry, we would run arp with the -a switchand look through the output.
If you find an entry with MAC address of all zeros, likethis one, we can use the -d switch to delete it from the cache.
If removing a single entry doesn’t work, flushing the entirecache is your next step.
So, from the same prompt, enter the command:
netsh interface ip delete arpcache
Now, if you’re wondering why I didn’t use a command like
arp -d -a
or
arp -d *
Well, sometimes these commands work and sometimes theydon’t. So it’s best to stick with the netsh or network shell command, whichMicrosoft actually recommends.
Regardless of the method you use to flush the cache, you canuse the arp -a command to verify that it has indeed been cleared.
If the cache wasn’t cleared, you may need to disable Routingand Remote Services and then reissue the flush command.
To disable Routing and Remote Services:
Click Start | Control Panel, select Administrative Tools,and click Computer Management. Now double-click Services and Applications andthen double-click Services. Scroll down to Routing and Remote Services anddouble click it. Set the Startup Type to Disable and then make sure the serviceis actually stopped.
You should now be able to flush the arp cache with the netshcommand I showed you earlier.
In all honesty, invalid ARP entries aren't an extremely commonproblem and flushing a machine’s ARP cache is one of your last resorts whentroubleshooting a network connectivity issue. But when you’ve tried everythingelse, it can’t hurt.
So, thanks to TechRepublic blogger Jack Wallen for puttingthis tip together. I’ll link to his original blog post in the TR Dojo blog.
And as always, for more teachings on YOUR path to becomingan IT Ninja, visit trdojo.techrepublic.com, sign-up for our newsletter, orfollow me on Twitter.
Thanks for visiting the TR Dojo.