Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Introduction
1. What is the IP address of udel.edu ? It is 128.175.13.92
Telephone connection
8
7 University operator
Dials 302-831-4567: (what is Dad phone #?) Dads phone is 302-831-1949
2 Older sister 3
(Newarks area code is 302)
operator
6
(University number: 302-8314567)
5 Directory assist
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
Resolvers
Query Response
Resolver
Name Server
Iterative Resolution
a.root server a3.nstl d.com
a.gtldserver
5 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?
udel server
ns1.goo gle.com
Recursive Resolution
root server edu server udel serve r 2 8 6 5 3 7 4 com
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) Cache Data (responses from other name servers) Agent (looks up queries on behalf of resolvers)
10
From disk
Master server
Response
Query
11
Response
Response Arbitrary name server Query Resolver
Query
12
Response
Query
13
Block Diagram
Query
Query
User Program
Response Addition
Resolver
Response Reference
Cache
14
DNS Messages
Messages
Query
Response
15
OpCode
AA TC RD RA 0
0 = standard, 1 = inverse, Authoritative 2 = server status request Answer flag Truncated flag
Query name
(variable length) Query type (16 bits) Query class (16 bits)
class of network (1 = Internet) 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
e n 5 e
s 4 u d e
3 e d u 0
17
counts
Domain Name
(variable length) Domain type Domain class (16 bits) (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) same as in question record number of seconds this record may be cached length of resource data the payload of the resource record
Resource data
(variable length)
18
Compression
bytes 0-11
Query name
(variable length) Query type (16 bits) Query Class (16 bits)
byte 12
3 r e n 5 e e c i s 4 u d e l 3 e d u 0 C0 0C
1100000000001100 = 1210
Domain Name
Answer Section (variable length)
19
Hdr
Hdr
flags: recursion desired (RD) flags: query response (QR), recursion desired (RD), recursion available (RA) TTL: 45301 seconds 12.6 hours
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... 0x0004 ...0xB2F5 0x80AF0D3F (128.175.13.63) 20 ...
Hdr
0x0001 0x0000
2 '1' '7' '2' 'n' 'd' 'r'
0x0000 0x0000
2 '1' '1' 'i' 'd' 'a' 0
0x0001 0x0004
0x0001 0x0004
Hdr
Qr y
0x000C(PTR) 0x0001(IN)
'6' '3' 2 Qry '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
0x0001(IN) ...0xB003
3 4 'l' 'u' 'w' 'u' 3 0
0x0000... 0x000E
...
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
Example MX response
Hdr ident 0x0001 0x0004 0x8180 0x0002 0x0006
...
Qry
4 'l' 'u'
'S'
Ans
...
0xC028 0x0001(A) Adtl 0x0001(IN) 0x0001... 0x0004 ...0x2FB4 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
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. no limit (up to max. TCP payload size)
IP header
TCP header
DNS message
24
Dynamic DNS
Client
Zone File Primary DNS Server
25
Acknowledgements
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