hosts file
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
hosts file

 
Post new topic   Reply to topic    Windows Server Forum Index -> Networking
Author Message
Mike
Guest





Posted: Sat Jan 08, 2005 10:11 pm    Post subject: hosts file Reply with quote

Hi,

I remember that a couple of years ago, I used to issue a command to "reload" the information contained in the "hosts" file (located in system32\drivers\etc). I cannot remember the exact command and I tried to look for it on the Internet, but unsuccessfully.

Do you know how I can reload the hosts' file info?

Thanks.
Mike
Back to top
Lanwench [MVP - Exchange]
Guest





Posted: Sat Jan 08, 2005 10:52 pm    Post subject: Re: hosts file Reply with quote

Mike wrote:
Quote:
Hi,

I remember that a couple of years ago, I used to issue a command to
"reload" the information contained in the "hosts" file (located in
system32\drivers\etc). I cannot remember the exact command and I
tried to look for it on the Internet, but unsuccessfully.

Do you know how I can reload the hosts' file info?

Thanks.
Mike

nbtstat -R

(type nbtstat /? for all parameters)
Back to top
Doug Sherman [MVP]
Guest





Posted: Sun Jan 09, 2005 1:24 am    Post subject: Re: hosts file Reply with quote

Maybe I'm reading too much into this - but you can use hosts files for
NetBIOS name resolution; and nbtstat -R will purge the NetBIOS name cache.
However, hosts files do not have 'reload' capabliity. Lmhosts files can do
this with #PRE tag entries:

http://www.microsoft.com/resources/documentation/Windows/2000/server/reskit/en-us/Default.asp?url=/resources/documentation/windows/2000/server/reskit/en-us/cnet/cnfd_lmh_HVLL.asp

Doug Sherman
MCSE Win2k/NT4.0, MCSA, MCP+I, MVP

"Lanwench [MVP - Exchange]"
<lanwench@heybuddy.donotsendme.unsolicitedmail.atyahoo.com> wrote in message
news:Oq9Z9Ma9EHA.1408@TK2MSFTNGP10.phx.gbl...
Quote:
Mike wrote:
Hi,

I remember that a couple of years ago, I used to issue a command to
"reload" the information contained in the "hosts" file (located in
system32\drivers\etc). I cannot remember the exact command and I
tried to look for it on the Internet, but unsuccessfully.

Do you know how I can reload the hosts' file info?

Thanks.
Mike

nbtstat -R

(type nbtstat /? for all parameters)

Back to top
Lanwench [MVP - Exchange]
Guest





Posted: Sun Jan 09, 2005 2:21 am    Post subject: Re: hosts file Reply with quote

Doug Sherman [MVP] wrote:
Quote:
Maybe I'm reading too much into this - but you can use hosts files for
NetBIOS name resolution; and nbtstat -R will purge the NetBIOS name
cache.

You're absolutely right - (although R is reload) - I knew LMHOSTs is
affected by this, but for some reason I also thought it was necessary/would
matter if the hosts file was changed during a session. After I saw your post
I tested mine, and it turns out I was wrong. Thanks for correcting me.

Quote:
However, hosts files do not have 'reload' capabliity. Lmhosts
files can do this with #PRE tag entries:


http://www.microsoft.com/resources/documentation/Windows/2000/server/reskit/en-us/Default.asp?url=/resources/documentation/windows/2000/server/reskit/en-us/cnet/cnfd_lmh_HVLL.asp

Doug Sherman
MCSE Win2k/NT4.0, MCSA, MCP+I, MVP

"Lanwench [MVP - Exchange]"
lanwench@heybuddy.donotsendme.unsolicitedmail.atyahoo.com> wrote in
message news:Oq9Z9Ma9EHA.1408@TK2MSFTNGP10.phx.gbl...
Mike wrote:
Hi,

I remember that a couple of years ago, I used to issue a command to
"reload" the information contained in the "hosts" file (located in
system32\drivers\etc). I cannot remember the exact command and I
tried to look for it on the Internet, but unsuccessfully.

Do you know how I can reload the hosts' file info?

Thanks.
Mike

nbtstat -R

(type nbtstat /? for all parameters)
Back to top
Mike
Guest





Posted: Sun Jan 09, 2005 5:09 am    Post subject: Re: hosts file Reply with quote

Thanks for the information.

So, if I understood correctly, the hosts file is used for DNS-like records, while the lmhosts is used for NetBios names (Windows only). Is that correct? Is there any possibility to load in memory the content of the hosts file too (similar to the #PRE instruction)?

Thanks
Mike




"Doug Sherman [MVP]" <dsherman@nospam.tampabay.rr.com> wrote in message news:ued90eb9EHA.2452@TK2MSFTNGP14.phx.gbl...
Maybe I'm reading too much into this - but you can use hosts files for
NetBIOS name resolution; and nbtstat -R will purge the NetBIOS name cache.
However, hosts files do not have 'reload' capabliity. Lmhosts files can do
this with #PRE tag entries:

http://www.microsoft.com/resources/documentation/Windows/2000/server/reskit/en-us/Default.asp?url=/resources/documentation/windows/2000/server/reskit/en-us/cnet/cnfd_lmh_HVLL.asp

Doug Sherman
MCSE Win2k/NT4.0, MCSA, MCP+I, MVP

"Lanwench [MVP - Exchange]"
<lanwench@heybuddy.donotsendme.unsolicitedmail.atyahoo.com> wrote in message
news:Oq9Z9Ma9EHA.1408@TK2MSFTNGP10.phx.gbl...
Quote:
Mike wrote:
Hi,

I remember that a couple of years ago, I used to issue a command to
"reload" the information contained in the "hosts" file (located in
system32\drivers\etc). I cannot remember the exact command and I
tried to look for it on the Internet, but unsuccessfully.

Do you know how I can reload the hosts' file info?

Thanks.
Mike

nbtstat -R

(type nbtstat /? for all parameters)

Back to top
Desmond Lee
Guest





Posted: Sun Jan 09, 2005 5:27 am    Post subject: Re: hosts file Reply with quote

The hosts file is always consulted first (well actually after local DNS
resolver cache) for any DNS queries, followed by using DNS Servers defined in
the client's IP configuration. This means that there may not be any need to
'preload' the hosts file at all.

You can "ipconfig /flushdns" to purge the cache if required.

Do let us know if this helps. Thanks!


"Mike" wrote:

Quote:

Thanks for the information.

So, if I understood correctly, the hosts file is used for DNS-like records, while the lmhosts is used for NetBios names (Windows only). Is that correct? Is there any possibility to load in memory the content of the hosts file too (similar to the #PRE instruction)?

Thanks
Mike




"Doug Sherman [MVP]" <dsherman@nospam.tampabay.rr.com> wrote in message news:ued90eb9EHA.2452@TK2MSFTNGP14.phx.gbl...
Maybe I'm reading too much into this - but you can use hosts files for
NetBIOS name resolution; and nbtstat -R will purge the NetBIOS name cache.
However, hosts files do not have 'reload' capabliity. Lmhosts files can do
this with #PRE tag entries:

http://www.microsoft.com/resources/documentation/Windows/2000/server/reskit/en-us/Default.asp?url=/resources/documentation/windows/2000/server/reskit/en-us/cnet/cnfd_lmh_HVLL.asp

Doug Sherman
MCSE Win2k/NT4.0, MCSA, MCP+I, MVP

"Lanwench [MVP - Exchange]"
lanwench@heybuddy.donotsendme.unsolicitedmail.atyahoo.com> wrote in message
news:Oq9Z9Ma9EHA.1408@TK2MSFTNGP10.phx.gbl...
Mike wrote:
Hi,

I remember that a couple of years ago, I used to issue a command to
"reload" the information contained in the "hosts" file (located in
system32\drivers\etc). I cannot remember the exact command and I
tried to look for it on the Internet, but unsuccessfully.

Do you know how I can reload the hosts' file info?

Thanks.
Mike

nbtstat -R

(type nbtstat /? for all parameters)



Back to top
Mike
Guest





Posted: Sun Jan 09, 2005 6:17 am    Post subject: Re: hosts file Reply with quote

That is all I needed to know.

Thanks a lot to everyone!
Mike



"Desmond Lee" <mcp@donotspamplease.mars> wrote in message news:46F7CF62-A839-4238-98FB-6207D55637DA@microsoft.com...
The hosts file is always consulted first (well actually after local DNS
resolver cache) for any DNS queries, followed by using DNS Servers defined in
the client's IP configuration. This means that there may not be any need to
'preload' the hosts file at all.

You can "ipconfig /flushdns" to purge the cache if required.

Do let us know if this helps. Thanks!


"Mike" wrote:

Quote:

Thanks for the information.

So, if I understood correctly, the hosts file is used for DNS-like records, while the lmhosts is used for NetBios names (Windows only). Is that correct? Is there any possibility to load in memory the content of the hosts file too (similar to the #PRE instruction)?

Thanks
Mike




"Doug Sherman [MVP]" <dsherman@nospam.tampabay.rr.com> wrote in message news:ued90eb9EHA.2452@TK2MSFTNGP14.phx.gbl...
Maybe I'm reading too much into this - but you can use hosts files for
NetBIOS name resolution; and nbtstat -R will purge the NetBIOS name cache.
However, hosts files do not have 'reload' capabliity. Lmhosts files can do
this with #PRE tag entries:

http://www.microsoft.com/resources/documentation/Windows/2000/server/reskit/en-us/Default.asp?url=/resources/documentation/windows/2000/server/reskit/en-us/cnet/cnfd_lmh_HVLL.asp

Doug Sherman
MCSE Win2k/NT4.0, MCSA, MCP+I, MVP

"Lanwench [MVP - Exchange]"
lanwench@heybuddy.donotsendme.unsolicitedmail.atyahoo.com> wrote in message
news:Oq9Z9Ma9EHA.1408@TK2MSFTNGP10.phx.gbl...
Mike wrote:
Hi,

I remember that a couple of years ago, I used to issue a command to
"reload" the information contained in the "hosts" file (located in
system32\drivers\etc). I cannot remember the exact command and I
tried to look for it on the Internet, but unsuccessfully.

Do you know how I can reload the hosts' file info?

Thanks.
Mike

nbtstat -R

(type nbtstat /? for all parameters)



Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> Networking All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB