TCP/IP Protocol Suite 1
Chapter 17
Upon completion you will be able to:
Domain Name
System: DNS
•Understand how the DNS is organized
•Know the domains in the DNS
•Know how a name or address is resolved
•Be familiar with the query and response formats
•Understand the need for DDNS
Objectives
TCP/IP Protocol Suite 2
17.1 NAME SPACE
Thenamesassignedtomachinesmustbeuniquebecausetheaddresses
areunique.Anamespacethatmapseachaddresstoauniquenamecan
beorganizedintwoways:flatorhierarchical.
The topics discussed in this section include:
Flat Name Space
Hierarchical Name Space
TCP/IP Protocol Suite 3
17.2 DOMAIN NAME SPACE
Thedomainnamespaceishierarchicalindesign.Thenamesaredefined
inaninverted-treestructurewiththerootatthetop.Thetreecanhave
128levels:level0(root)tolevel127.
The topics discussed in this section include:
Label
Domain Name
Domain
TCP/IP Protocol Suite 4
Figure 17.1Domain name space
TCP/IP Protocol Suite 5
Figure 17.2Domain names and labels
TCP/IP Protocol Suite 6
Figure 17.3FQDN and PQDN
TCP/IP Protocol Suite 7
Figure 17.4Domains
TCP/IP Protocol Suite 8
17.3 DISTRIBUTION OF
NAME SPACE
Theinformationcontainedinthedomainnamespaceisdistributed
amongmanycomputerscalledDNSservers.
The topics discussed in this section include:
Hierarchy of Name Servers
Zone
Root Server
Primary and Secondary Servers
TCP/IP Protocol Suite 9
Figure 17.5Hierarchy of name servers
TCP/IP Protocol Suite 10
Figure 17.6Zones and domains
TCP/IP Protocol Suite 11
A primary server loads all information
from the disk file; the secondary server
loads all information from the primary
server. When the secondary downloads
information from the primary, it is called
zone transfer.
Note:
TCP/IP Protocol Suite 12
17.4 DNS IN THE INTERNET
Thedomainnamespace(tree)isdividedintothreedifferentsections:
genericdomains,countrydomains,andtheinversedomain.
The topics discussed in this section include:
Generic Domains
Country Domains
Inverse Domain
Registrar
TCP/IP Protocol Suite 13
Figure 17.7DNS used in the Internet
TCP/IP Protocol Suite 14
Figure 17.8Generic domains
TCP/IP Protocol Suite 15
Table 17.1 Generic domain labels
TCP/IP Protocol Suite 16
Table 17.1 Generic domain labels (Continued)
TCP/IP Protocol Suite 17
Figure 17.9Country domains
TCP/IP Protocol Suite 18
Figure 17.10Inverse domain
TCP/IP Protocol Suite 19
17.5 RESOLUTION
Mappinganametoanaddressoranaddresstoanameiscalledname-
addressresolution.
The topics discussed in this section include:
Resolver
Mapping Names to Addresses
Mapping Addresses to Names
Recursive Resolution
Iterative Resolution
Caching
TCP/IP Protocol Suite 20
Figure 17.11Recursive resolution
TCP/IP Protocol Suite 21
Figure 17.12Iterative resolution
TCP/IP Protocol Suite 22
17.6 DNS MESSAGES
TheDNSquerymessageconsistsofaheaderandquestionrecords;the
DNSresponsemessageconsistsofaheader,questionrecords,answer
records,authoritativerecords,andadditionalrecords.
The topics discussed in this section include:
Header
TCP/IP Protocol Suite 23
Figure 17.13DNS messages
TCP/IP Protocol Suite 24
Figure 17.14Query and response messages
TCP/IP Protocol Suite 25
Figure 17.15Header format
TCP/IP Protocol Suite 26
Figure 17.16Flags field
TCP/IP Protocol Suite 27
Table 17.2 Values of rCode
TCP/IP Protocol Suite 28
17.7 TYPES OF RECORDS
TwotypesofrecordsareusedinDNS.Thequestionrecordsareusedin
thequestionsectionofthequeryandresponsemessages.Theresource
recordsareusedintheanswer,authoritative,andadditionalinformation
sectionsoftheresponsemessage.
The topics discussed in this section include:
Question Record
Resource Record
TCP/IP Protocol Suite 29
Figure 17.17Question record format
TCP/IP Protocol Suite 30
Figure 17.18Query name format
TCP/IP Protocol Suite 31
Table 17.3 Types
TCP/IP Protocol Suite 32
Table 17.4 Classes
TCP/IP Protocol Suite 33
Figure 17.19Resource record format
TCP/IP Protocol Suite 34
17.8 COMPRESSION
DNSrequiresthatadomainnamebereplacedbyanoffsetpointerifitis
repeated.DNSdefinesa2-byteoffsetpointerthatpointstoaprevious
occurrenceofthedomainnameorpartofit.
TCP/IP Protocol Suite 35
Figure 17.20Format of an offset pointer