Transcript Module 3
ES 101. Module 3
Domain Name System (DNS)
Last Lecture
• Routing and IP addressing
This Lecture
• Domain Name System
Domain Name System History
• DNS provides host IP address to mnemonic name
mapping
• Originally this was accomplished by a set of
configuration files on each client and server
– /etc/hosts
– /etc/networks
• These files at first were manually configured by
the System Administrator using a text editor
– Highly subject to typographical errors
DNS History (cont’d)
• In the early days of the Internet, the Network Information
Center (NIC) maintained a single etc/hosts file, which
could be downloaded for host configuration
– HOSTS.TXT
– ftp’d by all hosts (RFC 952 and 953)
• The bandwidth consumed by this process is proportional to
the square of the number of hosts
– Outgoing ftp load on the NIC host was very high
– Made worse by the astronomical number of hosts on the Internet
DNS History (cont’d)
• This situation caused the development of a
network-wide, distributed database system which
did this host name to IP address mapping
– Originally known as Berkeley Internet Domain Server,
or BIND
– Later renamed to Domain Name System (DNS)
• We will study the host configuration files to gain
insight into the operation of the DNS
– Host files are still used for small private networks on
both Unix and Microsoft networks
Internet Hosts vs. Time
Date
1984
1989
1992
1994
Today
No. Hosts
1,000
100,000
> 1.0 Million
3.2 Million
????
Internet Names
• With millions of Hosts on the Internet, how do
you easily specify the host that you want to
interact with?
– IP addresses are very hard to memorize for humans
– DNS was developed to provide an easy to remember
addressing scheme
• Originally specified in RFCs 1032, 1033, 1034,
and 1035
Checkout the following web site for access to all RFCs:
http://www.cis.ohio-state.edu/cs/Services/rfc
/etc/hosts File
• Every computer on a TCP/IP network has an IP
address, canonical host name, and zero or more
host name aliases
• The /etc/hosts file is the classical method for
mapping IP addresses to host names
• Format of the hosts file consists of one IP address
per line
– Note that the 127.0.0.0 address is the local loopback IP
address
Host File Example
/etc/networks File
• Networks and subnets are also named
• The handling of network address to network name
mapping is accomplished by the /etc/networks file
Network File Example
Introduction to DNS
• DNS is essentially a hierarchical, distributed local hosts
database
• The DNS name provides an easily recognized structure
• DNS can be conceptually divided into three parts
– Domain name space
– Name servers
– Resolvers
• Each of these will be discussed in the following charts
Domain Name Space
•
•
•
•
DNS is partitioned into different “Domains”
It is organized hierarchically
Top level domain names are globally specified
Second-level domain names are unique to each
organization, and must be registered with via a “registrar”
– Domain names are not associated with a location
– You can search for a unique name using the “whois” utility of the
registrar
– When you find no match, the name is available
– You can then register the name with a registrar to reserve it
Top Level Domain Names
Fully Qualified Domain Names
• The highest level of the hierarchical structure
(root) is “dot”
• The proper syntax for a fully qualified domain
name includes the trailing period
– Standard practice is not to include it, since it is
understood
Domain Name Hierarchy
Second Level Domain Names
• These names are registered by qualified registrars
– www.networksolutions.com originally
– Many other registrars are now available, for example:
• Domain Direct (http://www.domaindirect.com/)
• Each domain is given its own authority to create
subdomains
– Example: http://eecs.vuse.vanderbilt.edu
• A (sub)domain may contain an entire network, or
only parts of a network
Domain Physical Representation
Domain Name Tree
• The easiest representation of the DNS name is as a
“tree”
• Each domain represents a “branch” of the tree
• The “leafs” of the tree are individual host
machines
DNS Servers
• The DNS database is distributed among a number of
servers
– These servers perform the DNS name to IP address mapping
– They are referred to as name servers
• Each domain is responsible for maintaining a minimum of
one primary and secondary DNS servers
– This function can be subcontracted to others
– No single DNS server could hold the database for the entire
Internet
DNS Servers (cont’d)
• DNS servers that are in different locations operate
cooperatively to resolve the name to IP address
mapping request
• Distributed databases have the advantage that they
are efficient
• If the names that are accessed most frequently are
in a local cache (DNS server), the DNS lookup
traffic across the Internet is greatly reduced
DNS Servers (cont’d)
• Distributed databases are also more reliable than a
single machine
– One failure cannot “take down” the network
DNS Forwarding
• If you do not wish to host your own DNS server, you can
pay for a service known as “DNS Forwarding”
– Typically provided by the registrar
• What happens is that the registrar maintains the redundant
DNS servers
• The URL of interest is locally controlled by the registrar
• A table entry is made into the registrar’s DNS database to
go to the IP address of a server that is specified by you
– This is done by a “control panel”
• Name resolution requests can then be referred to any IP
address on the Internet
– Even your dorm PC, assuming that it has a static IP address
Static IP Addresses
• You may request a “static” IP address from your ISP
• However, this is becoming more difficult, since ISPs like
to manage their own IP address space
– This is because IP addresses are in short supply
• When this is done, your PC requests an IP address from a
“Dynamic Host Configuration Protocol” (DHCP) server
– Your machine is then assigned an IP address
• This address “ages” and is changed periodically
– However, Vanderbilt does not change this often
Dynamic Address Determination
• How would you determine your DHCP assigned
IP address?
– “ipconfig” command
– “What’s my IP” web site
• http://www.whatismyip.com/
• If your IP address does not change often, you can
DNS forward to it
– If the IP changes, you simply log onto the registrar’s
control panel and repoint the URL to the new IP address
Assignment
• Those of you willing to spend ~$30/year should
register a domain name of your choosing
Web Servers
• Note that the DNS only points to an IP address
• A server that hosts many web sites, must still
resolve the URL to the proper “index.htm” file for
the web site of interest
• This is done by a local DNS server process that
only points to the internal folders
– No updates from the Internet
– This information is not distributed out to the Internet
• An example is the Helios server here at Vanderbilt
DNS Name Resolution
• Each client executes a DNS client software
process known as a “(DNS) name resolver”
• This software communicates with the DNS Server
established in the client by the network
administrator
• Name servers are arranged in a tree structure that
corresponds to the naming hierarchy
• Each lower-level server knows what the higherlevel servers are by their IP address
DNS Name Server Registration
• An organization registers for a second-level
domain name
• It is required to provide and maintain a two name
servers for that sub-domain
– These servers are known as the “Authority Name
Servers” for the domain
• The name server must be linked into the DNS
server tree
If you use an ISP, you can use their DNS servers.
Name Server Modes
• Depending on the client request, the name server operates
in one of two modes
• When the resolver queries a name server, the message
contains the following information
– Name to be resolved
– Class code of the name
• Protocol group to be used, ie. IP, IPX, etc.
• For IP, the class code is IN
– Type of response desired, ie. IP address
– Action code that specifies whether the name server should translate
the name completely
Object Types
• DNS servers can be used for multiple functions
– Translation of a host name to an IP address
– Look up a mail server address
• This information is differentiated by Object Types
– Also known as resource record types
Common DNS Resource Record Types
DNS Query Processing
• When a domain name server receives a query from
a client, it checks to see if the name is within its
subdomain
– If so, it sends back the information to the resolver
• If the name server cannot resolve the name
completely, it checks the “action code” to see what
the client specified
– Recursive resolution (complete lookup)
– Iterative resolution (non-recursive lookup)
Recursive Resolution Schematic
Name server asks for assistance from
other higher level name servers
Iterative Resolution
• Name server generates an error if it cannot resolve
the name
• Client is informed of the name server that it
should query next
Non-Recursive Resolution Schematic
Name Caching
• Name resolution is performed from left to right
– Local authority up to higher levels
– Most efficient path for name resolution
• Each name server also keeps a cache of recently
resolved names and the mapping information
– This information “ages off” the name server
• It is up to the clientsoftware to decide if the
returned information is good enough
Name Resolution Sequence
• Client queries the name server
• Name server first checks for local resolution
• Next checks its name cache to see if the name was recently
resolved
• If found, the name server reports back to the resolver
• If not, the name server follows the “action code” provided
– Recursive resolution
– Non-recursive resolution
Next Lecture
• Basic Network Troubleshooting and Utilities