Академический Документы
Профессиональный Документы
Культура Документы
Protocols
Presented by
Neeta Jain
Introduction
1. What is
the IP address
of udel.edu ?
It is
128.175.13.92
1. What is
the host name
of
128.175.13.74
It is
strauss.udel.edu
2
Telephone connection
Source:
Child
Destination:
Dad
Newark, DE
Udel-Newark,
DE
Information Child Needs: Dads Phone #
3
Calls dad
Child
1
Dads phone is
302-831-1949
Dials 0: (what is
Newarks area code?)
Dads phone is
302-831-1949
University
operator
Older sister
operator
3
Dials 302-831-4567:
5
Directory
assist
Dials 302-731-1212:
(What is University # ?)
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.
Name Space
Resolve
rs
A Resolver maps a name to an address and
vice versa.
Query
Response
Resolver
Name Server
Iterative
Resolution
a.root
server
a3.nstl
d.com
udel
server
a.gtldserver
ns1.goo
gle.com
7
3 iterative response (referral)
I don't know. Try a.root-servers.net.
iterative response (referral)
9
I don't know. Try a.gtld-servers.net.
1 iterative response (referral)
iterative response (referral)
I don't know. Try a3.nstld.com.
2 4
I don't know. Try ns1.google.com.
6
iterative response
8
The IP address of www.google.com
is 216.239.37.99.
client 10
iterative request
What is the IP address of
8
www.google.com?
Recursive
Resolution
root
server
edu
server
udel
serve
r
com
3
8
server
google
server
9
1
10
client
recursive request
What is the IP address of
www.google.com?
recursive response
The IP address of www.google.com is
216.239.37.99.
Name
Server
Architecture:
Name Server Process
Authoritative Data
(primary master and
slave zones)
From
disk
Zone
data
file
Zone transfer
Master
server
Cache Data
(responses from
other name servers)
Agent
(looks up queries
on behalf of resolvers)
10
Name Server
(contd)
Authoritative
Data:
Name Server Process
Authoritative Data
(primary master and
slave zones)
Response
Cache Data
(responses from
other name servers)
Agent
(looks up queries
on behalf of resolvers)
Query
Resolver
11
Name Server
(contd)
Using Other Name
Servers:
Name Server Process
Authoritative Data
(primary master and
slave zones)
Cache Data
(responses from
other name servers)
Agent
(looks up queries
on behalf of resolvers)
Response
Response
Query
Arbitrary
name
server
Query
Resolver
12
Name Server
(contd)
Cached
Data :
Response
Cache Data
(responses from
other name servers)
Agent
(looks up queries
on behalf of resolvers)
Query
Resolver
13
Block
Diagram
Query
User
Program
Query
Resolver
Response
Response
Foreign
Name
Server
Reference
Addition
Cache
14
DNS
Messages
Messages
Query
Response
15
DNS Message
Format
Header (12 bytes)
Question section
Question section
2 bytes
Identification
Number of
Question Records
Number of
Answer Records
(zeroed in query)
Number of
Additional Records
(zeroed in query)
0 = query,
1 = response QR
Answer section
2 bytes
Flags
OpCode
AA TC RD RA 0
Authoritative section
Additional section
0
1
2
3
4
5
6-15
0
no error
format error
problem at name server
domain reference problem
query type not supported
administratively prohibited
reserved
0
rCode
Recursion Available
flag
16
Recursion Desired flag
Question Record
Format
sent in query;
repeated in response
Query name
(variable length)
Query type
(16 bits)
Query class
(16 bits)
e n 5 e
e c
1
A
2
NS
5 CNAME
PTR
12
15
MX
28 AAAA
252 AXFR
Address IPv4
Name Server (authoritative)
Canonical Name (alias)
Pointer reverse lookup
Mail Exchange
Address - IPv6
Zone Transfer
s 4 u d e
counts
3 e d u 0
17
Resource Record
Format
answer, authoritative, and
additional sections in response
Domain Name
(variable length)
Domain type Domain class
(16 bits)
(16 bits)
Time to Live
(32 bits)
data length
(16 bits)
Resource data
(variable length)
18
Compression
bytes 0-11
Question
Section
Query Class
(16 bits)
Domain Name
Answer
Section
byte 12
(variable length)
3 r e n 5 e e c i s
4 u d e l 3 e d u 0
C0 0C
1100000000001100 = 1210
19
Example forward
query/response
What is the IP address
of www.udel.edu?
Hdr
0x0100
0x0001
0x0000
0x0000
0x0000
Qry 3
'w' 'w' 'w'
4
'u' 'd' 'e'
'l'
3
'e' 'd'
'u'
0 0x0001(A)
0x0001(IN)
ident
www.udel.edu's IP address
is 128.175.13.63.
same ident
0x8180
Hdr
0x0001
0x0001
0x0004
0x0004
3
'w' 'w' 'w' Qry
4
'u' 'd' 'e'
'l'
3
'e' 'd'
'u'
0 0x0001(A)
0x0001(IN)
0xC00C 0x0001(A) Ans
0x0001(IN) 0x0000...
...0xB2F5
0x0004
0x80AF0D3F
(128.175.13.63)
20
...
Example inverse
query/response
Hdr
Qr
y
0x0001
0x0000
2
'1'
'7'
'2'
'n'
'd'
'r'
'6'
'3'
'5'
'8'
'-'
'r'
'p'
0x0000
0x0000
'3'
3
3
7
'a'
4
'a'
2
'1'
'1'
'i'
'd'
'a'
0
0x000C(PTR) 0x0001(IN)
0x0001
0x0004
0x0001
0x0004
Qry
'6'
'3'
2
'3'
3
'1'
'5'
3
'1'
'8'
7
'i'
'-'
'a'
'd'
'r'
4
'a'
'p'
'a'
0
0x000C(PTR) 0x0001(IN)
0x000C(PTR) Ans
0xC00C
2
'1'
'7'
'2'
'n'
'd'
'r'
0x0001(IN)
...0xB003
Hdr
3
4
'l'
'u'
'w'
'u'
3
0
0x0000...
0x000E
'w'
'd'
'e'
...
'w'
'e'
'd'
21
Resource Record
Sections
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.
MX Resource Data
preference (2 bytes)
exchange
(variable length)
Example MX
response
Hdr
Qry
ident
0x0001
0x0004
4
'l'
'u'
0x8180
0x0002
0x0006
0x0001(IN)
Ans 0xC00C 0x000F(MX)
0x0001(IN) 0x0001...
0x000C
...0x28F6
Ans
0x000A
'o' 'p'
'n' 'd'
7
'c'
'l' 'a'
0xC00C
0x0014
't' 'r'
's' 's'
7
's'
'a' 'u'
0xC00C
0xC00C 0x000F(MX)
0x0001(IN) 0x0001...
...0x28F6
0x000C
...
...
'D' 'N'
0xC00C
'S'
4
'2'
'D' 'N'
0XC00C
'S'
0xC028
0x0001(A) Adtl
0x0001(IN) 0x0001...
...0x2FB4
0x0004
128.175.13.74
0xC040
0x0001(A) Adtl
0x0001(IN) 0x0001...
0x0004 23
...0x0D5D
128.175.13.92
...
Transport
IP
header
UDP
header
DNS message
max. 512 bytes
IP
header
TCP
header
2-byte
DNS msg.
length
DNS message
24
Dynamic
DNS
?
IP ress
d
Ad
DHCP
Server
Update
s
IP dres
Ad
Client
Zone File
Primary DNS Server
25
Acknowledgeme
nts
Many thanks to :
Behrouz A. Forouzan
http://www.mhhe.com/engcs/compsci/forouzan/tcpipppt.mhtml
David Conrad
www.itu.int/osg/spu/enum/workshopjan01/annex2-conrad.ppt
Greg Forte
http://www.cis.udel.edu/~amer/856/dns.03f.ppt
26
Questions
27