Скачать презентацию CISC 856 TCP IP and Upper Layer Protocols RFC Скачать презентацию CISC 856 TCP IP and Upper Layer Protocols RFC

c6854c73928f3c1306e35e01233049eb.ppt

  • Количество слайдов: 27

CISC 856 TCP/IP and Upper Layer Protocols RFC 1034 & RFC 1035 Presented by CISC 856 TCP/IP and Upper Layer Protocols RFC 1034 & RFC 1035 Presented by Neeta Jain

Introduction 1. What is the IP address of udel. edu ? It is 128. 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

Real Life Analogy: Telephone Example Telephone connection Source: Child Newark, DE Destination: Dad Udel-Newark, Real Life Analogy: Telephone Example Telephone connection Source: Child Newark, DE Destination: Dad Udel-Newark, DE Information Child Needs: Dad’s Phone # 3

Calls dad Child 1 Dad’s phone is (What is Dad’s Phone#? ) 302 -831 Calls dad Child 1 Dad’s phone is (What is Dad’s Phone#? ) 302 -831 -1949 8 Dials 0: (what is Newark’s area code? ) Dad’s phone is 302 -831 -1949 7 2 University operator Older sister operator 3 Dials 302 -831 -4567: 6 (Newark’s area code is 302) (what is Dad phone #? ) (University number: 302 -8314567) 5 Directory assist 4 Dials 302 -731 -1212: (What is University # ? ) 4

DNS Components There are 3 components: • Name Space: Specifications for a structured name 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. 5

Name Space 6 Name Space 6

Resolvers A Resolver maps a name to an address and vice versa. Query Response Resolvers A Resolver maps a name to an address and vice versa. Query Response Resolver Name Server 7

Iterative Resolution a. root server a 3. nstl d. com udel server a. gtldserver Iterative Resolution a. root server a 3. nstl d. com udel server a. gtldserver 5 ns 1. 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) “I don't know. Try a 3. nstld. com. ” 2 4 “I don't know. Try ns 1. 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 server 2 com 3 8 7 4 Recursive Resolution root server edu server udel server 2 com 3 8 7 4 server 6 5 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. ” 9

Name Server Architecture: Name Server Process Authoritative Data (primary master and slave zones) From 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 (cont’d) Authoritative Data: Name Server Process Authoritative Data (primary master and slave Name Server (cont’d) 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 (cont’d) Using Other Name Servers: Name Server Process Authoritative Data (primary master Name Server (cont’d) 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 Query Arbitrary name server Query Resolver 12

Name Server (cont’d) Cached Data : Name Server Process Authoritative Data (primary master and Name Server (cont’d) Cached 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 13

Block Diagram Query User Program Query Resolver Response Foreign Name Server Reference Addition Cache Block Diagram Query User Program Query Resolver Response Foreign Name Server Reference Addition Cache 14

DNS Messages Query Response 15 DNS Messages Query Response 15

DNS Message Format Header (12 bytes) Question section 2 bytes Identification Number of Question DNS Message Format Header (12 bytes) Question section 2 bytes Identification Number of Question Records Number of Answer Records (zeroed in query) Number of Authoritative Records (Zeroed in query) Number of Additional Records (zeroed in query) 0 = query, 1 = response QR Answer section 2 bytes Flags Op. Code AA TC RD RA 0 0 = standard, 1 = inverse, Authoritative 2 = server status request Answer flag Truncated flag 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 r. Code Recursion Available flag 16 Recursion Desired flag

Question Record Format sent in query; repeated in response Query name class of network Question Record Format sent in query; repeated in response Query name class of network (1 = Internet) (variable length) Query type (16 bits) 3 r Query class (16 bits) e n 5 e e 1 A 2 NS 5 CNAME PTR 12 15 MX 28 AAAA 252 AXFR c i Address – IPv 4 Name Server (authoritative) Canonical Name (alias) Pointer – reverse lookup Mail Exchange Address - IPv 6 Zone Transfer s 4 u d e counts l 3 e d u 0 17

Resource Record Format answer, authoritative, and additional sections in response Domain Name (variable length) Resource Record Format answer, authoritative, and additional sections in response Domain Name (variable length) Domain type 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) 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 Question Section Header (12 bytes) Query name (variable length) Query Compression bytes 0 -11 Question Section Header (12 bytes) Query name (variable length) Query type (16 bits) 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 C 0 0 C 11000001100 = 1210 19

Example forward query/response Hdr “What is the IP address of www. udel. edu? ” Example forward query/response Hdr “What is the IP address of www. udel. edu? ” ident 0 x 0100 0 x 0001 0 x 0000 Qry 3 'w' 4 'u' 'l' 3 'u' 0 0 x 0001(IN) 0 x 0000 'w' 'd' 'e' 'd' 0 x 0001(A) flags: recursion desired (RD) flags: query response (QR), recursion desired (RD), recursion available (RA) TTL: 45301 seconds ≈ 12. 6 hours “www. udel. edu's IP address is 128. 175. 13. 63. ” same ident 0 x 8180 Hdr 0 x 0001 0 x 0004 3 'w' 'w' Qry 4 'u' 'd' 'e' 'l' 3 'e' 'd' 'u' 0 0 x 0001(A) 0 x 0001(IN) 0 x. C 00 C 0 x 0001(A) Ans 0 x 0001(IN) 0 x 0000. . . 0 x 0004. . . 0 x. B 2 F 5 0 x 80 AF 0 D 3 F (128. 175. 13. 63) 20. . .

Example inverse query/response Hdr Qry “What is the name of the host at 128. Example inverse query/response Hdr Qry “What is the name of the host at 128. 175. 13. 63? ” ident 0 x 0100 0 x 0001 0 x 0000 2 '1' '7' '2' 'n' 'd' 'r' '6' '3' '5' '8' '-' 'r' 'p' 0 x 0000 '3' 3 3 7 'a' 4 'a' 2 '1' 'i' 'd' 'a' 0 0 x 000 C(PTR) 0 x 0001(IN) “The host at 128. 175. 13. 63 is named www. udel. edu. ” same ident 0 x 8180 0 x 0001 0 x 0004 '6' '3' 2 Qry '3' 3 '1' '5' 3 '1' '8' 7 'i' '-' 'a' 'd' 'r' 4 'a' 'p' 'a' 0 0 x 000 C(PTR) 0 x 0001(IN) 0 x 000 C(PTR) Ans 0 x. C 00 C 2 '1' '7' '2' 'n' 'd' 'r' 0 x 0001(IN). . . 0 x. B 003 TTL: 45056 seconds ≈ 12. 5 hours Hdr 3 4 'l' 'u' 'w' 'u' 3 0 0 x 0000. . . 0 x 000 E 'w' 'd' 'e' . . . 'w' 'e' 'd' 21

Resource Record Sections • Resource Record sections: – answer = record(s) sent in response 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. ” MX Resource Data preference (2 bytes) exchange (variable length) delivery priority (lower value = higher priority) domain name of host that will accept mail 22

Example MX response Hdr Qry ident 0 x 0001 0 x 0004 4 'l' Example MX response Hdr Qry ident 0 x 0001 0 x 0004 4 'l' 'u' 0 x 8180 0 x 0002 0 x 0006 'u' 'd' 'e' 3 'e' 'd' 0 0 x 000 F(MX) 0 x 0001(IN) Ans 0 x. C 00 C 0 x 000 F(MX) 0 x 0001(IN) 0 x 0001. . . 0 x 000 C. . . 0 x 28 F 6 0 x 000 A 'o' 'p' 'n' 'd' Ans 7 'c' 'l' 'a' 0 x. C 00 C 0 x 0014 't' 'r' 's' 7 's' 'a' 'u' 0 x. C 00 C 0 x 000 F(MX) 0 x 0001(IN) 0 x 0001. . . 0 x 000 C. . . 0 x 28 F 6 . . . 0 x. C 00 C 0 x 0002(NS) Auth 0 x 0001(IN) 0 x 0000. . . 0 x 0007. . . 0 x 19 FA 4 '1' 'D' 'N' 0 x. C 00 C 'S' 4 '2' 'D' 'N' 0 XC 00 C 'S' 0 x. C 00 C 0 x 0002(NS) Auth 0 x 0001(IN) 0 x 0000. . . 0 x 0007. . . 0 x 19 FA. . . 0 x. C 028 0 x 0001(A) Adtl 0 x 0001(IN) 0 x 0001. . . 0 x 0004. . . 0 x 2 FB 4 128. 175. 13. 74 0 x. C 040 0 x 0001(A) Adtl 0 x 0001(IN) 0 x 0001. . . 0 x 0004 23. . . 0 x 0 D 5 D 128. 175. 13. 92. . .

Transport IP header UDP header DNS message max. 512 bytes ● ● ● DNS 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 2 -byte DNS msg. length DNS message 24

Dynamic DNS IP A ? s res d d DHCP Server s res d Dynamic DNS IP A ? s res d d DHCP Server s res d Ad P Update I Client Zone File Primary DNS Server 25

Acknowledgements Many thanks to : • Behrouz A. Forouzan http: //www. mhhe. com/engcs/compsci/forouzan/tcpipppt. mhtml Acknowledgements Many thanks to : • Behrouz A. Forouzan http: //www. mhhe. com/engcs/compsci/forouzan/tcpipppt. mhtml • David Conrad www. itu. int/osg/spu/enum/workshopjan 01/annex 2 -conrad. ppt • Greg Forte http: //www. cis. udel. edu/~amer/856/dns. 03 f. ppt 26

Questions 27 Questions 27