SlideShare a Scribd company logo
1 of 27
PRESENTATION
ON
“DOMAIN NAME
SYSTEM”
SUBMITTED BY :
VIVEK GAUTAM
MCA
3
1. What is the IP
address of
udel.edu ?
Introduction
1. What is the
host name of
128.175.13.74
It is 128.175.13.92
It is strauss.udel.edu
4
Real Life Analogy: Telephone Example
Source:
Child
Newark, DE
Destination: Dad
Udel-Newark, DE
Telephone connection
Information Child Needs: Dad’s Phone #
5
Dials 302-731-1212:
(What is University # ?)
operator
2
Dials 0: (what is
Newark’s area code?)
3
(Newark’s area code is
302)
Directory
assist
45
(University number: 302-831-
4567)
University
operator
6
Dials 302-831-4567:
(what is Dad phone #?)
7
Dad’s phone is
302-831-1949
Calls dad
(What is Dad’s Phone#?)
1
Older sister
Child
Dad’s phone is
302-831-1949
8
6
DNS
Components
There are 3 components:
• Name Space:
Specifications for a structured name space and data
associated with the names
• Resolvers:
Client programs that extract information from Name
Servers.
• Name Servers:
Server programs which hold information about the
structure and the names.
7
Name Space
8
Resolvers
A Resolver maps a name to an address and vice
versa.
Query
Response
Resolver Name Server
9
iterative response (referral)
“I don't know. Try a3.nstld.com.”
2
a3.nstl
d.com
3
Iterative Resolution
client
iterative request
“What is the IP address of
www.google.com?”
udel
server
1
iterative response (referral)
“I don't know. Try a.root-servers.net.”
4
a.root
server
5
iterative response (referral)
“I don't know. Try a.gtld-servers.net.”
6
a.gtld-
server
7
iterative response (referral)
“I don't know. Try ns1.google.com.”
8
ns1.goo
gle.com
9
iterative response
“The IP address of www.google.com
is 216.239.37.99.”10
10
Recursive Resolution
client
recursive request
“What is the IP address of
www.google.com?”
udel
serve
r
1
edu
server
2
root
server
3 com
server
4
google
server
5
recursive response
“The IP address of www.google.com is
216.239.37.99.”
6
10
7
8
9
11
Master
serverZone transfer
Zone
data
file
From
disk
Authoritative Data
(primary master and
slave zones)
Agent
(looks up queries
on behalf of resolvers)
Cache Data
(responses from
other name servers)
Name Server Process
Name Server
Architecture:
12
Resolver
Query
Response
Authoritative Data
(primary master and
slave zones)
Agent
(looks up queries
on behalf of resolvers)
Cache Data
(responses from
other name servers)
Name Server Process
Authoritative Data:
Name Server (cont’d)
13
Arbitrary
name
server
Response
Resolver
Query
Query
Authoritative Data
(primary master and
slave zones)
Agent
(looks up queries
on behalf of resolvers)
Cache Data
(responses from
other name servers)
Name Server Process
Response
Using Other Name Servers:
Name Server (cont’d)
14
Cached Data :
Query
Response
Authoritative Data
(primary master and
slave zones)
Agent
(looks up queries
on behalf of resolvers)
Cache Data
(responses from
other name servers)
Name Server Process
Resolver
Name Server (cont’d)
15
Block Diagram
User
Program
Foreign
Name
Server
Cache
Resolver
Query Query
Reference
Response
Addition
Response
16
DNS Messages
Messages
ResponseQuery
17
DNS Message Format
Header (12 bytes)
Question section
Header (12 bytes)
Question section
Answer section
Authoritative section
Additional section
Identification Flags
2 bytes 2 bytes
Number of
Question Records
Number of
Answer Records
(zeroed in query)
Number of Auth-
oritative Records
(Zeroed in query)
Number of
Additional Records
(zeroed in query)
0 = query,
1 = response
0 = standard, 1 = inverse,
2 = server status request
Authoritative
Answer flag Truncated flag Recursion Desired flag
Recursion Available flag
QR OpCode AA TC RD RA 0 0 0 rCode
no error
format error
problem at name server
domain reference problem
query type not supported
administratively prohibited
reserved
0
1
2
3
4
5
6-15
18
Question Record Format
class of network (1 = Internet)
12
5
2
1 Address – IPv4
Name Server (authoritative)
Canonical Name (alias)
Pointer – reverse lookup
15 Mail Exchange
28 Address - IPv6
252 Zone Transfer
PTR
CNAME
NS
A
MX
AAAA
AXFR
3 r e n 5 e e c i s 4 u d e l 3 e d u 0
counts
sent in query;
repeated in response
Query type
(16 bits)
Query name
(variable length)
Query class
(16 bits)
19
Resource Record Format
answer, authoritative, and
additional sections in response
Resource data
(variable length)
Domain type
(16 bits)
Domain Name
(variable length)
Domain class
(16 bits)
Time to Live
(32 bits)
data length
(16 bits)
name of host/domain that this
record provides information for
type of data in resource record
(same types as used in question record)
number of seconds this
record may be cached
length of resource data
the “payload” of the
resource record
same as in question record
20
Compression
3 r e n 5 e e
4 u d e l 3 e d u 0
c i s
bytes 0-11
Query type
(16 bits)
Query Class
(16 bits)
Domain Name
(variable length)
Header (12 bytes)
Query name
(variable length)
Question
Section
Answer
Section
byte 12
C0 0C
1100000000001100 = 1210
21
Example forward query/response
ident 0x0100
0x0001 0x0000
0x0000 0x0000
3 'w' 'w' 'w'
4 'u' 'd' 'e'
'l' 3 'e' 'd'
'u' 0
0x0001(IN)
0x0001(A)
flags: recursion desired (RD)
“What is the IP address
of www.udel.edu?”
Hdr
Qry 3 'w' 'w' 'w'
4 'u' 'd' 'e'
'l' 3 'e' 'd'
'u' 0
0x0004
same ident 0x8180
0x0001 0x0001
0x0004 0x0004
0x0001(IN)
0x0001(A)
0xC00C 0x0001(A)
0x0001(IN)
0x80AF0D3F
(128.175.13.63)
...0xB2F5
...
flags: query response (QR),
recursion desired (RD),
recursion available (RA)
0x0000...
TTL: 45301 seconds ≈ 12.6 hours
“www.udel.edu's IP address
is 128.175.13.63.”
Hdr
Qry
Ans
22
Example inverse query/response
ident 0x0100
0x0001 0x0000
0x0000 0x0000
0x000C(PTR) 0x0001(IN)
2 '6' '3' 2
'1' '3' 3 '1'
'7' '5' 3 '1'
'2' '8' 7 'i'
'n' '-' 'a' 'd'
'd' 'r' 4 'a'
'r' 'p' 'a' 0
“What is the name of the
host at 128.175.13.63?”
Hdr
Qr
y
3 'w' 'w' 'w'
4 'u' 'd' 'e'
'l' 3 'e' 'd'
'u' 0
same ident 0x8180
0x0001 0x0001
0x0004 0x0004
0x000C(PTR)
0x0001(IN)
...0xB003
0x0000...
2 '6' '3' 2
'1' '3' 3 '1'
'7' '5' 3 '1'
'2' '8' 7 'i'
'n' '-' 'a' 'd'
'd' 'r' 4 'a'
'r' 'p' 'a' 0
0x000C(PTR) 0x0001(IN)
0x000E
0xC00C
...
“The host at 128.175.13.63
is named www.udel.edu.”
Hdr
Qry
Ans
TTL: 45056 seconds ≈ 12.5 hours
23
Resource Record Sections
• Resource Record sections:
– answer = record(s) sent in response to query(s).
– authoritative = DNS servers which are authoritative for answer
record(s).
– additional = any other related information.
• MX records:
– mail exchange (MX) records provide mail addressing info.
– MX query asks “What hosts will accept mail for domain X?”
– MX resource records say “You can send mail for domain X to host
Y.”
delivery priority (lower value = higher priority)preference (2 bytes)
exchange
(variable length)
domain name of host that will accept mail
MX Resource Data
24
0x000A 7 'c'
'o' 'p' 'l' 'a'
'n' 'd' 0xC00C
ident 0x8180
0x0001 0x0002
0x0004 0x0006
0x0001(IN)
0x000F(MX)
0x0001...
4 'u' 'd' 'e'
'l' 3 'e' 'd'
'u' 0 0x000F(MX)
0xC00C
0x000F(MX)
0x0001(IN)
0xC00C
0x000C
0x0014 7 's'
't' 'r' 'a' 'u'
's' 's' 0xC00C
0x000C
0x0001(IN)
0x0001...
...0x28F6
...0x28F6
...
Hdr
Qry
Ans
Ans
4 'D' 'N' 'S'
'1' 0xC00C
0xC00C 0x0002(NS)
0x0001(IN) 0x0000...
4 'D' 'N' 'S'
'2' 0XC00C
...0x19FA
0xC028 0x0001(A)
0x0001(IN) 0x0001...
0x0002(NS)
0x0001(IN) 0x0000...
0x0007
0xC00C
128.175.13.74
...0x2FB4 0x0004
0xC040 0x0001(A)
0x0001(IN) 0x0001...
...0x0D5D 0x0004
...0x19FA
0x0007
128.175.13.92
...
...
...
Auth
Auth
Adtl
Adtl
Example MX response
25
Transport
IP
header
UDP
header
DNS message
max. 512 bytes
no limit (up to max. TCP payload size)
IP
header
TCP
header
DNS message
2-byte
DNS msg.
length
●
DNS messages are encapsulated in UDP by default.
●
If the resolver expects the response to exceed 512 bytes, the
resolver encapsulates the query in TCP instead.
●
If a request is sent over UDP and the response is longer than 512
bytes, the server sends the first 512 bytes of the response using
UDP and sets the TC (truncated) flag. The resolver then re-sends
the query using TCP.
26
Dynamic DNS
Client
DHCP
Server
Primary DNS Server
Zone File
IP Address?
IP Address Update
27
THANK
YOU

More Related Content

What's hot (20)

Domain name system
Domain name systemDomain name system
Domain name system
 
Dns ppt
Dns pptDns ppt
Dns ppt
 
Dns(Domain name system)
Dns(Domain name system)Dns(Domain name system)
Dns(Domain name system)
 
Dns
DnsDns
Dns
 
Chapter 29 Domain Name System.ppt
Chapter 29 Domain Name System.pptChapter 29 Domain Name System.ppt
Chapter 29 Domain Name System.ppt
 
Dns server
Dns server Dns server
Dns server
 
Dns name resolution process
Dns name resolution processDns name resolution process
Dns name resolution process
 
Presentation on Domain Name System
Presentation on Domain Name SystemPresentation on Domain Name System
Presentation on Domain Name System
 
DNS
DNSDNS
DNS
 
Domain Name Server
Domain Name ServerDomain Name Server
Domain Name Server
 
Domain Name System
Domain Name SystemDomain Name System
Domain Name System
 
DNS (Domain Name System)
DNS (Domain Name System)DNS (Domain Name System)
DNS (Domain Name System)
 
How to configure dns server(2)
How to configure dns server(2)How to configure dns server(2)
How to configure dns server(2)
 
The History of DNS
The History of DNSThe History of DNS
The History of DNS
 
Dns And Snmp
Dns And SnmpDns And Snmp
Dns And Snmp
 
Dns
DnsDns
Dns
 
Dns
DnsDns
Dns
 
25 DNS
25 DNS25 DNS
25 DNS
 
Domain Name System DNS
Domain Name System DNSDomain Name System DNS
Domain Name System DNS
 
Domain name system
Domain name systemDomain name system
Domain name system
 

Similar to Domain name system (20)

dns.04f.ppt
dns.04f.pptdns.04f.ppt
dns.04f.ppt
 
CSE dns ppt.pptx
CSE dns ppt.pptxCSE dns ppt.pptx
CSE dns ppt.pptx
 
Introduction
IntroductionIntroduction
Introduction
 
Domain Name System ppt
Domain Name System pptDomain Name System ppt
Domain Name System ppt
 
Domain Name System(ppt)
Domain Name System(ppt)Domain Name System(ppt)
Domain Name System(ppt)
 
Hands-on DNSSEC Deployment
Hands-on DNSSEC DeploymentHands-on DNSSEC Deployment
Hands-on DNSSEC Deployment
 
Lec 11(DNs)
Lec 11(DNs)Lec 11(DNs)
Lec 11(DNs)
 
DNS-overview.pptx
DNS-overview.pptxDNS-overview.pptx
DNS-overview.pptx
 
Chap 17 dns
Chap 17 dnsChap 17 dns
Chap 17 dns
 
Curso: Redes y comunicaciones I: 07 Redes
Curso: Redes y comunicaciones I: 07 RedesCurso: Redes y comunicaciones I: 07 Redes
Curso: Redes y comunicaciones I: 07 Redes
 
Dns
DnsDns
Dns
 
Dns2
Dns2Dns2
Dns2
 
Common Network Services
Common Network ServicesCommon Network Services
Common Network Services
 
DNS.pptx
DNS.pptxDNS.pptx
DNS.pptx
 
DNS : The internet’s directory service
DNS : The internet’s directory serviceDNS : The internet’s directory service
DNS : The internet’s directory service
 
Dns protocol design attacks and security
Dns protocol design attacks and securityDns protocol design attacks and security
Dns protocol design attacks and security
 
DNS – Domain Name Service
DNS – Domain Name ServiceDNS – Domain Name Service
DNS – Domain Name Service
 
DNS
DNSDNS
DNS
 
DNS Presentation
DNS PresentationDNS Presentation
DNS Presentation
 
The Application Layer
The Application LayerThe Application Layer
The Application Layer
 

More from Vivek Gautam

More from Vivek Gautam (7)

Cloud computing
Cloud computingCloud computing
Cloud computing
 
Demonetisation
DemonetisationDemonetisation
Demonetisation
 
Hospital management
Hospital managementHospital management
Hospital management
 
4G
4G4G
4G
 
Android PPT
Android PPTAndroid PPT
Android PPT
 
Big Data ppt
Big Data pptBig Data ppt
Big Data ppt
 
presentation on ANDROID by VIVEK GAUTAM
presentation on ANDROID by VIVEK GAUTAMpresentation on ANDROID by VIVEK GAUTAM
presentation on ANDROID by VIVEK GAUTAM
 

Recently uploaded

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Recently uploaded (20)

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

Domain name system

  • 2.
  • 3. 3 1. What is the IP address of udel.edu ? Introduction 1. What is the host name of 128.175.13.74 It is 128.175.13.92 It is strauss.udel.edu
  • 4. 4 Real Life Analogy: Telephone Example Source: Child Newark, DE Destination: Dad Udel-Newark, DE Telephone connection Information Child Needs: Dad’s Phone #
  • 5. 5 Dials 302-731-1212: (What is University # ?) operator 2 Dials 0: (what is Newark’s area code?) 3 (Newark’s area code is 302) Directory assist 45 (University number: 302-831- 4567) University operator 6 Dials 302-831-4567: (what is Dad phone #?) 7 Dad’s phone is 302-831-1949 Calls dad (What is Dad’s Phone#?) 1 Older sister Child Dad’s phone is 302-831-1949 8
  • 6. 6 DNS Components There are 3 components: • Name Space: Specifications for a structured name space and data associated with the names • Resolvers: Client programs that extract information from Name Servers. • Name Servers: Server programs which hold information about the structure and the names.
  • 8. 8 Resolvers A Resolver maps a name to an address and vice versa. Query Response Resolver Name Server
  • 9. 9 iterative response (referral) “I don't know. Try a3.nstld.com.” 2 a3.nstl d.com 3 Iterative Resolution client iterative request “What is the IP address of www.google.com?” udel server 1 iterative response (referral) “I don't know. Try a.root-servers.net.” 4 a.root server 5 iterative response (referral) “I don't know. Try a.gtld-servers.net.” 6 a.gtld- server 7 iterative response (referral) “I don't know. Try ns1.google.com.” 8 ns1.goo gle.com 9 iterative response “The IP address of www.google.com is 216.239.37.99.”10
  • 10. 10 Recursive Resolution client recursive request “What is the IP address of www.google.com?” udel serve r 1 edu server 2 root server 3 com server 4 google server 5 recursive response “The IP address of www.google.com is 216.239.37.99.” 6 10 7 8 9
  • 11. 11 Master serverZone transfer Zone data file From disk Authoritative Data (primary master and slave zones) Agent (looks up queries on behalf of resolvers) Cache Data (responses from other name servers) Name Server Process Name Server Architecture:
  • 12. 12 Resolver Query Response Authoritative Data (primary master and slave zones) Agent (looks up queries on behalf of resolvers) Cache Data (responses from other name servers) Name Server Process Authoritative Data: Name Server (cont’d)
  • 13. 13 Arbitrary name server Response Resolver Query Query Authoritative Data (primary master and slave zones) Agent (looks up queries on behalf of resolvers) Cache Data (responses from other name servers) Name Server Process Response Using Other Name Servers: Name Server (cont’d)
  • 14. 14 Cached Data : Query Response Authoritative Data (primary master and slave zones) Agent (looks up queries on behalf of resolvers) Cache Data (responses from other name servers) Name Server Process Resolver Name Server (cont’d)
  • 17. 17 DNS Message Format Header (12 bytes) Question section Header (12 bytes) Question section Answer section Authoritative section Additional section Identification Flags 2 bytes 2 bytes Number of Question Records Number of Answer Records (zeroed in query) Number of Auth- oritative Records (Zeroed in query) Number of Additional Records (zeroed in query) 0 = query, 1 = response 0 = standard, 1 = inverse, 2 = server status request Authoritative Answer flag Truncated flag Recursion Desired flag Recursion Available flag QR OpCode AA TC RD RA 0 0 0 rCode no error format error problem at name server domain reference problem query type not supported administratively prohibited reserved 0 1 2 3 4 5 6-15
  • 18. 18 Question Record Format class of network (1 = Internet) 12 5 2 1 Address – IPv4 Name Server (authoritative) Canonical Name (alias) Pointer – reverse lookup 15 Mail Exchange 28 Address - IPv6 252 Zone Transfer PTR CNAME NS A MX AAAA AXFR 3 r e n 5 e e c i s 4 u d e l 3 e d u 0 counts sent in query; repeated in response Query type (16 bits) Query name (variable length) Query class (16 bits)
  • 19. 19 Resource Record Format answer, authoritative, and additional sections in response Resource data (variable length) Domain type (16 bits) Domain Name (variable length) Domain class (16 bits) Time to Live (32 bits) data length (16 bits) name of host/domain that this record provides information for type of data in resource record (same types as used in question record) number of seconds this record may be cached length of resource data the “payload” of the resource record same as in question record
  • 20. 20 Compression 3 r e n 5 e e 4 u d e l 3 e d u 0 c i s bytes 0-11 Query type (16 bits) Query Class (16 bits) Domain Name (variable length) Header (12 bytes) Query name (variable length) Question Section Answer Section byte 12 C0 0C 1100000000001100 = 1210
  • 21. 21 Example forward query/response ident 0x0100 0x0001 0x0000 0x0000 0x0000 3 'w' 'w' 'w' 4 'u' 'd' 'e' 'l' 3 'e' 'd' 'u' 0 0x0001(IN) 0x0001(A) flags: recursion desired (RD) “What is the IP address of www.udel.edu?” Hdr Qry 3 'w' 'w' 'w' 4 'u' 'd' 'e' 'l' 3 'e' 'd' 'u' 0 0x0004 same ident 0x8180 0x0001 0x0001 0x0004 0x0004 0x0001(IN) 0x0001(A) 0xC00C 0x0001(A) 0x0001(IN) 0x80AF0D3F (128.175.13.63) ...0xB2F5 ... flags: query response (QR), recursion desired (RD), recursion available (RA) 0x0000... TTL: 45301 seconds ≈ 12.6 hours “www.udel.edu's IP address is 128.175.13.63.” Hdr Qry Ans
  • 22. 22 Example inverse query/response ident 0x0100 0x0001 0x0000 0x0000 0x0000 0x000C(PTR) 0x0001(IN) 2 '6' '3' 2 '1' '3' 3 '1' '7' '5' 3 '1' '2' '8' 7 'i' 'n' '-' 'a' 'd' 'd' 'r' 4 'a' 'r' 'p' 'a' 0 “What is the name of the host at 128.175.13.63?” Hdr Qr y 3 'w' 'w' 'w' 4 'u' 'd' 'e' 'l' 3 'e' 'd' 'u' 0 same ident 0x8180 0x0001 0x0001 0x0004 0x0004 0x000C(PTR) 0x0001(IN) ...0xB003 0x0000... 2 '6' '3' 2 '1' '3' 3 '1' '7' '5' 3 '1' '2' '8' 7 'i' 'n' '-' 'a' 'd' 'd' 'r' 4 'a' 'r' 'p' 'a' 0 0x000C(PTR) 0x0001(IN) 0x000E 0xC00C ... “The host at 128.175.13.63 is named www.udel.edu.” Hdr Qry Ans TTL: 45056 seconds ≈ 12.5 hours
  • 23. 23 Resource Record Sections • Resource Record sections: – answer = record(s) sent in response to query(s). – authoritative = DNS servers which are authoritative for answer record(s). – additional = any other related information. • MX records: – mail exchange (MX) records provide mail addressing info. – MX query asks “What hosts will accept mail for domain X?” – MX resource records say “You can send mail for domain X to host Y.” delivery priority (lower value = higher priority)preference (2 bytes) exchange (variable length) domain name of host that will accept mail MX Resource Data
  • 24. 24 0x000A 7 'c' 'o' 'p' 'l' 'a' 'n' 'd' 0xC00C ident 0x8180 0x0001 0x0002 0x0004 0x0006 0x0001(IN) 0x000F(MX) 0x0001... 4 'u' 'd' 'e' 'l' 3 'e' 'd' 'u' 0 0x000F(MX) 0xC00C 0x000F(MX) 0x0001(IN) 0xC00C 0x000C 0x0014 7 's' 't' 'r' 'a' 'u' 's' 's' 0xC00C 0x000C 0x0001(IN) 0x0001... ...0x28F6 ...0x28F6 ... Hdr Qry Ans Ans 4 'D' 'N' 'S' '1' 0xC00C 0xC00C 0x0002(NS) 0x0001(IN) 0x0000... 4 'D' 'N' 'S' '2' 0XC00C ...0x19FA 0xC028 0x0001(A) 0x0001(IN) 0x0001... 0x0002(NS) 0x0001(IN) 0x0000... 0x0007 0xC00C 128.175.13.74 ...0x2FB4 0x0004 0xC040 0x0001(A) 0x0001(IN) 0x0001... ...0x0D5D 0x0004 ...0x19FA 0x0007 128.175.13.92 ... ... ... Auth Auth Adtl Adtl Example MX response
  • 25. 25 Transport IP header UDP header DNS message max. 512 bytes no limit (up to max. TCP payload size) IP header TCP header DNS message 2-byte DNS msg. length ● DNS messages are encapsulated in UDP by default. ● If the resolver expects the response to exceed 512 bytes, the resolver encapsulates the query in TCP instead. ● If a request is sent over UDP and the response is longer than 512 bytes, the server sends the first 512 bytes of the response using UDP and sets the TC (truncated) flag. The resolver then re-sends the query using TCP.
  • 26. 26 Dynamic DNS Client DHCP Server Primary DNS Server Zone File IP Address? IP Address Update