how to change DNS Search order

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))
 
A

Ace Fekay [MVP]

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
 
H

Herb Martin

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top