how to change DNS Search order

  • Thread starter Thread starter luozhixiang
  • Start date Start date
L

luozhixiang

I set a hostname in "hosts" file, like:
192.168.0.1 www.microsoft.com

when I use "ping www.microsoft.com", It allways
send packet to internet not to local manchine.

how can I change DNS revolution order, let windows
read hosts file first ,then request DNS server?

thanks a lot.

(please also cc reply to (e-mail address removed))
 
In
luozhixiang said:
I set a hostname in "hosts" file, like:
192.168.0.1 www.microsoft.com

when I use "ping www.microsoft.com", It allways
send packet to internet not to local manchine.

how can I change DNS revolution order, let windows
read hosts file first ,then request DNS server?

thanks a lot.

(please also cc reply to (e-mail address removed))

It should read the hosts file first. Run an ipconfig /displaydns to see
what's in the cache. If Microsoft's IP shows up, run an ipconfig /flushdns
and redisplay the cache to see if your hosts entry shows up. If not, make
sure it's spelled just HOSTS (without an extension) and it's in the correct
folder.

--
Regards,
Ace

Please direct all replies to the newsgroup so all can benefit.
This posting is provided "AS IS" with no warranties.

Ace Fekay, MCSE 2000, MCSE+I, MCSA, MCT, MVP
Microsoft Windows MVP - Active Directory
 
luozhixiang said:
I set a hostname in "hosts" file, like:
192.168.0.1 www.microsoft.com

when I use "ping www.microsoft.com", It allways
send packet to internet not to local manchine.

how can I change DNS revolution order, let windows
read hosts file first ,then request DNS server?

That's the default (the way you want it, host first). Check the client
to make sure the "DNS Client" service is running.

You're not expecting a DNS SERVER to check the hosts file are you?
They don't do that. DNS servers check their ZONE files, then they
recurse (or forward to another server for that) usually.
 
Back
Top