Unit V Part I 1
Unit V Part I 1
Layer
Domain Name System
DNS
• There are several applications in the application layer of the Internet model
that follow the client/server paradigm.
• The client/server programs can be divided into two categories: those that can
be directly used by the user, such as e-mail, and those that support other
application programs.
• The Domain Name System (DNS) is a supporting program that is used by
other programs such as e-mail.
• Today, however, it is impossible to have one single host file to relate every address
with a name and vice versa.
• The host file would be too large to store in every host.
• In addition, it would be impossible to update all the host files every time there was
a change.
• One solution would be to store the entire host file in a single computer and allow
access to this centralized information to every computer that needs mapping.
• But we know that this would create a huge amount of traffic on the Internet.
• Another solution, the one used today, is to divide this huge amount of information
into smaller parts and store each part on a different computer.
• In this method, the host that needs mapping can contact the closest computer
holding the needed information.
• This method is used by the Domain Name System (DNS).
NAME SPACE
Figure 25.6
Hierarchy of name
servers
Zone
• Since the complete domain name hierarchy cannot be stored on a single
server, it is divided among many servers.
• What a server is responsible for or has authority over is called a zone.
• We can define a zone as a contiguous part of the entire tree.
• If a server accepts responsibility for a domain and does not divide the domain
into smaller domains, the domain and the zone refer to the same thing.
• The server makes a database called a zone file and keeps all the information
for every node under that domain.
• However, if a server divides its domain into subdomains and delegates part of
its authority to other servers, domain and zone refer to different things.
• The information about the nodes in the subdomains is stored in the servers at
the lower levels, with the original server keeping some sort of reference to
these lower-level servers.
• Of course the original server does not free itself from responsibility totally: It
still has a zone, but the detailed information is kept by the lower-level servers
(see Figure 25.7).
Figure 25.7 Zones and domains
• A server can also divide part of its domain and delegate responsibility but
still keep part of the domain for itself.
• In this case, its zone is made of detailed information for the part of the
domain that is not delegated and references to those parts that are delegated.
Root Server
• A root server is a server whose zone consists of the whole tree.
• A root server usually does not store any information about domains but
delegates its authority to other servers, keeping references to those servers.
• There are several root servers, each covering the whole domain name space.
• The servers are distributed all around the world.
Primary and Secondary Servers
• DNS defines two types of servers: primary and secondary.
• A primary server is a server that stores a file about the zone for which it is an
authority.
• It is responsible for creating, maintaining, and updating the zone file.
• It stores the zone file on a local disk.
• A secondary server is a server that transfers the complete information about a zone
from another server (primary or secondary) and stores the file on its local disk.
• The secondary server neither creates nor updates the zone files.
• If updating is required, it must be done by the primary server, which sends the
updated version to the secondary.
• The primary and secondary servers are both authoritative for the zones they serve.
• The idea is not to put the secondary server at a lower level of authority but to create
redundancy for the data so that if one server fails, the other can continue serving
clients.
• Note also that a server can be a primary server for a specific zone and a secondary
server for another zone.
• Therefore, when we refer to a server as a primary or secondary server, we should
be careful to which zone we refer.
Note
DNS has two types of messages: query and response. Both types
have the same format. The query message consists of a header
and question records; the response message consists of a
header, question records, answer records, authoritative records,
and additional records. (see Figure 25.14)
Figure 25.14 Query and response messages
Header
• Both query and response messages have the same header format with some
fields set to zero for the query messages.
• The header is 12 bytes, and its format is shown in Figure 25.15.
• The identification subfield is used by the client to match the response with the
query.
• The client uses a different identification number each time it sends a query.
• The server duplicates this number in the corresponding response.
• The flags subfield is a collection of subfields that define the type of the
message, the type of answer requested, the type of desired resolution (recursive
or iterative), and so on.
• The number of question records subfield contains the number of queries in the
question section of the message.
• The number of answer records subfield contains the number of answer records
in the answer section of the response message.
• Its value is zero in the query message.
• The number of authoritative records subfield contains the number of
authoritative records in the authoritative section of a response message.
• Its value is zero in the query message.
• Finally, the number of additional records subfield contains the number
additional records in the additional section of a response message.
• Its value is zero in the query message.
Figure 25.15 Header format
Question Section
•This is a section consisting of one or more question records.
•It is present on both query and response messages.
Answer Section
•This is a section consisting of one or more resource records.
• It is present only on response messages.
•This section includes the answer from the server to the client (resolver).
Authoritative Section
•This is a section consisting of one or more resource records.
•It is present only on response messages.
•This section gives information (domain name) about one or more authoritative
servers for the query.
There are two types of records are used in DNS. The question
records are used in the question section of the query and
response messages. The resource records are used in the
answer, authoritative, and additional information sections of
the response message.
Question Record
A question record is used by the client to get information from a
server. This contains the domain name.
Resource Record
• Each domain name (each node on the tree) is associated with a
record called the resource record.
• The server database consists of resource records.
• Resource records are also what is returned by the server to the
client.
REGISTRARS
• The DNS master file must be updated dynamically. The Dynamic Domain Name
System (DDNS) therefore was devised to respond to this need.
• In DDNS, when a binding between a name and an address is determined, the
information is sent, usually by DHCP to a primary DNS server.
• The primary server updates the zone.
• The secondary servers are notified either actively or passively.
• In active notification, the primary server sends a message to the secondary
servers about the change in the zone, whereas in passive notification, the
secondary servers periodically check for any changes.
• In either case, after being notified about the change, the secondary requests
information about the entire zone (zone transfer).
Note