JSI Tip 6540. How do I disable client-side DNS caching in Windows XP and Windows Server 2003?
I'm having DNS problems with my Cisco VPN connection. I'm testing if it might be related to a bad DNS cache.
Update: Yep. That did it. I could connect to work via my Cisco VPN from my home LAN, or from a cafe LAN. I couldn't do it from the hotel though! I have XP firewall disabled. When I tried to ping a machine in the office I saw the DNS was returning an IP address of 220.127.116.11
I tried various VPN options and even reinstalled it. Nothing worked. Finally I made a wild guess that XP cached DNS values and that the cache was corrupted. So I did the search and found the above.
Then I did:
net stop dnscache
- after this the VPN wouldn't connect at all
net start dnscache
- the VPN connected and I was fine again.
Update: I've since learned ipconfig, the secret weapon of windows IP networking, has some useful options for debugging DNS problems. There's a secret glitch however, a windows networking guru tells me one must run /flushdns TWICE to really clean out the Resolver cache.
Here are the options displayed with ipconfig /?:
/all Display full configuration information.
/release Release the IP address for the specified adapter.
/renew Renew the IP address for the specified adapter.
/flushdns Purges the DNS Resolver cache.
/registerdns Refreshes all DHCP leases and re-registers DNS names
/displaydns Display the contents of the DNS Resolver Cache.
/showclassid Displays all the dhcp class IDs allowed for adapter.
/setclassid Modifies the dhcp class id.