CHAPTER 6
RESOLVING NETWORK HOST NAMES
Introduction
Both clients and servers on a network must resolve the user-friendly host names to the Internet
Protocol (IP) addresses used in network communications.
Lesson 1:
TCP/IP Naming Schemes
When computers connect and share across a TCP/IP network, they use the specific, assigned IP
address that is associated with their host. However, network users can remember text-based
names either than IP addresses. For example, it is much easier for users to remember
www.microsoft.com than the specific IP address associated with this web site. Although
TCP/IP hosts require an IP address to communicate, hosts can be referenced by a name rather
than an IP address. Because text-based names can be used as aliases for IP addresses, a
mechanism must exist for assigning those names to the appropriate IP node. This ensures the
name’s uniqueness and resolution to its IP address.
Windows 2000 Naming Schemes
Windows 2000 provides several different types of name resolution, including DNS, WINS, broadcast
name resolution, and name resolution using HOSTS or LMHOSTS files. Different naming schemes are
used by Microsoft Windows 2000 and other hosts such as UNIX. A Windows 2000 host can be
assigned to a host name, but the host name is used only with TCP/IP applications. UNIX hosts require
only an IP address. Using a host or domain name to communicate is optional.
Before communication can take place, an IP address is required on each TCP/IP host. However,
the naming scheme affects the way a host is referenced; for example:
To perform a NET USE command between two computers running Windows 2000, a user has
several choices for how to specify the computer’s name.
Net use X:\\netbios_name\share
Net use X:\\10.1.3.74\share
Net use X:\\host.domain.com\share
The NetBIOS name or the host name must be resolved to an IP address before Address Resolution
protocol (ARP) can resolve the IP address to a hardware address. If an IP address is used, no name
resolution is required.
=====================================================================
wininf6.html PAGE
2 2002/03/15
To reference a UNIX host running TCP/IP, a user specifies either the IP address or the host name.
f a host name is used, the name is resolved to an IP) address. If the IP address is used, name
resolution is not necessary, and the IP address is resolved to a hardware address.
Lesson Summary:
Lesson 2:
Host Names
A host name simplifies the way a host is referenced because names are easier for people to remember
the IP addresses. Host names are used in virtually all TCP/IP environments.
Understanding Host Names
A host name is an alias assigned to an IP node to identify it as a TCP/IP host. The host name can be
up to 255 characters long and can contain alphabetic and numeric characters and the “-“ and “.”
Characters.
Windows Sockets (WinSock) applications, such as Microsoft Internet Explorer and the File Transfer
Protocol (FTP) utility, can use one of two values for the destination to be connected: the IP address
or a host name.
Host names can take various forms. The two most common forms are nickname and a domain
name. A nickname is an alias to an IP address that individual people can assign and use. A domain
name is a structured name that follows Internet conventions.
=====================================================================
wininf6.html PAGE
3 2002/03/15
Purpose of Host Names
A host name is an alias assigned to a computer by an administrator to identify a TCP/IP host. The
host name can be a 255-character alphanumeric value. Multiple host names can be assigned to the
same host.
A name always corresponds to an IP address that is stored in a HOSTS file or in a database on a
DNS server. Windows clients can translate between host names and NetBIOS names in many
cases, allowing a WINS server or the LMHOSTS file to perform resolution for a host name.
The hostname utility will display the host name assigned to your system. By default, the host name
is the computer name of your computer running Windows 2000.
Host Name Resolution
Host name resolution is the process of mapping a host name to an IP address. Before the IP
address can be resolved to a hardware address, the host name must be resolved to an IP address.
Windows 2000 can resolve host names using several methods including:
NetBIOS name resolution. NetBIOS defines a session-level interface and a session management/
data transport protocol.
Resolving names with a HOSTS file. The HOSTS file is a text file stored locally on a system that
contains host names and associated IP addresses.
Resolving names with a DNS server. A DNS server is a centralized online database that is used
in IP network to resolve fully qualified domain names (FQDNs) and other host names to IP
addresses.
=====================================================================
Standard Methods of
Resolution Description
=====================================================================
Local host name The configured host name for the computer.
HOSTS file A local text file in the same format as the 4.3
HOSTS file.
DNS server A server that maintains a database of IP
Address/computer name (host name)
Mappings.
=====================================================================
wininf6.html PAGE
4 2002/03/15
Microsoft Methods of Resolution Description
NetBIOS Name Server A server implemented under Requests for
Comment (RFCs) 1001 and 1002 to provide
Name resolution of NetBIOS computer names.
Microsoft implementation of this is WINS.
Local broadcast A broadcast on the local network for the IP
Address of the destination NetBIOS name.
LMHOSTS file A local text file that maps IP addresses to the
NetBIOS computer.
=====================================================================
NetBIOS Name Resolution
A NetBIOS name is a unique, 16-byte address used to identify a NetBIOS resource on the
network. The NetBIOS name resolution process converts a NetBIOS name to an IP address.
When your computer starts, File and Printer Sharing for Microsoft Networks registers a unique
NetBIOS name based on the name of your computer. Computers running Microsoft TCP/IP
can use local broadcast name resolution, which is a NetBIOS-over-TCP/IP mode of operation.
This method relies on a computer making IP-level broadcasts to register its name by announcing
it on the network.
Resolving Names with a HOSTS File
Name resolution begins when a user calls a WinSock-based application referencing a host name
rather that an IP address.
Windows 2000 checks to see if the host name is the same as the local host name. If the two
names are different, the HOSTS file is parsed. If the host name is found in the HOSTS file, it is
resolved to an IP address.
If the host name cannot be resolved and no other resolution methods—such as DNS, a NetBIOS
name server, or the LMHOSTS file—are configured, the process stops and the user receives an
error message.
After the host name is resolved to an IP address, an attempt is made to resolve the destination
host’s IP address to its hardware address.
=====================================================================
wininf6.html PAGE
5 2002/03/15
If the destination host is on the local network, ARP obtains its hardware address by consulting the
ARP cache or by broadcasting the destination host’s IP address.
Resolving Names with a DNS Server
A DNS server is a centralized online database that is used in IP networks to resolve host names to
IP addresses. Windows 2000 can act as a DNS client and the Windows 2000 server family
provides DNS server services. Resolving a domain name using a DNS server is very similar to
using a HOSTS file.
If Windows 2000 is configured to resolve host names using a DNS server, it uses two steps to
resolve a host name:
name using the HOSTS file is followed first. If the IP address cannot be resolved to the HOSTS
file, a request is sent to the DNS server to look up the name in its database and resolve it to an
IP address.
1,2,2 and 4 seconds. After the host name is resolved, ARP obtains the hardware address.
If the destination host is on the local network, ARP obtains its hardware address by consulting
the ARP cache or by broadcasting the IP address.
Microsoft Methods or Resolving Host Names
Windows 2000 can be configured to resolve host names using a NetBIOS name server, broadcast,
and LMHOSTS in addition to the HOSTS file and DNS server. If WINS and LMHOSTS are
configured, the order or resolution is as follows:
When a user types in a command referencing a host name, Windows 2000 checks to see if the host
name is the same as the local host name. If so, the name is resolved and the command is carried
out without generating network activity. If the host name and local host name are not the same,
the HOSTS file is parsed. If the host name cannot be resolved using the HOSTS file, the source
hosts sends a request to its configured domain name servers.
If the DNS server cannot resolve the host name, the source host checks its local NetBIOS name
cache before it makes three attempts to contact its configured NetBIOS name servers.
If the host name is not resolved by the NetBIOS name server, the source host generates three
broadcast messages on the local network.
=====================================================================
wininf6.html PAGE
6 2002/03/15
If the host name is not resolved using broadcasts, the local LMHOSTS file is parsed. If the host
name is found in the LMHOSTS file, it is resolved to an IP address and address resolution occurs.
If none of these methods resolves the host name, the only way to communicate with the other
host is to specify the IP address.
Lesson Summary:
A host name is used to identify a TCP/IP host or default gateway.
Host name resolution is the process of mapping a host name to an IP address.
Lesson 3:
The HOSTS File
Understanding the HOSTS File
The HOSTS file is a static file used to map host names to IP addresses. This file provides
compatibility with the UNIX HOSTS file. The HOSTS file is used by PING and other TCP/IP
applications to resolve a host name to an IP address.
A HOSTS file must reside on each computer. A single entry consists of an IP address
corresponding to one or more host names. By default, the host name localhost is an entry in
the HOSTS file. The HOSTS file is parsed whenever a host name is referenced. Names are
read in a linear fashion. The most commonly used names should be near the beginning of the file.
NOTE: The HOSTS file can be edited with any text editor. It is located in the \systemroot\
System32\Drivers\Etc directory. Each host entry is limited to 255 characters, and entries in
the HOSTS file are not case-sensitive.
Within the HOSTS file
Multiple host names can be assigned to the same IP address. Note that the server at the IP
address 172.16.94.97 can be referenced to by its fully qualified domain name (rhino.Microsoft.com)
or a nickname (rhino).
Entries can be case-sensitive depending on the platform. Entries in the HOSTS file for some
UNIX operating systems are case-sensitive. Entries in the HOSTS file for Windows 2000 and
Windows 2000-based computers are not case-sensitive.
=====================================================================
wininf6.html PAGE
7 2002/03/15
Advantage of Using a HOSTS File
The advantage of using a HOSTS file is that it is customizable for the user. Each user can create
whenever entries he or she wants, including easy-to-remember nicknames for frequently
accessed resources.
Lesson Summary:
HOSTS file.
entry per host name, and then verify that the entry for the host name of the other computer is
valid.
CLASSROOM NOTES:
DNS and WINS
HOSTS
LMHOSTS
D:\Winnt\system32\drivers\etc\hosts file
Don’t forget that the loopback address is 127.0.0.1, and 10.10.1.104 is the server IP address.
Host name can be up to 255 characters.
LMHOST.sam, remote addresses should go in LMHOSTS file:
Tags = #pre, preload
#dom = domain name
#include = includes all other references to
#begin = alternate locations
#end = and file name.
Advantage, you can customize the clients host file. Preload them at the bottom of the list it is
more efficient.
Before the implementation of DNS, the creation of user-friendly computer names was done
using HOSTS file that contained a list of names and associated IP addresses.
Resolvers, looks in the local cache, DNS looks in its cache, and database start the query.
DNS uses TCP and UDP for its queries.
Zones page 155. Primary and secondary
Zones.
SOA record (start of authority)
Domain or DNS domain, be careful on wording.
Zones must have a Backup zone. If is helpful if you have 2 places for replication just in case
one is down. Therefore, have 2 integrated DNS servers, just in case one is down.
Reverse Lookup File: Must have to get NSLOOKup utility to work. Reverse lookup uses
he Pointer record. For example 191.12.99.0 goes from least significant to the most significant
bits = 99.12.191.in-addr.arpa. Finds the information in reverse from right to left.
LAB 10.10.1.100 Master uses his DNS address, Secondary DNS zone at school use the
Wizard.
DNS: SOA = State of
A = Host record or address record
NS = Name server for other DNS services
SRV = where services are located.
PTR = Pointer lookups for reverse lookups
CNAME = more than 1 alias.
MX = Mail Exchanger for E-Mail.
DNS will not work if you do not have the associated records