Advanced Windows PowerShell Scripting Video Training

Advanced Windows PowerShell Scripting Video Training
Advanced Windows PowerShell Scripting Video Training

Friday, August 20, 2010

What is the process for resolving computer names?

In class we had a discussion on the exact order of name resolution for Windows 7. The Name Resolution order presented to us was:

- Local Host Name
- DNS Resolver Cache
- DNS Server
- NetBIOS Name Cache
- WINS Server
- Broadcast
- LMHOST

Below is a portion of an article that explains why we did not see the HOST file in the list above:

1. An application uses the DnsQuery() API or the GetAddrInfo() or GetHostByName() Windows Sockets APIs to resolve a name. If the name is a flat name, the DNS Client service creates an FQDN using configured DNS suffixes.

2. The DNS Client service checks the DNS resolver cache for the FQDN, which contains the entries in the Hosts file and the results of recent positive and negative name queries. If an entry is found, the result is used and no further processing occurs.

3. The DNS Client service passes the FQDN through the NRPT to determine the rules in which the FQDN matches the namespace of the rule.

4. If the FQDN does not match any rules, or matches a single rule that is an exemption rule, the DNS Client service attempts to resolve the FQDN using interface-configured DNS servers.

5. If the FQDN matches a single rule that is not an exemption rule, the DNS Client service applies the specified special handling.

6. If the FQDN matches multiple rules, the DNS Client services sorts the matching rules for precedence—in order: FQDN, longest matching prefix, longest matching suffix [including IPv4 and IPv6 subnets], any—to determine the rule that most closely matches the FQDN.

7. After determining the closest matching rule, the DNS Client service applies the specified special handling.

Essentially the client will try to use its local resources first (with exception to the LMHOST file.) I looks at its cache from DNS queries, which also contain the contents of the HOST file. Next it will utilized the more desirable network resources. Since DNS is a requirement for and Active Directory network, DNS should be available. Next it looks at the WINS resources. First its NetBIOS Cache and the WINS. These Flat names for network resources are still supported, but on their way out. Next a broadcast across the local subnet will be made. Finally, it will look at and static entries in the LMHOST file. This file will hold flat names like WINS.

http://technet.microsoft.com/en-us/magazine/ff394369.aspx

No comments: