Networking Forums

Networking Forums > Computer Networking > Windows Networking > HOSTS file not working (external DNS lookups) ?

Reply
Thread Tools Display Modes

HOSTS file not working (external DNS lookups) ?

 
 
Doug
Guest
Posts: n/a

 
      01-06-2004, 02:45 PM
I have a small home network of 3 machines running Win98. I recently
installed a router for internet access, and noticed on the logs that the
machines were occasionally doing external DNS lookups with the names of the
other machines on the internal network. To try and stop this I've created a
HOSTS file on each machine with the internal IP addresses and names of all
the machines on the internal network. However the logs show that the
machines are still doing EXTERNAL DNS lookups for these internal names.

Is there a command I could issue at the DOS prompt on these machines to
confirm that the HOSTS file is active, and that the correct names and IP
addresses have been picked up? Are there any other diagnostic commands that
might help to see why the DNS lookups are still being issued externally
instead of being satisfied by the contents of the HOSTS file?

TIA.

--Doug.
 
Reply With Quote
 
 
 
 
Gerry Voras
Guest
Posts: n/a

 
      01-06-2004, 08:44 PM
SInce the hosts file is usually checked first, I would take a look at making
sure that you have the format of the hosts file set correctly.

Make sure you're editing c:\windows\hosts, not hosts.sam .
Format is IP, then a tab delimit, then the name of the machine.
Make sure that "127.0.0.1 localhost" is the 1st line.
Make sure that none of the important lines are remarked out with a # symbol.

"Doug" <(E-Mail Removed)> wrote in message
news:Xns9468A06197071dougwzz99yahoocouk@195.92.193 .157...
> I have a small home network of 3 machines running Win98. I recently
> installed a router for internet access, and noticed on the logs that the
> machines were occasionally doing external DNS lookups with the names of

the
> other machines on the internal network. To try and stop this I've created

a
> HOSTS file on each machine with the internal IP addresses and names of all
> the machines on the internal network. However the logs show that the
> machines are still doing EXTERNAL DNS lookups for these internal names.
>
> Is there a command I could issue at the DOS prompt on these machines to
> confirm that the HOSTS file is active, and that the correct names and IP
> addresses have been picked up? Are there any other diagnostic commands

that
> might help to see why the DNS lookups are still being issued externally
> instead of being satisfied by the contents of the HOSTS file?
>
> TIA.
>
> --Doug.



 
Reply With Quote
 
Doug
Guest
Posts: n/a

 
      01-06-2004, 09:52 PM
"Gerry Voras" <(E-Mail Removed)> wrote in
news:#b$(E-Mail Removed):

> SInce the hosts file is usually checked first, I would take a look at
> making sure that you have the format of the hosts file set correctly.
>
> Make sure you're editing c:\windows\hosts, not hosts.sam .
> Format is IP, then a tab delimit, then the name of the machine.
> Make sure that "127.0.0.1 localhost" is the 1st line.
> Make sure that none of the important lines are remarked out with a #
> symbol.
>
>


I've already double checked that the file(s) are in the correct format as
you have described. I have even included the machine names in both upper
and lower case to avoid problems with case translation. What I need is a
command to check the 'local' DNS setup (i.e. the HOSTS file) to see if it
really is being picked up correctly. Do you know of such a command? I
thought NETSTAT might have an option for this but if it does I can't see
it...

Thanks.

--Doug.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Server 2003 R2 file sharing not working on external usb drive Matt Windows Networking 2 07-13-2007 01:24 AM
Windows Server 2003 R2 file sharing not working on external usb dr Matt Mucklo Windows Networking 0 07-05-2007 05:00 PM
HOSTS file entries not working Kamlesh Windows Networking 8 11-21-2005 03:38 PM
hosts file not working correctly? Mack B Windows Networking 1 05-04-2004 10:26 PM
Hosts file in Win 98 John McLean Windows Networking 2 09-08-2003 12:10 PM



1 2 3 4 5 6 7 8 9 10 11