- Hosts and DNS
- Posted by antonio.caprio@gmail.com on January 27th, 2008
Hi,
it seems that windows xp sp2 queries DNS server to resolve names that
it already knows because names exist in the hosts file, sometime it
spends a lot of time to do this (DNS problem of course), however the
hosts file has priority because the IP from hosts file is returned and
IP from DNS is ignored. Is it right? How can I avoid that?
Thank you
Antonio
- Posted by Robert L. \(MS-MVP\) on January 27th, 2008
Correct. hosts file has priority. In most cases, we don't use hosts file.
--
Bob Lin, MS-MVP, MCSE & CNE
Networking, Internet, Routing, VPN Troubleshooting on
http://www.ChicagoTech.net
How to Setup Windows, Network, VPN & Remote Access on
http://www.HowToNetworking.com
<antonio.caprio@gmail.com> wrote in message
news:90ccd90f-b41b-449d-82c6-f645435161d3@e6g2000prf.googlegroups.com...
- Posted by Robert L. \(MS-MVP\) on January 27th, 2008
Correct. hosts file has priority. In most cases, we don't use hosts file.
--
Bob Lin, MS-MVP, MCSE & CNE
Networking, Internet, Routing, VPN Troubleshooting on
http://www.ChicagoTech.net
How to Setup Windows, Network, VPN & Remote Access on
http://www.HowToNetworking.com
<antonio.caprio@gmail.com> wrote in message
news:90ccd90f-b41b-449d-82c6-f645435161d3@e6g2000prf.googlegroups.com...
- Posted by Chuck [MVP] on January 27th, 2008
On Sun, 27 Jan 2008 05:38:18 -0800 (PST), antonio.caprio@gmail.com wrote:
Antonio,
For accessing local resources (computers on the LAN), most computers running
Windows XP don't use DNS, they do name resolution broadcasts. For name
resolution, broadcasts have priority. You can change the resolution type, if
you wish.
<http://nitecruzr.blogspot.com/2005/05/address-resolution-on-lan.html>
http://nitecruzr.blogspot.com/2005/0...on-on-lan.html
For accessing remote resources, a Hosts file will override DNS use.
<http://nitecruzr.blogspot.com/2005/07/local-name-and-address-resolution-on.html>
http://nitecruzr.blogspot.com/2005/0...lution-on.html
Use of the Hosts file is a built-in part of IP networking. If you don't want
the Hosts file, being accessed, to interfere, don't put entries in the file. An
empty file will send all queries to DNS.
--
Cheers,
Chuck, MS-MVP 2005-2007 [Windows - Networking]
http://nitecruzr.blogspot.com/
Paranoia is not a problem, when it's a normal response from experience.
My email is AT DOT
actual address pchuck mvps org.
- Posted by Chuck [MVP] on January 27th, 2008
On Sun, 27 Jan 2008 05:38:18 -0800 (PST), antonio.caprio@gmail.com wrote:
Antonio,
For accessing local resources (computers on the LAN), most computers running
Windows XP don't use DNS, they do name resolution broadcasts. For name
resolution, broadcasts have priority. You can change the resolution type, if
you wish.
<http://nitecruzr.blogspot.com/2005/05/address-resolution-on-lan.html>
http://nitecruzr.blogspot.com/2005/0...on-on-lan.html
For accessing remote resources, a Hosts file will override DNS use.
<http://nitecruzr.blogspot.com/2005/07/local-name-and-address-resolution-on.html>
http://nitecruzr.blogspot.com/2005/0...lution-on.html
Use of the Hosts file is a built-in part of IP networking. If you don't want
the Hosts file, being accessed, to interfere, don't put entries in the file. An
empty file will send all queries to DNS.
--
Cheers,
Chuck, MS-MVP 2005-2007 [Windows - Networking]
http://nitecruzr.blogspot.com/
Paranoia is not a problem, when it's a normal response from experience.
My email is AT DOT
actual address pchuck mvps org.
- Posted by antonio.caprio@gmail.com on January 27th, 2008
On Jan 27, 5:06 pm, "Chuck [MVP]" <n...@example.net> wrote:
Hi,
thank you all for yours answers, I'm sorry I think my english is too
poor to explain the problem, I will try by an example.
Scenario:
My hosts file
127.0.0.1 localhost
127.0.0.1 www.google.com
If I ping www.google.com I get the right response:
Esecuzione di Ping www.google.com [127.0.0.1] con 32 byte di dati:
Risposta da 127.0.0.1: byte=32 durata<1ms TTL=128
Risposta da 127.0.0.1: byte=32 durata<1ms TTL=128
Risposta da 127.0.0.1: byte=32 durata<1ms TTL=128
Where is the problem? When I have DNS problem I get response (right IP
response and expected time response) after a lot of time, then I think
that xindows xp is querying DNS despite it already knows the IP and
that is what I don't want, of course it is not a ping question for me,
that is only an example. I hope I've been more clearly.
Regards
Antonio
- Posted by antonio.caprio@gmail.com on January 27th, 2008
On Jan 27, 5:06 pm, "Chuck [MVP]" <n...@example.net> wrote:
Hi,
thank you all for yours answers, I'm sorry I think my english is too
poor to explain the problem, I will try by an example.
Scenario:
My hosts file
127.0.0.1 localhost
127.0.0.1 www.google.com
If I ping www.google.com I get the right response:
Esecuzione di Ping www.google.com [127.0.0.1] con 32 byte di dati:
Risposta da 127.0.0.1: byte=32 durata<1ms TTL=128
Risposta da 127.0.0.1: byte=32 durata<1ms TTL=128
Risposta da 127.0.0.1: byte=32 durata<1ms TTL=128
Where is the problem? When I have DNS problem I get response (right IP
response and expected time response) after a lot of time, then I think
that xindows xp is querying DNS despite it already knows the IP and
that is what I don't want, of course it is not a ping question for me,
that is only an example. I hope I've been more clearly.
Regards
Antonio
- Posted by Lanwench [MVP - Exchange] on January 27th, 2008
antonio.caprio@gmail.com wrote:
Open your hosts file and see what you've got in it.
- Posted by Lanwench [MVP - Exchange] on January 27th, 2008
antonio.caprio@gmail.com wrote:
Open your hosts file and see what you've got in it.
- Posted by antonio.caprio@gmail.com on January 27th, 2008
On Jan 27, 7:05 pm, "Lanwench [MVP - Exchange]"
<lanwe...@heybuddy.donotsendme.unsolicitedmailatya hoo.com> wrote:
# Copyright (c) 1993-1999 Microsoft Corp.
#
# Questo è un esempio di file HOSTS usato da Microsoft TCP/IP per
Windows.
#
# Questo file contiene la mappatura degli indirizzi IP ai nomi host.
# Ogni voce dovrebbe occupare una singola riga. L'indirizzo IP
dovrebbe
# trovarsi nella prima colonna seguito dal nome host corrispondente.
# L'indirizzo e il nome host dovrebbero essere separati da almeno uno
spazio
# o punto di tabulazione.
#
# È inoltre possibile inserire commenti (come questi) nelle singole
righe
# o dopo il nome del computer caratterizzato da un simbolo '#'.
#
# Per esempio:
#
# 102.54.94.97 rhino.acme.com # server origine
# 38.25.63.10 x.acme.com # client host x
127.0.0.1 localhost
127.0.0.1 www.dummy.jeeg www.chorus.jeeg www.wiki.jeeg www.cms.jeeg
www.dummy.jeeg www.chorus.jeeg www.wiki.jeeg www.cms.jeeg are
virtualhosts on my local apache webserver.
You can check that I told, add an entry to your host file, ping it,
set a fake dns server on your system (both primary dns and secondary
dns ) ping again, you should have a delay before you get response.
Regards
Antonio
- Posted by antonio.caprio@gmail.com on January 27th, 2008
On Jan 27, 7:05 pm, "Lanwench [MVP - Exchange]"
<lanwe...@heybuddy.donotsendme.unsolicitedmailatya hoo.com> wrote:
# Copyright (c) 1993-1999 Microsoft Corp.
#
# Questo è un esempio di file HOSTS usato da Microsoft TCP/IP per
Windows.
#
# Questo file contiene la mappatura degli indirizzi IP ai nomi host.
# Ogni voce dovrebbe occupare una singola riga. L'indirizzo IP
dovrebbe
# trovarsi nella prima colonna seguito dal nome host corrispondente.
# L'indirizzo e il nome host dovrebbero essere separati da almeno uno
spazio
# o punto di tabulazione.
#
# È inoltre possibile inserire commenti (come questi) nelle singole
righe
# o dopo il nome del computer caratterizzato da un simbolo '#'.
#
# Per esempio:
#
# 102.54.94.97 rhino.acme.com # server origine
# 38.25.63.10 x.acme.com # client host x
127.0.0.1 localhost
127.0.0.1 www.dummy.jeeg www.chorus.jeeg www.wiki.jeeg www.cms.jeeg
www.dummy.jeeg www.chorus.jeeg www.wiki.jeeg www.cms.jeeg are
virtualhosts on my local apache webserver.
You can check that I told, add an entry to your host file, ping it,
set a fake dns server on your system (both primary dns and secondary
dns ) ping again, you should have a delay before you get response.
Regards
Antonio
- Posted by Lanwench [MVP - Exchange] on January 29th, 2008
antonio.caprio@gmail.com wrote:
<snip>
Yes, I understand how to add entries to my hosts file. I am not sure what
the problem is with your system which prompts you to write. You should not
have a lot of entries in HOSTS - it will cause delays. You should be using
DNS as your primary means of name resolution.
- Posted by Lanwench [MVP - Exchange] on January 29th, 2008
antonio.caprio@gmail.com wrote:
<snip>
Yes, I understand how to add entries to my hosts file. I am not sure what
the problem is with your system which prompts you to write. You should not
have a lot of entries in HOSTS - it will cause delays. You should be using
DNS as your primary means of name resolution.
- Posted by Chuck [MVP] on January 29th, 2008
On Sun, 27 Jan 2008 11:34:59 -0800 (PST), antonio.caprio@gmail.com wrote:
The Hosts file is a component of Internet Protocol, that's been there since
before DNS was developed. If you don't want the delay, don't put things in the
Hosts file.
It's also possible that the delay is a result of running an Apache web server.
Have you done any performance analysis, with and without Apache running?
<http://nitecruzr.blogspot.com/2006/04/watching-what-your-computer-is-doing.html>
http://nitecruzr.blogspot.com/2006/0...-is-doing.html
--
Cheers,
Chuck, MS-MVP 2005-2007 [Windows - Networking]
http://nitecruzr.blogspot.com/
Paranoia is not a problem, when it's a normal response from experience.
My email is AT DOT
actual address pchuck mvps org.
- Posted by Chuck [MVP] on January 29th, 2008
On Sun, 27 Jan 2008 11:34:59 -0800 (PST), antonio.caprio@gmail.com wrote:
The Hosts file is a component of Internet Protocol, that's been there since
before DNS was developed. If you don't want the delay, don't put things in the
Hosts file.
It's also possible that the delay is a result of running an Apache web server.
Have you done any performance analysis, with and without Apache running?
<http://nitecruzr.blogspot.com/2006/04/watching-what-your-computer-is-doing.html>
http://nitecruzr.blogspot.com/2006/0...-is-doing.html
--
Cheers,
Chuck, MS-MVP 2005-2007 [Windows - Networking]
http://nitecruzr.blogspot.com/
Paranoia is not a problem, when it's a normal response from experience.
My email is AT DOT
actual address pchuck mvps org.