SlideShare a Scribd company logo
1 of 49
CChhaapptteerr 1177 
DDoommaaiinn NNaammee 
SSyysstteemm:: DDNNSS 
Objectives 
Upon completion you will be able to: 
• 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 
TCP/IP Protocol Suite 1
17.1 NAME SPACE 
The names assigned to machines must be unique bbeeccaauussee tthhee aaddddrreesssseess 
aarree uunniiqquuee.. AA nnaammee ssppaaccee tthhaatt mmaappss eeaacchh aaddddrreessss ttoo aa uunniiqquuee nnaammee ccaann 
bbee oorrggaanniizzeedd iinn ttwwoo wwaayyss:: ffllaatt oorr hhiieerraarrcchhiiccaall.. 
TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: 
FFllaatt NNaammee SSppaaccee 
HHiieerraarrcchhiiccaall NNaammee SSppaaccee 
TCP/IP Protocol Suite 2
17.2 DOMAIN NAME SPACE 
The domain name space is hierarchical in ddeessiiggnn.. TThhee nnaammeess aarree 
ddeeffiinneedd iinn aann iinnvveerrtteedd--ttrreeee ssttrruuccttuurree wwiitthh tthhee rroooott aatt tthhee ttoopp.. TThhee ttrreeee ccaann 
hhaavvee 112288 lleevveellss:: lleevveell 00 ((rroooott)) ttoo lleevveell 112277.. 
TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: 
LLaabbeell 
DDoommaaiinn NNaammee 
DDoommaaiinn 
TCP/IP Protocol Suite 3
Figure 17.1 Domain name space 
TCP/IP Protocol Suite 4
Figure 17.2 Domain names and labels 
TCP/IP Protocol Suite 5
Figure 17.3 FQDN and PQDN 
TCP/IP Protocol Suite 6
Figure 17.4 Domains 
TCP/IP Protocol Suite 7
17.3 DISTRIBUTION OF 
NAME SPACE 
The information contained in the domain name ssppaaccee iiss ddiissttrriibbuutteedd 
aammoonngg mmaannyy ccoommppuutteerrss ccaalllleedd DDNNSS sseerrvveerrss.. 
TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: 
HHiieerraarrcchhyy ooff NNaammee SSeerrvveerrss 
ZZoonnee 
RRoooott SSeerrvveerr 
PPrriimmaarryy aanndd SSeeccoonnddaarryy SSeerrvveerrss 
TCP/IP Protocol Suite 8
Figure 17.5 Hierarchy of name servers 
TCP/IP Protocol Suite 9
Figure 17.6 Zones and domains 
TCP/IP Protocol Suite 10
NNoottee:: 
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. 
TCP/IP Protocol Suite 11
17.4 DNS IN THE INTERNET 
The domain name space (tree) is divided into three ddiiffffeerreenntt sseeccttiioonnss:: 
ggeenneerriicc ddoommaaiinnss,, ccoouunnttrryy ddoommaaiinnss,, aanndd tthhee iinnvveerrssee ddoommaaiinn.. 
TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: 
GGeenneerriicc DDoommaaiinnss 
CCoouunnttrryy DDoommaaiinnss 
IInnvveerrssee DDoommaaiinn 
RReeggiissttrraarr 
TCP/IP Protocol Suite 12
Figure 17.7 DNS used in the Internet 
TCP/IP Protocol Suite 13
Figure 17.8 Generic domains 
TCP/IP Protocol Suite 14
TTaabbllee 1177..11 GGeenneerriicc ddoommaaiinn llaabbeellss 
TCP/IP Protocol Suite 15
TTaabbllee 1177..11 GGeenneerriicc ddoommaaiinn llaabbeellss ((CCoonnttiinnuueedd)) 
TCP/IP Protocol Suite 16
Figure 17.9 Country domains 
TCP/IP Protocol Suite 17
Figure 17.10 Inverse domain 
TCP/IP Protocol Suite 18
17.5 RESOLUTION 
Mapping a name to an address or an address to a nnaammee iiss ccaalllleedd nnaammee-- 
aaddddrreessss rreessoolluuttiioonn.. 
TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: 
RReessoollvveerr 
MMaappppiinngg NNaammeess ttoo AAddddrreesssseess 
MMaappppiinngg AAddddrreesssseess ttoo NNaammeess 
RReeccuurrssiivvee RReessoolluuttiioonn 
IItteerraattiivvee RReessoolluuttiioonn 
CCaacchhiinngg 
TCP/IP Protocol Suite 19
Figure 17.11 Recursive resolution 
TCP/IP Protocol Suite 20
Figure 17.12 Iterative resolution 
TCP/IP Protocol Suite 21
17.6 DNS MESSAGES 
The DNS query message consists of a header and qquueessttiioonn rreeccoorrddss;; tthhee 
DDNNSS rreessppoonnssee mmeessssaaggee ccoonnssiissttss ooff aa hheeaaddeerr,, qquueessttiioonn rreeccoorrddss,, aannsswweerr 
rreeccoorrddss,, aauutthhoorriittaattiivvee rreeccoorrddss,, aanndd aaddddiittiioonnaall rreeccoorrddss.. 
TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: 
HHeeaaddeerr 
TCP/IP Protocol Suite 22
Figure 17.13 DNS messages 
TCP/IP Protocol Suite 23
Figure 17.14 Query and response messages 
TCP/IP Protocol Suite 24
Figure 17.15 Header format 
TCP/IP Protocol Suite 25
Figure 17.16 Flags field 
TCP/IP Protocol Suite 26
TTaabbllee 1177..22 VVaalluueess ooff rrCCooddee 
TCP/IP Protocol Suite 27
17.7 TYPES OF RECORDS 
Two types of records are used in DNS. The question rreeccoorrddss aarree uusseedd iinn 
tthhee qquueessttiioonn sseeccttiioonn ooff tthhee qquueerryy aanndd rreessppoonnssee mmeessssaaggeess.. TThhee rreessoouurrccee 
rreeccoorrddss aarree uusseedd iinn tthhee aannsswweerr,, aauutthhoorriittaattiivvee,, aanndd aaddddiittiioonnaall iinnffoorrmmaattiioonn 
sseeccttiioonnss ooff tthhee rreessppoonnssee mmeessssaaggee.. 
TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: 
QQuueessttiioonn RReeccoorrdd 
RReessoouurrccee RReeccoorrdd 
TCP/IP Protocol Suite 28
Figure 17.17 Question record format 
TCP/IP Protocol Suite 29
Figure 17.18 Query name format 
TCP/IP Protocol Suite 30
TTaabbllee 1177..33 TTyyppeess 
TCP/IP Protocol Suite 31
TTaabbllee 1177..44 CCllaasssseess 
TCP/IP Protocol Suite 32
Figure 17.19 Resource record format 
TCP/IP Protocol Suite 33
17.8 COMPRESSION 
DNS requires that a domain name be replaced by an offset ppooiinntteerr iiff iitt iiss 
rreeppeeaatteedd.. DDNNSS ddeeffiinneess aa 22--bbyyttee ooffffsseett ppooiinntteerr tthhaatt ppooiinnttss ttoo aa pprreevviioouuss 
ooccccuurrrreennccee ooff tthhee ddoommaaiinn nnaammee oorr ppaarrtt ooff iitt.. 
TCP/IP Protocol Suite 34
Figure 17.20 Format of an offset pointer 
TCP/IP Protocol Suite 35
ExamplE 1 
A resolver sends a query message to a local server to find the 
IP address for the host “chal.fhda.edu.”. We discuss the query 
and response messages separately. 
Figure 17.21 shows the query message sent by the resolver. The first 2 bytes 
show the identifier (1333). It is used as a sequence number and relates a 
response to a query. Because a resolver may even send many queries to the 
same server, the identifier helps to sort responses that arrive out of order. 
The next bytes contain the flags with the value of 0x0100 in hexadecimal. 
In binary it is 0000000100000000, but it is more meaningful to divide it into 
the fields as shown below: 
QR OpCode AA TC RD RA Reserved rCode 
0 0000 0 0 1 0 000 0000 
TCP/IP Protocol Suite 36
Figure 17.21 Example 1: Query message 
TCP/IP Protocol Suite 37
ExamplE 1 (ContinuEd) 
The QR bit defines the message as a query. The OpCode is 0000, which 
defines a standard query. The recursion desired (RD) bit is set. (Refer back 
to Figure 17.16 for the flags field descriptions.) The message contains only 
one question record. The domain name is 4chal4fhda3edu0. The next 2 
bytes define the query type as an IP address; the last 2 bytes define the class 
as the Internet. 
Figure 17.22 shows the response of the server. The response is similar to 
the query except that the flags are different and the number of answer 
records is one. The flags value is 0x8180 in hexadecimal. In binary it is 
1000000110000000, but again we divide it into fields as shown below: 
QR OpCode AA TC RD RA Reserved rCode 
1 0000 0 0 1 1 000 0000 
TCP/IP Protocol Suite 38
ExamplE 1 (ContinuEd) 
The QR bit defines the message as a response. The OpCode is 0000, which 
defines a standard response. The recursion available (RA) and RD bits are 
set. The message contains one question record and one answer record. The 
question record is repeated from the query message. The answer record has 
a value of 0xC00C (split in two lines), which points to the question record 
instead of repeating the domain name. The next field defines the domain 
type (address). The field after that defines the class (Internet). The field 
with the value 12,000 is the TTL (12,000 s). The next field is the length of 
the resource data, which is an IP address (153.18.8.105). 
TCP/IP Protocol Suite 39
Figure 17.22 Example 1: Response message 
TCP/IP Protocol Suite 40
ExamplE 2 
An FTP server has received a packet from an FTP client with 
IP address 153.2.7.9. The FTP server wants to verify that the 
FTP client is an authorized client. The FTP server can consult 
a file containing the list of authorized clients. However, the file 
consists only of domain names. The FTP server has only the IP 
address of the requesting client, which was the source IP 
address in the received IP datagram. The FTP server asks the 
resolver (DNS client) to send an inverse query to a DNS server 
to ask for the name of the FTP client. We discuss the query 
and response messages separately. 
TCP/IP Protocol Suite 41
ExamplE 2 (ContinuEd) 
Figure 17.23 shows the query message sent from the resolver to the server. 
The first 2 bytes show the identifier (0x1200). The flags value is 0x0900 in 
hexadecimal. In binary it is 0000100100000000, and we divide it into fields 
as shown below: 
QR OpCode AA TC RD RA Reserved rCode 
0 0001 0 0 1 0 000 0000 
The OpCode is 0001, which defines an inverse query. The message contains 
only one question record. The domain name is 19171231537in-addr4arpa. 
The next 2 bytes define the query type as PTR, and the last 2 bytes define 
the class as the Internet. 
TCP/IP Protocol Suite 42
Figure 17.23 Example 2: Inverse query message 
TCP/IP Protocol Suite 43
ExamplE 2 (ContinuEd) 
Figure 17.24 shows the response. The flags value is 0x8D80 in 
hexadecimal. In binary it is 1000110110000000, and we divide it into fields 
as shown below: 
QR OpCode AA TC RD RA Reserved rCode 
1 0001 1 0 1 1 000 0000 
TCP/IP Protocol Suite 44
Figure 17.24 Example 2: Inverse response message 
TCP/IP Protocol Suite 45
ExamplE 3 
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. 
$ nslookup fhda.edu 
Name: fhda.edu 
Address: 153.18.8.1 
The nslookup utility can also be used to retrieve the domain 
name when the address is given as shown below: 
$ nslookup 153.18.8.1 
1.8.18.153.in-addr.arpa name = tiptoe.fhda.edu. 
TCP/IP Protocol Suite 46
17.9 DDNS 
The Dynamic Domain Name System (DDNS) uuppddaatteess tthhee DDNNSS mmaasstteerr 
ffiillee ddyynnaammiiccaallllyy.. 
TCP/IP Protocol Suite 47
17.10 ENCAPSULATION 
DNS uses UDP as the transport protocol when the ssiizzee ooff tthhee rreessppoonnssee 
mmeessssaaggee iiss lleessss tthhaann 551122 bbyytteess.. IIff tthhee ssiizzee ooff tthhee rreessppoonnssee mmeessssaaggee iiss 
mmoorree tthhaann 551122 bbyytteess,, aa TTCCPP ccoonnnneeccttiioonn iiss uusseedd.. 
TCP/IP Protocol Suite 48
NNoottee:: 
DNS can use the services of UDP or 
TCP using the well-known port 53. 
TCP/IP Protocol Suite 49

More Related Content

What's hot

Chap 05 ip addresses classfless
Chap 05 ip addresses classflessChap 05 ip addresses classfless
Chap 05 ip addresses classflessNoctorous Jamal
 
Chap 20 smtp, pop, imap
Chap 20 smtp, pop, imapChap 20 smtp, pop, imap
Chap 20 smtp, pop, imapNoctorous Jamal
 
Chap 06 delivery and routing of ip packets
Chap 06 delivery and routing of ip packetsChap 06 delivery and routing of ip packets
Chap 06 delivery and routing of ip packetsNoctorous Jamal
 
Chap 27 next generation i pv6
Chap 27 next generation i pv6Chap 27 next generation i pv6
Chap 27 next generation i pv6Noctorous Jamal
 
Chap 13 stream control transmission protocol
Chap 13 stream control transmission protocolChap 13 stream control transmission protocol
Chap 13 stream control transmission protocolNoctorous Jamal
 
Chap 04 ip addresses classful
Chap 04 ip addresses classfulChap 04 ip addresses classful
Chap 04 ip addresses classfulNoctorous Jamal
 
Chap 23 ip over atm
Chap 23 ip over atmChap 23 ip over atm
Chap 23 ip over atmNoctorous Jamal
 
Chap 25 multimedia
Chap 25 multimediaChap 25 multimedia
Chap 25 multimediaNoctorous Jamal
 
Meeting 7 : host configuration: dhcp
Meeting 7 : host configuration: dhcpMeeting 7 : host configuration: dhcp
Meeting 7 : host configuration: dhcpSyaiful Ahdan
 
Meeting 12. pop, imap.ppt
Meeting 12. pop, imap.pptMeeting 12. pop, imap.ppt
Meeting 12. pop, imap.pptSyaiful Ahdan
 
Meeting 5.1 : telnet
Meeting 5.1 : telnetMeeting 5.1 : telnet
Meeting 5.1 : telnetSyaiful Ahdan
 

What's hot (20)

Chap 14 rip, ospf
Chap 14 rip, ospfChap 14 rip, ospf
Chap 14 rip, ospf
 
Chap 05 ip addresses classfless
Chap 05 ip addresses classflessChap 05 ip addresses classfless
Chap 05 ip addresses classfless
 
Chap 22 www http
Chap 22 www httpChap 22 www http
Chap 22 www http
 
Chap 20 smtp, pop, imap
Chap 20 smtp, pop, imapChap 20 smtp, pop, imap
Chap 20 smtp, pop, imap
 
Chap 06 delivery and routing of ip packets
Chap 06 delivery and routing of ip packetsChap 06 delivery and routing of ip packets
Chap 06 delivery and routing of ip packets
 
Chap 27 next generation i pv6
Chap 27 next generation i pv6Chap 27 next generation i pv6
Chap 27 next generation i pv6
 
Chap 13 stream control transmission protocol
Chap 13 stream control transmission protocolChap 13 stream control transmission protocol
Chap 13 stream control transmission protocol
 
Chap 24 mobile ip
Chap 24 mobile ipChap 24 mobile ip
Chap 24 mobile ip
 
Chap 04 ip addresses classful
Chap 04 ip addresses classfulChap 04 ip addresses classful
Chap 04 ip addresses classful
 
Chap 28 security
Chap 28 securityChap 28 security
Chap 28 security
 
Chap 23 ip over atm
Chap 23 ip over atmChap 23 ip over atm
Chap 23 ip over atm
 
Chap 25 multimedia
Chap 25 multimediaChap 25 multimedia
Chap 25 multimedia
 
Ch21
Ch21Ch21
Ch21
 
Chap 11
Chap 11Chap 11
Chap 11
 
Ch11
Ch11Ch11
Ch11
 
Meeting 7 : host configuration: dhcp
Meeting 7 : host configuration: dhcpMeeting 7 : host configuration: dhcp
Meeting 7 : host configuration: dhcp
 
FTP & TFTP
FTP & TFTPFTP & TFTP
FTP & TFTP
 
Meeting 12. pop, imap.ppt
Meeting 12. pop, imap.pptMeeting 12. pop, imap.ppt
Meeting 12. pop, imap.ppt
 
Ch10
Ch10Ch10
Ch10
 
Meeting 5.1 : telnet
Meeting 5.1 : telnetMeeting 5.1 : telnet
Meeting 5.1 : telnet
 

Viewers also liked

Network delay
Network delayNetwork delay
Network delaySushma Singh
 
Chap 03
Chap 03Chap 03
Chap 03IGNOU
 
Chap 01
Chap 01Chap 01
Chap 01IGNOU
 
Chap 04
Chap 04Chap 04
Chap 04IGNOU
 
Modeling Style and Delay Model of VHDL By Ap
Modeling Style and Delay Model of VHDL By ApModeling Style and Delay Model of VHDL By Ap
Modeling Style and Delay Model of VHDL By ApEr. Ashish Pandey
 
Udp Programming
Udp ProgrammingUdp Programming
Udp Programmingphanleson
 
Chap 02
Chap 02Chap 02
Chap 02IGNOU
 
Chap 16 bootp & dhcp
Chap 16 bootp & dhcpChap 16 bootp & dhcp
Chap 16 bootp & dhcpNoctorous Jamal
 
Chap 03 underlying technology
Chap 03 underlying technologyChap 03 underlying technology
Chap 03 underlying technologyNoctorous Jamal
 
Chap 15 multicasting
Chap 15 multicastingChap 15 multicasting
Chap 15 multicastingNoctorous Jamal
 
Sept 2017 introduction
Sept 2017   introductionSept 2017   introduction
Sept 2017 introductionshahin raj
 
Sept 2017 static routing and packet forwarding
Sept 2017    static routing and packet forwardingSept 2017    static routing and packet forwarding
Sept 2017 static routing and packet forwardingshahin raj
 

Viewers also liked (16)

Chap 26 vpn
Chap 26 vpnChap 26 vpn
Chap 26 vpn
 
Network delay
Network delayNetwork delay
Network delay
 
Chap 03
Chap 03Chap 03
Chap 03
 
Chap 18 telnet
Chap 18 telnetChap 18 telnet
Chap 18 telnet
 
Chap 01
Chap 01Chap 01
Chap 01
 
Chap 04
Chap 04Chap 04
Chap 04
 
Modeling Style and Delay Model of VHDL By Ap
Modeling Style and Delay Model of VHDL By ApModeling Style and Delay Model of VHDL By Ap
Modeling Style and Delay Model of VHDL By Ap
 
Udp Programming
Udp ProgrammingUdp Programming
Udp Programming
 
Chap 02
Chap 02Chap 02
Chap 02
 
Chap 16 bootp & dhcp
Chap 16 bootp & dhcpChap 16 bootp & dhcp
Chap 16 bootp & dhcp
 
Lec5 chp6
Lec5 chp6Lec5 chp6
Lec5 chp6
 
Chap 03 underlying technology
Chap 03 underlying technologyChap 03 underlying technology
Chap 03 underlying technology
 
Chap 15 multicasting
Chap 15 multicastingChap 15 multicasting
Chap 15 multicasting
 
Chap 12 tcp
Chap 12 tcpChap 12 tcp
Chap 12 tcp
 
Sept 2017 introduction
Sept 2017   introductionSept 2017   introduction
Sept 2017 introduction
 
Sept 2017 static routing and packet forwarding
Sept 2017    static routing and packet forwardingSept 2017    static routing and packet forwarding
Sept 2017 static routing and packet forwarding
 

Similar to Chap 17 dns

DomainNamingServer and its objectives.ppt
DomainNamingServer and its objectives.pptDomainNamingServer and its objectives.ppt
DomainNamingServer and its objectives.pptcollegecode4u
 
Ramakant tyagi presentation on ip addressing
Ramakant tyagi presentation on ip addressingRamakant tyagi presentation on ip addressing
Ramakant tyagi presentation on ip addressingBharat Sanchar Nigam Limited
 
Chapter 01 - Overview
Chapter 01 - OverviewChapter 01 - Overview
Chapter 01 - Overviewphanleson
 
Unit_3_TCP_UDP.ppt
Unit_3_TCP_UDP.pptUnit_3_TCP_UDP.ppt
Unit_3_TCP_UDP.pptzmulani8
 
subnetting
subnettingsubnetting
subnettingswati463221
 
16.) layer 3 (basic tcp ip routing)
16.) layer 3 (basic tcp ip routing)16.) layer 3 (basic tcp ip routing)
16.) layer 3 (basic tcp ip routing)Jeff Green
 
Bt0076, tcp ip
Bt0076, tcp ipBt0076, tcp ip
Bt0076, tcp ipsmumbahelp
 
Bt0076, tcp ip
Bt0076, tcp ipBt0076, tcp ip
Bt0076, tcp ipsmumbahelp
 
Protection mode
Protection modeProtection mode
Protection modeDeepak Kumar
 
Bt0076 tcp ip
Bt0076  tcp ipBt0076  tcp ip
Bt0076 tcp ipsmumbahelp
 
Unit-4 networking basics in java
Unit-4 networking basics in javaUnit-4 networking basics in java
Unit-4 networking basics in javaAmol Gaikwad
 
IPAddressing .pptx
IPAddressing .pptxIPAddressing .pptx
IPAddressing .pptxkarthikvcyber
 
Computer network
Computer networkComputer network
Computer networkGaurav Rawat
 
CCNA Interview.pdf
CCNA Interview.pdfCCNA Interview.pdf
CCNA Interview.pdfhoang971
 

Similar to Chap 17 dns (20)

DomainNamingServer and its objectives.ppt
DomainNamingServer and its objectives.pptDomainNamingServer and its objectives.ppt
DomainNamingServer and its objectives.ppt
 
Chap 19
Chap 19Chap 19
Chap 19
 
Ramakant tyagi presentation on ip addressing
Ramakant tyagi presentation on ip addressingRamakant tyagi presentation on ip addressing
Ramakant tyagi presentation on ip addressing
 
Network.pptx
Network.pptxNetwork.pptx
Network.pptx
 
Lecture9
Lecture9Lecture9
Lecture9
 
Chapter 01 - Overview
Chapter 01 - OverviewChapter 01 - Overview
Chapter 01 - Overview
 
Unit_3_TCP_UDP.ppt
Unit_3_TCP_UDP.pptUnit_3_TCP_UDP.ppt
Unit_3_TCP_UDP.ppt
 
Week6 final
Week6 finalWeek6 final
Week6 final
 
dns.04f.ppt
dns.04f.pptdns.04f.ppt
dns.04f.ppt
 
subnetting
subnettingsubnetting
subnetting
 
16.) layer 3 (basic tcp ip routing)
16.) layer 3 (basic tcp ip routing)16.) layer 3 (basic tcp ip routing)
16.) layer 3 (basic tcp ip routing)
 
Bt0076, tcp ip
Bt0076, tcp ipBt0076, tcp ip
Bt0076, tcp ip
 
Bt0076, tcp ip
Bt0076, tcp ipBt0076, tcp ip
Bt0076, tcp ip
 
Protection mode
Protection modeProtection mode
Protection mode
 
Bt0076 tcp ip
Bt0076  tcp ipBt0076  tcp ip
Bt0076 tcp ip
 
Unit-4 networking basics in java
Unit-4 networking basics in javaUnit-4 networking basics in java
Unit-4 networking basics in java
 
IPAddressing .pptx
IPAddressing .pptxIPAddressing .pptx
IPAddressing .pptx
 
Computer network
Computer networkComputer network
Computer network
 
CCNA Interview.pdf
CCNA Interview.pdfCCNA Interview.pdf
CCNA Interview.pdf
 
Network.pptx
Network.pptxNetwork.pptx
Network.pptx
 

Recently uploaded

Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoĂŁo Esperancinha
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
An introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxAn introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxPurva Nikam
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction managementMariconPadriquez1
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 

Recently uploaded (20)

Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
An introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxAn introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptx
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction management
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 

Chap 17 dns

  • 1. CChhaapptteerr 1177 DDoommaaiinn NNaammee SSyysstteemm:: DDNNSS Objectives Upon completion you will be able to: • 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 TCP/IP Protocol Suite 1
  • 2. 17.1 NAME SPACE The names assigned to machines must be unique bbeeccaauussee tthhee aaddddrreesssseess aarree uunniiqquuee.. AA nnaammee ssppaaccee tthhaatt mmaappss eeaacchh aaddddrreessss ttoo aa uunniiqquuee nnaammee ccaann bbee oorrggaanniizzeedd iinn ttwwoo wwaayyss:: ffllaatt oorr hhiieerraarrcchhiiccaall.. TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: FFllaatt NNaammee SSppaaccee HHiieerraarrcchhiiccaall NNaammee SSppaaccee TCP/IP Protocol Suite 2
  • 3. 17.2 DOMAIN NAME SPACE The domain name space is hierarchical in ddeessiiggnn.. TThhee nnaammeess aarree ddeeffiinneedd iinn aann iinnvveerrtteedd--ttrreeee ssttrruuccttuurree wwiitthh tthhee rroooott aatt tthhee ttoopp.. TThhee ttrreeee ccaann hhaavvee 112288 lleevveellss:: lleevveell 00 ((rroooott)) ttoo lleevveell 112277.. TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: LLaabbeell DDoommaaiinn NNaammee DDoommaaiinn TCP/IP Protocol Suite 3
  • 4. Figure 17.1 Domain name space TCP/IP Protocol Suite 4
  • 5. Figure 17.2 Domain names and labels TCP/IP Protocol Suite 5
  • 6. Figure 17.3 FQDN and PQDN TCP/IP Protocol Suite 6
  • 7. Figure 17.4 Domains TCP/IP Protocol Suite 7
  • 8. 17.3 DISTRIBUTION OF NAME SPACE The information contained in the domain name ssppaaccee iiss ddiissttrriibbuutteedd aammoonngg mmaannyy ccoommppuutteerrss ccaalllleedd DDNNSS sseerrvveerrss.. TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: HHiieerraarrcchhyy ooff NNaammee SSeerrvveerrss ZZoonnee RRoooott SSeerrvveerr PPrriimmaarryy aanndd SSeeccoonnddaarryy SSeerrvveerrss TCP/IP Protocol Suite 8
  • 9. Figure 17.5 Hierarchy of name servers TCP/IP Protocol Suite 9
  • 10. Figure 17.6 Zones and domains TCP/IP Protocol Suite 10
  • 11. NNoottee:: 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. TCP/IP Protocol Suite 11
  • 12. 17.4 DNS IN THE INTERNET The domain name space (tree) is divided into three ddiiffffeerreenntt sseeccttiioonnss:: ggeenneerriicc ddoommaaiinnss,, ccoouunnttrryy ddoommaaiinnss,, aanndd tthhee iinnvveerrssee ddoommaaiinn.. TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: GGeenneerriicc DDoommaaiinnss CCoouunnttrryy DDoommaaiinnss IInnvveerrssee DDoommaaiinn RReeggiissttrraarr TCP/IP Protocol Suite 12
  • 13. Figure 17.7 DNS used in the Internet TCP/IP Protocol Suite 13
  • 14. Figure 17.8 Generic domains TCP/IP Protocol Suite 14
  • 15. TTaabbllee 1177..11 GGeenneerriicc ddoommaaiinn llaabbeellss TCP/IP Protocol Suite 15
  • 16. TTaabbllee 1177..11 GGeenneerriicc ddoommaaiinn llaabbeellss ((CCoonnttiinnuueedd)) TCP/IP Protocol Suite 16
  • 17. Figure 17.9 Country domains TCP/IP Protocol Suite 17
  • 18. Figure 17.10 Inverse domain TCP/IP Protocol Suite 18
  • 19. 17.5 RESOLUTION Mapping a name to an address or an address to a nnaammee iiss ccaalllleedd nnaammee-- aaddddrreessss rreessoolluuttiioonn.. TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: RReessoollvveerr MMaappppiinngg NNaammeess ttoo AAddddrreesssseess MMaappppiinngg AAddddrreesssseess ttoo NNaammeess RReeccuurrssiivvee RReessoolluuttiioonn IItteerraattiivvee RReessoolluuttiioonn CCaacchhiinngg TCP/IP Protocol Suite 19
  • 20. Figure 17.11 Recursive resolution TCP/IP Protocol Suite 20
  • 21. Figure 17.12 Iterative resolution TCP/IP Protocol Suite 21
  • 22. 17.6 DNS MESSAGES The DNS query message consists of a header and qquueessttiioonn rreeccoorrddss;; tthhee DDNNSS rreessppoonnssee mmeessssaaggee ccoonnssiissttss ooff aa hheeaaddeerr,, qquueessttiioonn rreeccoorrddss,, aannsswweerr rreeccoorrddss,, aauutthhoorriittaattiivvee rreeccoorrddss,, aanndd aaddddiittiioonnaall rreeccoorrddss.. TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: HHeeaaddeerr TCP/IP Protocol Suite 22
  • 23. Figure 17.13 DNS messages TCP/IP Protocol Suite 23
  • 24. Figure 17.14 Query and response messages TCP/IP Protocol Suite 24
  • 25. Figure 17.15 Header format TCP/IP Protocol Suite 25
  • 26. Figure 17.16 Flags field TCP/IP Protocol Suite 26
  • 27. TTaabbllee 1177..22 VVaalluueess ooff rrCCooddee TCP/IP Protocol Suite 27
  • 28. 17.7 TYPES OF RECORDS Two types of records are used in DNS. The question rreeccoorrddss aarree uusseedd iinn tthhee qquueessttiioonn sseeccttiioonn ooff tthhee qquueerryy aanndd rreessppoonnssee mmeessssaaggeess.. TThhee rreessoouurrccee rreeccoorrddss aarree uusseedd iinn tthhee aannsswweerr,, aauutthhoorriittaattiivvee,, aanndd aaddddiittiioonnaall iinnffoorrmmaattiioonn sseeccttiioonnss ooff tthhee rreessppoonnssee mmeessssaaggee.. TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: QQuueessttiioonn RReeccoorrdd RReessoouurrccee RReeccoorrdd TCP/IP Protocol Suite 28
  • 29. Figure 17.17 Question record format TCP/IP Protocol Suite 29
  • 30. Figure 17.18 Query name format TCP/IP Protocol Suite 30
  • 31. TTaabbllee 1177..33 TTyyppeess TCP/IP Protocol Suite 31
  • 32. TTaabbllee 1177..44 CCllaasssseess TCP/IP Protocol Suite 32
  • 33. Figure 17.19 Resource record format TCP/IP Protocol Suite 33
  • 34. 17.8 COMPRESSION DNS requires that a domain name be replaced by an offset ppooiinntteerr iiff iitt iiss rreeppeeaatteedd.. DDNNSS ddeeffiinneess aa 22--bbyyttee ooffffsseett ppooiinntteerr tthhaatt ppooiinnttss ttoo aa pprreevviioouuss ooccccuurrrreennccee ooff tthhee ddoommaaiinn nnaammee oorr ppaarrtt ooff iitt.. TCP/IP Protocol Suite 34
  • 35. Figure 17.20 Format of an offset pointer TCP/IP Protocol Suite 35
  • 36. ExamplE 1 A resolver sends a query message to a local server to find the IP address for the host “chal.fhda.edu.”. We discuss the query and response messages separately. Figure 17.21 shows the query message sent by the resolver. The first 2 bytes show the identifier (1333). It is used as a sequence number and relates a response to a query. Because a resolver may even send many queries to the same server, the identifier helps to sort responses that arrive out of order. The next bytes contain the flags with the value of 0x0100 in hexadecimal. In binary it is 0000000100000000, but it is more meaningful to divide it into the fields as shown below: QR OpCode AA TC RD RA Reserved rCode 0 0000 0 0 1 0 000 0000 TCP/IP Protocol Suite 36
  • 37. Figure 17.21 Example 1: Query message TCP/IP Protocol Suite 37
  • 38. ExamplE 1 (ContinuEd) The QR bit defines the message as a query. The OpCode is 0000, which defines a standard query. The recursion desired (RD) bit is set. (Refer back to Figure 17.16 for the flags field descriptions.) The message contains only one question record. The domain name is 4chal4fhda3edu0. The next 2 bytes define the query type as an IP address; the last 2 bytes define the class as the Internet. Figure 17.22 shows the response of the server. The response is similar to the query except that the flags are different and the number of answer records is one. The flags value is 0x8180 in hexadecimal. In binary it is 1000000110000000, but again we divide it into fields as shown below: QR OpCode AA TC RD RA Reserved rCode 1 0000 0 0 1 1 000 0000 TCP/IP Protocol Suite 38
  • 39. ExamplE 1 (ContinuEd) The QR bit defines the message as a response. The OpCode is 0000, which defines a standard response. The recursion available (RA) and RD bits are set. The message contains one question record and one answer record. The question record is repeated from the query message. The answer record has a value of 0xC00C (split in two lines), which points to the question record instead of repeating the domain name. The next field defines the domain type (address). The field after that defines the class (Internet). The field with the value 12,000 is the TTL (12,000 s). The next field is the length of the resource data, which is an IP address (153.18.8.105). TCP/IP Protocol Suite 39
  • 40. Figure 17.22 Example 1: Response message TCP/IP Protocol Suite 40
  • 41. ExamplE 2 An FTP server has received a packet from an FTP client with IP address 153.2.7.9. The FTP server wants to verify that the FTP client is an authorized client. The FTP server can consult a file containing the list of authorized clients. However, the file consists only of domain names. The FTP server has only the IP address of the requesting client, which was the source IP address in the received IP datagram. The FTP server asks the resolver (DNS client) to send an inverse query to a DNS server to ask for the name of the FTP client. We discuss the query and response messages separately. TCP/IP Protocol Suite 41
  • 42. ExamplE 2 (ContinuEd) Figure 17.23 shows the query message sent from the resolver to the server. The first 2 bytes show the identifier (0x1200). The flags value is 0x0900 in hexadecimal. In binary it is 0000100100000000, and we divide it into fields as shown below: QR OpCode AA TC RD RA Reserved rCode 0 0001 0 0 1 0 000 0000 The OpCode is 0001, which defines an inverse query. The message contains only one question record. The domain name is 19171231537in-addr4arpa. The next 2 bytes define the query type as PTR, and the last 2 bytes define the class as the Internet. TCP/IP Protocol Suite 42
  • 43. Figure 17.23 Example 2: Inverse query message TCP/IP Protocol Suite 43
  • 44. ExamplE 2 (ContinuEd) Figure 17.24 shows the response. The flags value is 0x8D80 in hexadecimal. In binary it is 1000110110000000, and we divide it into fields as shown below: QR OpCode AA TC RD RA Reserved rCode 1 0001 1 0 1 1 000 0000 TCP/IP Protocol Suite 44
  • 45. Figure 17.24 Example 2: Inverse response message TCP/IP Protocol Suite 45
  • 46. ExamplE 3 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. $ nslookup fhda.edu Name: fhda.edu Address: 153.18.8.1 The nslookup utility can also be used to retrieve the domain name when the address is given as shown below: $ nslookup 153.18.8.1 1.8.18.153.in-addr.arpa name = tiptoe.fhda.edu. TCP/IP Protocol Suite 46
  • 47. 17.9 DDNS The Dynamic Domain Name System (DDNS) uuppddaatteess tthhee DDNNSS mmaasstteerr ffiillee ddyynnaammiiccaallllyy.. TCP/IP Protocol Suite 47
  • 48. 17.10 ENCAPSULATION DNS uses UDP as the transport protocol when the ssiizzee ooff tthhee rreessppoonnssee mmeessssaaggee iiss lleessss tthhaann 551122 bbyytteess.. IIff tthhee ssiizzee ooff tthhee rreessppoonnssee mmeessssaaggee iiss mmoorree tthhaann 551122 bbyytteess,, aa TTCCPP ccoonnnneeccttiioonn iiss uusseedd.. TCP/IP Protocol Suite 48
  • 49. NNoottee:: DNS can use the services of UDP or TCP using the well-known port 53. TCP/IP Protocol Suite 49