Title: Naming with the Domain Name System
1Naming with the Domain Name System
- Prof. Martins
- Department of Computer Science and Computer
Information Systems
2Goals
- In this chapter you will learn about
- Naming hierarchy
- Organization of name servers
- Details of client-server interaction among them
- How caching improves efficiency of the naming
system
3Structure of Computer Names
- The naming scheme used in the Internet is called
the Domain Name System (DNS) - Each computer name consists of alpha-numeric
segments separated by periods - For example, a computer at Cisco Systems
Incorporated has the domain name - anakin.cisco.com
4Structure of Computer Names
- Domain names are hierarchical
- The most significant part of the name is on the
right - The left-most segment of a name is the name of an
individual computer. - For example, Cisco gives the name of a company.
5Structure of Computer Names
- The domain name system does specify values for
the most significant segment - The most significant segment is called the
top-level domain (TLD).
6Structure of Computer Names
Fig. 31.1 - Values for the most significant
segment of a domain name. DNS does not
distinguish between names in upper or lower case.
7Structure of Computer Names
- Top-level domains are controlled by the Internet
Corporation for Assigned Names and Numbers
(ICANN). - Each organization that chooses to participate in
the domain name system must apply for a name
under one of the existing TLDs.
8Structure of Computer Names
- Once an organization has been assigned a domain,
the suffix is reserved for the organization. - If, for example, foobar.com has been assigned,
another organization named Foobar could apply for
foobar.biz or foobar.org, but not foobar.com.
9To summarize
- To obtain a domain, an organization must register
with an approved registrar. A unique domain
suffix is assigned to each organization.
10Geographic Structure
- In addition to the familiar organizational
structure, the DNS allow organizations to use
geographic registration. - For example, the Corporation for National
Research Initiatives registered the domain - Cnri.reston.va.us
- The corporation is located in the town of Reston,
Virginia in the United States.
11Geographic Structure
- Some foreign countries have adopted a combination
of geographic and organizational domain names. - Example
- Cs.york.ac.uk/rts
- Where ac is an abbreviation for academic and uk
is the official country code for the United
Kindgom
12Domain Names Within An Organization
Fig. 31.2 A graphical representation that
illustrates one way a DNS hierarchy might be
structured in a corporation. Names for individual
computers can be added to the diagram as well.
13Domain Names that Begin With WWW
- Although a domain name denotes a computer, many
organizations assign a domain names that reflect
the service that the computer provides. - For example, the FTP service.
- If Foobar corporation provides the FTP service,
it can choose a computer to run the service, and
assign the domain name - ftp.foobar.com
14Domain Names that Begin With WWW
- Similarly, a computer that runs a Web Server, can
be assigned the name - www.foobar.com
- Although the descriptive names are easy for
humans to remember and use, they are not
required. - In particular, the use of www to name computers
than run a Web server is merely a convention.
15Domain Names that Begin With WWW
- An arbitrary computer can run a Web server the
computers domain name does not need to contain
www. - Furthermore, a computer that has a domain name
beginning with www is not required to run a Web
server.
16To summarize
Using the first label in a domain name to denote
the service that a computer offers is merely a
convention to help humans a computer that runs
a Web server does not need to be named www, and a
computer named www does not need to run a web
server.
17The DNS Client-Server Model
- One of the main features of the Domain Naming
System is autonomy. - An organization control all names with a
particular suffix. - DNS uses client-server interaction to aid
autonomy. - The entire naming system operates as a large,
distributed database
18The DNS Client-Server Model
- Most organizations that have an Internet run a
domain name server - Each server contains information that links the
server to other domain name servers - The resulting set of servers functions as a
large, coordinated database of names.
19The DNS Client-Server Model
- Whenever an application needs to translate a name
to an IP address, the application becomes a
client of the naming system. - The client places the name to be translated in a
DNS request message, and sends the request to a
DNS server.
20The DNS Client-Server Model
- The server extracts the name from the request,
translates the name to an equivalent IP
address, and returns the resulting address to
the application in a reply message.
21The DNS Server Hierarchy
- DNS servers are arranged in a hierarchy that
matches the naming hierarchy. - A root server occupies the top of the hierarchy,
and is an authority for the top-level domains
(e.g., com)
22The DNS Server Hierarchy
Fig. 31.3 Two examples of ways the domain name
hierarchy from Figure 31.2 can be divided among
three servers. Each organization chooses how to
divide names among its servers.
23Server Architectures
- When does an organization need more than one
server? - The smallest organizations do not run a server
themselves. Instead, the organization contracts
with an Internet Service Provider that runs a
domain name server on behalf of its customers.
24Server Architectures
- A small organization can minimize cost by placing
all its domain information in a single server. - Larger organizations use two or more servers.
Two reasons - Speed
- Less coordination effort required compared to one
centralized server.
25Locality of Reference and Multiple Servers
- The domain name system follows the locality of
reference principle in two ways - A user tends to look up the names of local
computers more often than the names of remote
computers - A user tends to look up the same set of domain
names repeatedly. - Having multiple servers within an org works well
because a server can be placed within each group.
26Locality of Reference and Multiple Servers
- Because the DNS obeys the locality principle,
the local server can handle most requests. - Multiple DNS servers
- Are easier to administer
- Help balance the load ( and thereby reduce the
problems of contention a centralized server may
cause)
27Links Among Servers
- Servers in the domain name are linked together,
making it possible for a client to find the
correct server by following links. - Each server is configured to know the locations
of servers of subparts of the hierarchy.
28To summarize
All domain name servers are linked together to
form a unified system. Each server knows how to
reach a root server and how to reach servers
that are authorities for names further down the
hierarchy.
29Resolving A Name
- The translation of a domain name into an
equivalent IP address is called name resolution. - The name is said to be resolved to an address.
- Software to perform the translation is known as
name resolver software (or simply resolver).
30Resolving A Name
- Many operating systems provide name resolver
software as a library routine that an
application can call. - Example UNIX systems, an application can call a
library routine gethostbyname to resolve a name
31Resolving a Name
- How does a resolver software work?
32Resolving a Name
- When an incoming request specifies a name for
which a server is an authority, the server
answers directly. - That is, the server looks up the name it is local
database, and sends a reply to the resolver.
33Resolving a Name
- When a request arrives for a name outside the
set for which the server is an authority, further
client-server interaction results. - The server temporarily becomes a client of
another name server. - When the other server returns an answer, the
original server sends a copy of the answer back
to the resolver from which the request arrived.
34Resolving a Name
- How does a DNS server know which other DNS
server is the authority for a given name? - It does not
- Each server knows the address of a root server.
- Knowing the location of the root server is
sufficient.
35Resolving a Name
- The name can be resolved from the root server.
- The root server may not be an authority for the
name, but the response from the root server gives
the location of a server for the right-most
segment.
36Example
- Suppose servers for Foobar Corporation are
organized as in Figure 31.3b, and a resolver at
a remote site (e.g. at a University) sends a
request to its local server, L, for the name - Venus.walnut.candy.foobar.com
- Server L is not an authority for the name, so it
proceeds to act as a client of other servers. - In the first step, L sends a request to the root
server.
37Example
- The root server is not an authority for the name,
but the response from the root server gives the
location of a server for foobar.com - When it receives the response from the root
server, server L contacts the server for
foobar.com - Although it is not an authority for names in the
walnut subdivision, the main server at Foobar
knows the location of the server for walnut.
38Example
- Thus, it returns a response to inform L.
- Finally, L contacts the server that is the
authority for names of the form - Computer.walnut.candy.foobar.com
- The server returns an authoritative answer to L,
either the IP address for the name or an
indication that no such name exists.
39To summarize
The resolver software in a host always requests
recursive resolution in which a name is resolved
to an equivalent address. When it becomes a
client of another server, a server can request
iterative resolution to step through the server
hierarchy one level at a time.
40Optimization of DNS Performance
- The domain name system as described is hopelessly
inefficient. - Without optimizations, traffic at root server
would be intolerable. - Optimizations used in the DNS
- Replication and
- Caching
41Optimization of DNS Performance
- Each root server is replicated
- Many copies of the server exist around the world
- When a new site joins the internet, the site
configures its local DNS server with a list of
root servers - The sites server uses whichever root server is
most responsive at a given time.
42Optimization of DNS Performance
- The geographically closest server usually
responds best. - Thus, a site in Europe will tend to use a root
server in Europe - A site in California will choose to use a root
server on the west cost of the US.
43Optimization of DNS Performance
- Caching is more important than replication
- Caching works well because name resolution
shows a strong tendency toward temporal locality
of reference. - On a given day, a user is likely to look up the
same name repeatedly - When an application looks up a name for the
first time, the local DNS server caches the
binding.
44Optimization of DNS Performance
- The server can then answer subsequent requests by
returning the binding from its cache instead of
contacting the authoritative server again.
45Types of DNS Entries
- Each entry in a DNS database consists of three
items - A domain name
- A record type how the value is to be interpreted
- A value
46Types of DNS Entries
- A DNS support different types of binding
- A binding address binding a domain name and an
equivalent address - MX binding Mail exchanger map the computer
name found in an e-mail to an IP address
47Aliases Using the CNAME Type
48An Important Consequence of Multiple Types
49Abbreviations and the DNS
50Summary
- The domain name system provides automated
mapping between computer names and equivalent IP
addresses. - Each name is a character string that consists of
a sequence of alpha-numeric segments separated
by periods. - Names are allocated hierarchically
- Segments in the name correspond to levels in the
hierarchy.
51Summary
- There is no standard for the number of segments
in a name because each organization is free to
choose how to assign levels of the hierarchy. - Two groups within a given organization may use
two different levels of hierarchy. - A set of online servers provides answers to
resolution requests.
52Summary
- Servers are linked together to form a unified
system - An application program that calls a resolver
becomes a client of the domain name system - The client sends a request to its local server.
- The local server either answers the request
directly, or contacts other servers to find the
answer.
53Summary
- DNS servers use two performance optimization
techniques - Replication
- Caching
- Root servers are replicated to reduce the load on
a given server - Because name resolution follows the principle of
locality, all DNS servers place a copy of
resolved bindings in their cache for later use.