Domain Name Server.ppt Computer networks notes

israelv1772 19 views 49 slides Jun 29, 2024
Slide 1
Slide 1 of 49
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49

About This Presentation

dns notes


Slide Content

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

TCP/IP Protocol Suite 36
Aresolversendsaquerymessagetoalocalservertofindthe
IPaddressforthehost“chal.fhda.edu.”.Wediscussthequery
andresponsemessagesseparately.
Example1
QROpCode AATC RD RA ReservedrCode
00000 00 1 0 000 0000
Figure17.21showsthequerymessagesentbytheresolver.Thefirst2bytes
showtheidentifier(1333).Itisusedasasequencenumberandrelatesa
responsetoaquery.Becausearesolvermayevensendmanyqueriestothe
sameserver,theidentifierhelpstosortresponsesthatarriveoutoforder.
Thenextbytescontaintheflagswiththevalueof0x0100inhexadecimal.
Inbinaryitis0000000100000000,butitismoremeaningfultodivideitinto
thefieldsasshownbelow:

TCP/IP Protocol Suite 37
Figure 17.21Example 1: Query message

TCP/IP Protocol Suite 38
Example1 (Continued)
QROpCodeAATCRDRAReservedrCode
1 0000 0 01 1 000 0000
TheQRbitdefinesthemessageasaquery.TheOpCodeis0000,which
definesastandardquery.Therecursiondesired(RD)bitisset.(Referback
toFigure17.16fortheflagsfielddescriptions.)Themessagecontainsonly
onequestionrecord.Thedomainnameis4chal4fhda3edu0.Thenext2
bytesdefinethequerytypeasanIPaddress;thelast2bytesdefinetheclass
astheInternet.
Figure17.22showstheresponseoftheserver.Theresponseissimilartothe
queryexceptthattheflagsaredifferentandthenumberofanswerrecords
isone.Theflagsvalueis0x8180inhexadecimal.Inbinaryitis
1000000110000000,butagainwedivideitintofieldsasshownbelow:

TCP/IP Protocol Suite 39
Example1 (Continued)
TheQRbitdefinesthemessageasaresponse.TheOpCodeis0000,which
definesastandardresponse.Therecursionavailable(RA)andRDbitsare
set.Themessagecontainsonequestionrecordandoneanswerrecord.The
questionrecordisrepeatedfromthequerymessage.Theanswerrecordhas
avalueof0xC00C(splitintwolines),whichpointstothequestionrecord
insteadofrepeatingthedomainname.Thenextfielddefinesthedomain
type(address).Thefieldafterthatdefinestheclass(Internet).Thefieldwith
thevalue12,000istheTTL(12,000s).Thenextfieldisthelengthofthe
resourcedata,whichisanIPaddress(153.18.8.105).

TCP/IP Protocol Suite 40
Figure 17.22Example 1: Response message

TCP/IP Protocol Suite 41
AnFTPserverhasreceivedapacketfromanFTPclientwith
IPaddress153.2.7.9.TheFTPserverwantstoverifythatthe
FTPclientisanauthorizedclient.TheFTPservercanconsult
afilecontainingthelistofauthorizedclients.However,thefile
consistsonlyofdomainnames.TheFTPserverhasonlytheIP
addressoftherequestingclient,whichwasthesourceIP
addressinthereceivedIPdatagram.TheFTPserverasksthe
resolver(DNSclient)tosendaninversequerytoaDNSserver
toaskforthenameoftheFTPclient.Wediscussthequeryand
responsemessagesseparately.
Example2

TCP/IP Protocol Suite 42
Example2 (Continued)
QROpCodeAA TC RD RA ReservedrCode
0 0001 0 0 1 0 000 0000
Figure17.23showsthequerymessagesentfromtheresolvertotheserver.
Thefirst2bytesshowtheidentifier(0x1200).Theflagsvalueis0x0900in
hexadecimal.Inbinaryitis0000100100000000,andwedivideitintofields
asshownbelow:
TheOpCodeis0001,whichdefinesaninversequery.Themessagecontains
onlyonequestionrecord.Thedomainnameis19171231537in-addr4arpa.
Thenext2bytesdefinethequerytypeasPTR,andthelast2bytesdefine
theclassastheInternet.

TCP/IP Protocol Suite 43
Figure 17.23Example 2: Inverse query message

TCP/IP Protocol Suite 44
Example2 (Continued)
QROpCodeAATCRDRAReservedrCode
1 0001 1 01 1 000 0000
Figure17.24showstheresponse.Theflagsvalueis0x8D80in
hexadecimal.Inbinaryitis1000110110000000,andwedivideitintofields
asshownbelow:

TCP/IP Protocol Suite 45
Figure 17.24Example 2: Inverse response message

TCP/IP Protocol Suite 46
InUNIXandWindows,thenslookuputilitycanbeusedto
retrieveaddress/namemapping.Thefollowingshowshowwe
canretrieveanaddresswhenthedomainnameisgiven.
Example3
$ nslookup fhda.edu
Name: fhda.edu
Address: 153.18.8.1
Thenslookuputilitycanalsobeusedtoretrievethedomain
namewhentheaddressisgivenasshownbelow:
$ nslookup 153.18.8.1
1.8.18.153.in-addr.arpa name = tiptoe.fhda.edu.

TCP/IP Protocol Suite 47
17.9 DDNS
TheDynamicDomainNameSystem(DDNS)updatestheDNSmaster
filedynamically.

TCP/IP Protocol Suite 48
17.10 ENCAPSULATION
DNSusesUDPasthetransportprotocolwhenthesizeoftheresponse
messageislessthan512bytes.Ifthesizeoftheresponsemessageis
morethan512bytes,aTCPconnectionisused.

TCP/IP Protocol Suite 49
DNS can use the services of UDP or
TCP using the well-known port 53.
Note:
Tags