Verify how a name is resolved

  • Thread starter Thread starter Rich
  • Start date Start date
R

Rich

Hello,

My colleagues and I are trying to answer this question. Can anyone help?

How can you tell what is resolving a name (DNS, WINS, or HOSTS)?

our network runs both DNS and WINS, and many clients have a HOSTS file. Is
there a way to verify how a hostname is actually being resolved?

Also, if I use a FQDN, does DNS resolve it (assuming there is an entry)? Or
can WINS resolve it? Also, the opposite. If I use a NETBios name, is it
automatically resolved by WINS, or can DNS resolve it. What happens if
there is an entry in DNS, WINS and host file? What is the order or
precedence?

TIA,
Rich
 
Rich said:
Hello,

My colleagues and I are trying to answer this question. Can anyone
help?

How can you tell what is resolving a name (DNS, WINS, or HOSTS)?

our network runs both DNS and WINS, and many clients have a HOSTS
file. Is there a way to verify how a hostname is actually being
resolved?

Also, if I use a FQDN, does DNS resolve it (assuming there is an
entry)?
Keeping in mind, a FQDN query will have a trailing "." no matter how many
levels are in the domain name. In other words "host."(notice the trailing
dot) would be a FQDN so DNS would have to resolve it, the query would not
use NetBIOS or WINS resolution.

Or can WINS resolve it?
WINS cannot resolve FQDNs, but DNS can query WINS for host names if, the
zone is set up to query WINS for hosts not in the zone.

Also, the opposite. If I use a
NETBios name, is it automatically resolved by WINS, or can DNS
resolve it.

DNS can resolve NetBIOS names, if the NetBIOS name has a record in DNS and
if the Domain is in the DNS suffix search list.
What happens if there is an entry in DNS, WINS and host
file? What is the order or precedence?

The HOSTS file is loaded into the DNS Client cache first, so any HOSTS entry
you have won't go to DNS.
 
In
Rich said:
Hello,

My colleagues and I are trying to answer this question. Can anyone
help?
How can you tell what is resolving a name (DNS, WINS, or HOSTS)?

our network runs both DNS and WINS, and many clients have a HOSTS
file. Is there a way to verify how a hostname is actually being
resolved?
Also, if I use a FQDN, does DNS resolve it (assuming there is an
entry)? Or can WINS resolve it? Also, the opposite. If I use a
NETBios name, is it automatically resolved by WINS, or can DNS
resolve it. What happens if there is an entry in DNS, WINS and host
file? What is the order or precedence?

TIA,
Rich

Keep in mind, Win2000 and newer machines uses the DNS process FIRST. If it
does not get resolved using the DNS process, then it uses theh NetBIOS
process. Legacy clients use the NetBIOS process FIRST, and if it doesn't get
resolved using NetBIOS, it uses the DNS process.

If you are using an NBNS (NetBIOS Nameserver, such as WINS), that changes it
a bit, and it also depends on what Node it's in. H-Node is default, but can
be changed. There are four NetBIOS Nodes:

B-Node - Broadcast ONLY
P-Node - NBNS (Netbios Nameserver) or WINS ONLY
M-Node- Mixed NBNS and Broadcast, but uses Broadcast FIRST.
H-Node - Mixed NBNS and Broadcast, but uses WINS FIRST.

E.g. If you ping "machinename" on a Win2000 or newer machine, it will
attempt to use DNS FIRST:

1. Checks it's own name.
2. Local cache.
3. HOSTS file
4. It will then suffix the Search Suffix configured on the machine, then
query DNS
5. WINS
6. Broadcast
7. LMHOSTS

Legacy machines use NetBIOS first.

NetBIOS and Hostname resolution for Microsoft Client and LAN Manager 2.2c
Client: http://support.microsoft.com/kb/169141/EN-US/

Name Resolution Process in detail:
http://www.comptechdoc.org/os/windows/wintcp/wtcpname.html


--
Regards,
Ace

Please direct all replies ONLY to the Microsoft public newsgroups
so all can benefit.

This posting is provided "AS-IS" with no warranties or guarantees
and confers no rights.

Ace Fekay, MCSE 2003 & 2000, MCSA 2003 & 2000, MCSE+I, MCT, MVP
Microsoft Windows MVP - Windows Server - Directory Services
Infinite Diversities in Infinite Combinations.
=================================
 
Ace,

Your list:
E.g. If you ping "machinename" on a Win2000 or newer machine, it will
attempt to use DNS FIRST:
1. Checks it's own name.
2. Local cache.
3. HOSTS file
4. It will then suffix the Search Suffix configured on the machine, then
query DNS

Does not bear out your statement:
it will attempt to use DNS FIRST:

My own experience is as follows (discounting node-type):
IF you have an hosts file, the client will use hosts before DNS, for FQDN or
NetBIOS. Interestingly, your list seems to be agreeing with my own
understanding. You can test this out by just massging your hosts files and
clearing your cache and pinging.

--

Sincerely,
Dèjì Akómöláfé, MCSE+M MCSA+M MCP+I
Microsoft MVP - Directory Services
www.readymaids.com - we know IT
www.akomolafe.com
Do you now realize that Today is the Tomorrow you were worried about
Yesterday? -anon
"Ace Fekay [MVP]"
 
In
Deji Akomolafe said:
Ace,

Your list:

Does not bear out your statement:

My own experience is as follows (discounting node-type):
IF you have an hosts file, the client will use hosts before DNS, for
FQDN or NetBIOS. Interestingly, your list seems to be agreeing with
my own understanding. You can test this out by just massging your
hosts files and clearing your cache and pinging.

I should have said, "It attempts hostname resolution mehod first," which is
more descriptive.

And yes, the hosts file will be checked prior to DNS.

However funny thing about the local cache, it checks that first because when
you create an entry in the hosts file, it automatically gets loaded into
cache. I think it's redundant that it checks the hosts file afterwards,
since it's assumed that whatever is in hosts, would have been autoloaded
into cache anyway.

Ace
 
Oh, well ... we know that there are many redundant things in our windows,
don't we? ;). Methinks it's just trying to play safe .... you know ....
doubly sure .... just in case something has sneaked into the hosts file in
the past 10 nanoseconds :)

--

Sincerely,
Dèjì Akómöláfé, MCSE+M MCSA+M MCP+I
Microsoft MVP - Directory Services
www.readymaids.com - we know IT
www.akomolafe.com
Do you now realize that Today is the Tomorrow you were worried about
Yesterday? -anon
"Ace Fekay [MVP]"
 
In
Deji Akomolafe said:
Oh, well ... we know that there are many redundant things in our
windows, don't we? ;). Methinks it's just trying to play safe ....
you know .... doubly sure .... just in case something has sneaked
into the hosts file in the past 10 nanoseconds :)

10 nanoseconds? I think it maybe less than that, more down to the quatuum
level.

:-)
 
Back
Top