Microsoft DNS Technology

Understanding Host Name Resolution

Understanding Host Name Resolution

Understanding the Function of Host Names

In TCP/IP based mostly networks, the packets which are transmitted over the community include the next IP addresses:

The IP handle of the pc sending the packet

The IP handle info is used to ahead the packet to the vacation spot pc. The IP addresses of computer systems subsequently should be each distinctive and proper in order that they are often forwarded to the right vacation spot.

IP addresses additionally include the next necessary info:

  • Community tackle or ID

  • Host tackle or ID.

What’s a number identify then? A number identify is assigned to a pc to determine a number in a TCP/IP community. The host identify could be described as being the alias that’s assigned to a node, to determine it.

A number of traits of host names are listed under:

  • Host names are assigned to computer systems by directors.

  • The host identify specified for a pc doesn’t have to correspond to the Home windows 2000 or Home windows Server 2003 pc identify or NetBIOS pc identify.Understanding Host Name Resolution

  • Multiple host identify might be assigned to the identical host.

  • The utmost size of a number identify is 255 characters.

  • The host identify can include each alphabetic characters and numeric characters.

  • A number identify may be outlined in quite a few methods. The extra widespread strategies used are:

WinSock purposes make the most of the IP handle of the host identify for a connection to be established. Name decision is just not wanted if the IP addresses are used to determine connections. Nevertheless, as a result of host names are easier to recollect than IP an tackle, the host identify is usually used as an alternative of the IP addresses. That is particularly evident with TCP/IP purposes.

When the host identify is used, and never the IP tackle, the host identify needs to be resolved to an IP handle for IP communication to happen. This is called host identify decision. A number identify should match to an IP handle that’s situated in a DNS server database, or in a Hosts file.

Host Name Resolution in Home windows

Every community wants a mechanism that may resolve host names to IP addresses. Name decision has to happen every time the host identify is used to hook up with a pc and never the IP addresses. As an example, when a server identify is used to entry a useful resource, the pc resolves that identify to an IP tackle. Host identify decision resolves the host identify to an IP handle. This has to happen in order that the IP handle might be resolved to the hardware tackle for TCP/IP based mostly communication to happen.

With the introduction of Home windows 2000, got here help for a number of totally different identify decision mechanisms:

Community broadcasts and LMHOSTS information have been usually utilized within the earlier variations of Home windows NT. Home windows Web Naming Service (WINS) is usually utilized in Home windows NT four. Previous to Home windows 2000, NetBIOS names recognized computer systems on the community. With the introduction of Home windows 2000, got here the introduction of Lively Listing. Lively Listing makes use of the Area Name System (DNS) for identify registration and identify decision.

With the introduction of Home windows Server 2003, DNS identify decision is used over NetBIOS identify decision. The DNS Shopper service handles identify decision. It first submits all identify decision duties to DNS. If DNS identify decision can’t happen, the DNS Shopper service submits the identify to NetBIOS.

The widespread strategies used to resolve host names are listed under:

  • NetBIOS identify decision: That is the method of mapping the NetBIOS identify of the pc to an IP tackle. With NetBIOS, communication happens between NetBIOS hosts by way of identify discovery, identify registration, and identify launch.

  • HOSTS file: This can be a textual content file that features the host names to IP addresses mappings. The HOSTS file is saved regionally.

  • DNS server: DNS resolves host names and absolutely certified domains (FQDNs) to IP addresses in TCP/IP networks. The DNS server manages a database of host identify to IP tackle mappings. That is the first technique used for identify decision in Home windows Server 2003.

For DNS identify decision, the mechanisms that can be utilized are:

For NetBIOS identify decision, the mechanisms that can be utilized are:

  • The native NetBIOS identify cache can be utilized to carry out a reputation lookup.

  • WINS server question

  • NetBIOS broadcasts to question the native community.

  • The native LMHOSTS file can be utilized to carry out a reputation lookup

The HOSTS File

This can be a textual content based mostly file which accommodates host names to IP addresses mappings. TCP/IP purposes primarily use the HOSTS file when a number identify must be mapped to an IP tackle. The file may also be used resolve NetBIOS names. The HOSTS file is saved regionally on a system, and is situated on every pc.

A number of traits of the HOSTS file are:

  • A number of host names could be assigned to the similar IP tackle.

  • Every entry within the HOSTS file has an IP tackle that’s related to one or a number of host names.

  • Host identify localhost is an entry within the HOSTS file, by default.

  • All often used names ought to be situated near the beginning of the file.

  • The entries within the HOSTS file for Home windows 2000 working techniques are usually not case-sensitive.

  • The entries within the HOSTS file for Unix working methods are case-sensitive.

How host names are resolved with a HOSTS file

  1. A consumer makes use of a number identify to hook up with a Winsock software.

  2. The system checks whether or not the host identify is identical because the native host identify.

  3. The identify is resolved if the 2 names match.

  4. The HOSTS file is parsed if the host identify just isn’t the identical because the native host identify.

  5. The host identify is resolved to its related IP addresses whether it is discovered within the HOSTS file.

  6. The IP handle of the vacation spot host is then resolved to its hardware tackle.

  7. If the vacation spot host is situated on the native community, both of the next strategies is used to acquire the hardware handle:

    • The hardware handle is retrieved from the ARP cache

    • The IP handle of the host is broadcast for its hardware tackle

  8. If the vacation spot host is situated on a distant community, the hardware tackle of a router is obtained in order that the request may be routed.

In situations the place the host identify can’t be resolved to an IP handle within the HOSTS file, and that is the one host identify decision technique that’s configured, an error message is returned to the consumer that initiated the request.

How host names are resolved with a DNS server

  1. When a consumer enters a number identify or a totally certified area identify (FQDN), host identify decision is initially tried by way of the HOSTS file.

  2. If the host identify couldn’t be resolved to an IP handle by way of the HOSTS file identify decision technique, the DNS server is used.

  3. The request is transmitted to the DNS server to carry out a lookup of the identify in its database, to resolve it to an IP tackle.

  4. The DNS server resolves the host identify to IP tackle.

  5. The hardware tackle is obtained subsequent.

  6. If the vacation spot host is situated on the native community, the hardware tackle is obtained from the ARP cache, or viabroadcasting of the IP handle.

In situations the place the DNS server doesn’t reply to the preliminary request, the DNS server is tried once more at 1, 2, 2, and four second intervals. If in any case these makes an attempt the DNS fails to responds, and no different identify decision mechanisms exist, an error message is returned to the consumer that initiated the request.

The Advisable Technique for Resolving Host Names to IP Addresses

You’ll be able to configure numerous strategies to resolve host names to IP addresses. You possibly can specify using a DNS server, identify decision by way of the HOSTS file or with a DNS server, community broadcast, WINS server, and thru LMHOSTS. If you configure quite a few mechanisms for host identify decision, you’re primarily offering a backup technique in your identify decision course of. When one technique fails to resolve the host identify to IP handle, one other technique is used.

Solely after every of the configured identify decision mechanisms fail to yield a number identify to IP tackle mapping, does the precise IP handle must be offered to service the request.

The advisable course of for resolving host names to IP addresses is illustrated under:

  1. The consumer specifies a number identify and never the related IP tackle within the request.

  2. Home windows first determines whether or not the host identify offered is the similar identify because the native host identify.

  3. The identify is resolved if the 2 names match.

  4. The HOSTS file is parsed if the 2 names aren’t the identical.

  5. If the host identify exists within the HOSTS file, it’s resolved to its IP handle.

  6. When the host identify doesn’t exist within the HOSTS file, the request is shipped to the DNS server for identify decision.

  7. The host identify is resolved if the DNS server incorporates the host identify to IP tackle mapping in its database.

  8. If the DNS server doesn’t reply to the preliminary request for identify decision, the request is tried once more at 1, 2, 2, and four second intervals.

  9. When the DNS server can’t resolve the host identify into an IP handle, the host subsequent checks whether or not the host identify exists in its native NetBIOS identify cache.

  10. The host identify is resolved to an IP handle whether it is situated within the native NetBIOS identify cache.

  11. If the host identify can’t be situated within the NetBIOS identify cache, the NetBIOS identify server is contacted for identify decision.

  12. When the NetBIOS identify server can’t resolve the host identify to an IP tackle, the host then transmits three broadcast messages on the native community.

  13. Name decision takes place if the host identify exists on the native community.

  14. When the host identify can’t be resolved by way of broadcasting on the native community, the subsequent verify that happens is the parsing of the native LMHOSTS file.

  15. The host identify is resolved into an IP handle whether it is situated within the native LMHOSTS file.

  16. If the host identify can’t resolved into an IP handle after all of the above strategies have been tried, the consumer has to offer the IP handle.