DNS
DNS
UNIT 5
DNS, DDNS, WWW, TELNET, EMAIL, FTP, HTTP, SNMP,
Bluetooth, Firewalls.
Network Security: Electronic mail, directory services and
network management, Basic concepts of Cryptography.
DNS
DOMAIN NAME SYSTEM (DNS)
26.3
Purpose of DNS
A user wants to use a file transfer client to access the corresponding file transfer
server running on a remote host. The user knows only the file transfer server name,
such as afilesource.com. However, the TCP/IP suite needs the IP address of the file
transfer server to make the connection. The following six steps map the host name to
an IP address:
1. The user passes the host name to the file transfer client.
2. The file transfer client passes the host name to the DNS client.
3. Each computer, after being booted, knows the address of one DNS server. The DNS
client sends a message to a DNS server with a query that gives the file transfer server
name using the known IP address of the DNS server.
4. The DNS server responds with the IP address of the desired file transfer server.
5. The DNS server passes the IP address to the file transfer client.
6. The file transfer client now uses the received IP address to access the file transfer
server.
26.4
Name Space
26.5
Domain name space
26.6
Domain names and labels Each node in the tree has:
•Label: a string with a maximum of 63
characters. which is The root label is a
null string (empty string).
26.7
DOMAIN NAME
• Each node in the tree has a domain name. A full domain
name is a sequence of labels separated by dots (.)
• The domain names are always read from the node up to
the root. The last label is the label of the root (null).
• This means that a full domain name always ends in a
null label, which means the last character is a dot
because the null string is nothing
• FQDN: If a label is terminated by a null string, it is
called a fully qualified domain name (FQDN). The name
must end with a null label, but because null means
nothing, the label ends with a dot.
• PQDN: If a label is not terminated by a null string, it is
called a partially qualified domain name (PQDN). A
PQDN starts from a node, but it does not reach the root.
26.8
Domains
26.9
Distribution of Name Space
• Each node in the tree has a domain name. A full domain
name is a sequence of labels separated by dots (.)
• The information contained in the domain name space
must be stored.
• However, it is very inefficient and also not reliable to
have just one computer store such a huge amount of
information.
• It is inefficient because responding to requests from all
over the world places a heavy load on the system.
• It is not reliable because any failure makes the data
inaccessible.
26.10
Hierarchy of name servers
26.15
Generic domain labels
26.16
Country domains
The country domains section uses two-character country abbreviations (us for United
States).
Second labels can be organizational, or they can be more specific national
designations.
In the figure, the address uci.ca.us. can be translated to University of California in the
state of
California in the United States.
26.17
Resolution
26.18
Recursive resolution
7
6
1 4
8
26.19
Iterative resolution
2
1
8 4
5
6 7
In iterative resolution, each server that does not know the mapping sends the IP
address of the next server back to the one that requested it.
The messages shown by events 2, 4, and 6 contain the same query.
The message shown by event 3 contains the IP address of the top-level domain
server.
The message shown by event 5 contains the IP address of the McGraw-Hill local DNS
server.
The message shown by event 7 contains the IP address of the destination.
26.20
Caching
26.21
Resource Records
26.23
DNS Messages
26.24
DNS message
• Identification is used by the client to match the response with the query.
• Flag defines whether the message is a query or response.
• The next four fields in the header define the number of each record type in the
message.
• Question section consists of one or more question records in both query and
response messages.
• Answer section consists of one or more resource records only in response
messages.
• Authoritative section gives information (domain name) about one or more
authoritative servers for the query.
• Additional section provides additional information that may help the resolver.
26.25
nslookup
In UNIX and Windows, the nslookup utility can be used to
retrieve address/name mapping. The following shows how
we can retrieve an address when the domain name is given.
26.26
Registrars
26.27
DDNS
26.28
Security of DNS
1. The attacker may read the response of a DNS server to find the
nature or names of sites the user mostly accesses. (find the user’s
profile).
2. The attacker may intercept the response of a DNS server and change
it to a new response to direct the user to the site or domain the attacker
wishes the user to access.
26.30