1 / 130

Presented by Neeta Jain

Learn about the components of the DNS system and the process of resolving domain names to IP addresses. Understand how resolvers, name servers, and recursive resolution work together.

aalvarez
Download Presentation

Presented by Neeta Jain

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DOMAIN NAME SYSTEM RFC 1034 & RFC 1035 Presented by Neeta Jain

  2. 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 Itis strauss.udel.edu

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

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

  5. 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.

  6. Name Space

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

  8. a.root server a3.nstld.com a.gtld- server 5 udel server ns1.google.com 7 iterative response (referral) “I don't know. Try a.root-servers.net.” 3 iterative response (referral) “I don't know. Try a.gtld-servers.net.” 9 iterative response (referral) “I don't know. Try a3.nstld.com.” 1 iterative response (referral) “I don't know. Try ns1.google.com.” 2 4 6 iterative response “The IP address of www.google.com is 216.239.37.99.” 8 10 client iterative request “What is the IP address of www.google.com?” IterativeResolution

  9. root server edu server com server 3 4 7 udel server google server 8 2 5 6 9 1 recursive request “What is the IP address of www.google.com?” 10 recursive response “The IP address of www.google.com is 216.239.37.99.” client Recursive Resolution

  10. Name Server Name Server Process Zone data file Authoritative Data (primary master and slave zones) Master server Cache Data (responses from other name servers) Agent (looks up queries on behalf of resolvers) Architecture: From disk Zone transfer

  11. Name Server (cont’d) 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) Resolver Authoritative Data: Response Query

  12. Name Server (cont’d) Name Server Process Authoritative Data (primary master and slave zones) Cache Data (responses from other name servers) Arbitrary name server Agent (looks up queries on behalf of resolvers) Resolver Using Other NameServers: Response Response Query Query

  13. Name Server (cont’d) 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) Resolver Cached Data : Response Query

  14. BlockDiagram Query Query Foreign Name Server User Program Resolver Response Response Reference Addition Cache

  15. DNS Messages Messages Query Response

  16. Header (12 bytes) Header (12 bytes) Question section Question section Answer section 2 bytes 2 bytes Identification Flags Authoritative section Number of Question Records Number of Answer Records (zeroed in query) Additional section 0 no error 1 format error Number of Auth- oritative Records (Zeroed in query) Number of Additional Records (zeroed in query) 2 problem at name server 3 domain reference problem 4 query type not supported administratively prohibited 5 6-15 reserved QR OpCode AA TC RD RA 0 0 0 rCode DNS Message Format 0 = query, 1 = response Recursion Available flag 0 = standard, 1 = inverse, 2 = server status request Authoritative Answer flag Recursion Desired flag Truncated flag

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

  18. Domain Name (variable length) Domain type (16 bits) Domain class (16 bits) Time to Live (32 bits) Resource data (variable length) data length (16 bits) Resource Record Format answer, authoritative, and additional sections in response 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

  19. Header(12 bytes) Query name (variable length) c i s 3 r e n 5 e e Query type (16 bits) Query Class (16 bits) 4 u d e l 3 e d u 0 Domain Name (variable length) C0 0C Compression bytes 0-11 byte 12 Question Section Answer Section 1100000000001100 = 1210

  20. “www.udel.edu's IP address is 128.175.13.63.” “What is the IP address of www.udel.edu?” same ident 0x8180 ident 0x0100 Hdr Hdr 0x0001 0x0001 0x0001 0x0000 0x0004 0x0004 0x0000 0x0000 Qry Qry 3 'w' 'w' 'w' 4 'u' 'd' 'e' 'l' 3 'e' 'd' 'u' 0 3 'w' 'w' 'w' 4 'u' 'd' 'e' 'l' 3 'e' 'd' 'u' 0 0x0001(A) 0x0001(A) 0x0001(IN) 0x0001(IN) 0x0001(A) 0xC00C Ans flags: recursion desired (RD) 0x0000... 0x0001(IN) flags: query response (QR), recursion desired (RD), recursion available (RA) 0x0004 ...0xB2F5 0x80AF0D3F (128.175.13.63) TTL: 45301 seconds ≈ 12.6 hours ... Example forward query/response

  21. “What is the name of the host at 128.175.13.63?” “The host at 128.175.13.63 is named www.udel.edu.” 0x0100 same ident 0x8180 Hdr ident Hdr 0x0001 0x0000 0x0001 0x0001 0x0000 0x0000 0x0004 0x0004 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 Qry Qry 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) 0x000C(PTR) 0x0001(IN) 0x000C(PTR) 0xC00C Ans 0x0001(IN) 0x0000... ...0xB003 0x000E 3 'w' 'w' 'w' 4 'u' 'd' 'e' 'l' 3 'e' 'd' 'u' 0 TTL: 45056 seconds ≈ 12.5 hours ... Example inverse query/response

  22. MX Resource Data preference (2 bytes) delivery priority (lower value = higher priority) exchange (variable length) domain name of host that will accept mail 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.”

  23. Example MX response ... ident 0x8180 Hdr 0x0002(NS) 0xC00C Auth 0x0001 0x0002 0x0001(IN) 0x0000... 0x0004 0x0006 ...0x19FA 0x0007 4 'u' 'd' 'e' 'l' 3 'e' 'd' 'u' 0 Qry 4 'D' 'N' 'S' '1' 0xC00C 0x000F(MX) 0x0002(NS) 0xC00C Auth 0x0001(IN) 0x0001(IN) 0x0000... 0xC00C 0x000F(MX) Ans ...0x19FA 0x0007 0x0001... 0x0001(IN) 4 'D' 'N' 'S' '2' 0XC00C ...0x28F6 0x000C 0x000A 7 'c' 'o' 'p' 'l' 'a' 'n' 'd' 0xC00C ... 0xC028 0x0001(A) Adtl 0x0001(IN) 0x0001... 0xC00C 0x000F(MX) Ans ...0x2FB4 0x0004 0x0001(IN) 0x0001... 128.175.13.74 ...0x28F6 0x000C 0xC040 0x0001(A) Adtl 0x0014 7 's' 't' 'r' 'a' 'u' 's' 's' 0xC00C 0x0001(IN) 0x0001... ...0x0D5D 0x0004 128.175.13.92 ... ...

  24. 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 Transport • 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.

  25. Dynamic DNS IP Address? DHCP Server Update IP Address Client Zone File PrimaryDNS Server

  26. HTTP: the hypertext transfer protocol Skills: none IT concepts: protocol, the RFC process, communication protocol layers, application layer This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

  27. HTTP vs HTML • HTML: hypertext markup language • Definitions of tags that are added to Web documents to control their appearance • HTTP: hypertext transfer protocol • The rules governing the conversation between a Web client and a Web server Both were invented at the same time by the same person

  28. What is a protocol? • In diplomatic circles, a protocol is the set of rules governing a conversation between people • We have seen that the client and server carry on a machine-to-machine conversation • A network protocol is the set of rules governing a conversation between a client and a server • There are many protocols, HTTP is just one

  29. I would like to open a connection GET <file location> Display response Close connection OK Send page or error message OK An HTTP conversation Client Server HTTP is the set of rules governing the format and content of the conversation between a Web client and server

  30. An HTTP example The message requesting a Web page must begin with the work “GET” and be followed by a space and the location of a file on the server, like this: GET /fac/lpress/shortbio.htm The protocol spells out the exact message format, so any Web client can retrieve pages from any Web server.

  31. Network protocols • The details are only important to developers. • The rules are defined by the inventor of the protocol – may be a group or a single person. • The rules must be precise and complete so programmers can write programs that work with other programs. • The rules are often published as an RFC along with running client and server programs. • The HTTP protocol used for Web applications was invented by Tim Berners Lee. RFC = request for comments

  32. Tim Berners-Lee Tim Berners-Lee was knighted by Queen Elizabeth for his invention of the World Wide Web. He is shown here, along with the first picture posted on the Web and a screen shot from an early version of his Web browser.

  33. HTTP is an application layer protocol • The Web client and the Web server are application programs • Application layer programs do useful work like retrieving Web pages, sending and receiving email or transferring files • Lower layers take care of the communication details • The client and server send messages and data without knowing anything about the communication network

  34. The application layer is boss – the top layer • Your boss says: Send this package to Miami -- I don't care if you use Federal Express, UPS, or any other means. Also, let me know when it arrives or if it cannot be delivered for some reason. • The application program says:Send this request to the server -- I don't care how you do it or whether it goes over phone lines, radio, or anything else about the details. Just send the message, and let me know when it arrives or if it cannot be delivered for some reason. There are five TCP/IP layers, the application layer and four lower layers.

  35. Many application layer protocols are used on the Internet, HTTP is only one

  36. The TCP/IP protocol layers The application program is king – it gets work done using the lower level layers for communication between the client and server. Get useful work done – retrieve Web pages, copy files, send and receive email, etc. Make client-server connections and optionally control transmission speed, check for errors, etc. Route packets between networks Route data packets within the local area network Specify what medium connects two nodes, how binary ones and zeros are differentiated, etc,

  37. Food for thought • What would happen if a Web client was poorly programmed and instead of sending a message beginning with “GET” it sent a message beginning with “QET?”

  38. SMTP – Simple Mail Transfer Protocol

  39. Overview Introduction to SMTP and Email Message Breakdown Sample Messages Extensions (MIME) MTA’s and Mailbox Protocols

  40. 1st – What is SMTP? The de facto standard for e-mail transmissions across the Internet It is defined in RFC 821 It is a relatively simple, text-based protocol Not entirely secure thus vulnerable to SPAM

  41. SMTP • Originated in 1982 (rfc0821, Jon Postel) • Goal: To transfer mail reliably and efficiently

  42. SMTP • SMTP clients and servers have two main components • User Agents – Prepares the message, encloses it in an envelope. (Eudora for example) • Mail Transfer Agent(MTA) – Transfers the mail across the internet User Agent Mail Transfer Agents

  43. SMTP • SMTP also allows the use of Relays allowing other MTAs to relay the mail

  44. What is Mail? • Mail is a text file • Envelope – • sender address • receiver address • other information • Message – • Mail Header – defines the sender, the receiver, the subject of the message, and some other information • Mail Body – Contains the actual information in the message

  45. Post Office Mailbox Return-Path: <Jwatson@cis.udel.edu>Delivered-To: jwatson@cis.udel.edu Received: by mail.eecis.udel.edu (Postfix, from userid 62) id 17FBD328DE; Wed, 5 Nov 2003 11:27:02 Received: from mail.acad.ece.udel.edu (devil-rays.acad.ece.udel.edu [128.4.60.10]) by mail.eecis.udel.edu (Postfix) with ESMTP id 5F41832893 for <Jwatson@cis.udel.edu>; Wed, 5 Nov 2003 11:27:01 Received: by mail.acad.ece.udel.edu (Postfix, from userid 62)id 47509456C; Wed, 5 Nov 2003 11:27:01 Received: from stimpy.eecis.udel.edu(stimpy.eecis.udel.edu [128.4.40.17])by mail.acad.ece.udel.edu (Postfix) with SMTP id 7C2943D79 for <Jwatson@cis.udel.edu>; Wed, 5 Nov 2003 11:26:34 Message-Id: <20031105162634.7C2943D79@mail.acad.ece.udel.edu>Date: Wed, 5 Nov 2003 11:26:34 From: Jwatson@cis.udel.eduTo: undisclosed-recipients: ;MIME-Version: 1.0This is a test. Post office and mail route Receivers Mailbox

  46. How SMTP works The Essentials How about a Demo?

  47. Status Codes The Server responds with a 3 digit code that may be followed by text info 2## - Success 3## - Command can be accepted with more information 4## - Command was rejected, but error condition is temporary 5## - Command rejected, Bad User!

  48. Status Codes 211 System status, or system help reply . 214 Help message. 220 <domain> Service ready. 221 <domain> Service closing transmission channel. 250 Requested mail action okay, completed. 251 User not local; will forward to <forward-path>. 354 Start mail input; end with <CRLF>.<CRLF>. 421 <domain> Service not available, closing transmission channel. [This may be a reply to any command if the service knows it must shut down]. 450 Requested mail action not taken: mailbox unavailable. 451 Requested action aborted: local error in processing 452 Requested action not taken: insufficient system storage.

  49. Status Codes 500 Syntax error, command unrecognized. [This may include errors such as command line too long] 501 Syntax error in parameters or arguments. 502 Command not implemented. 503 Bad sequence of commands. 504 Command parameter not implemented. 550 Requested action not taken: mailbox unavailable. 551 User not local; please try <forward-path>. 552 Requested mail action aborted: exceeded storage allocation. 553 Requested action not taken: mailbox name not allowed. [E.g., mailbox syntax incorrect] 554 Transaction failed.

  50. Connection Establishment TCP Connection Establishment

More Related