dns domain name system
play

DNS : Domain Name System Surasak Sanguanpong nguan@ku.ac.th - PDF document

1/30 DNS : Domain Name System Surasak Sanguanpong nguan@ku.ac.th http://www.cpe.ku.ac.th/~nguan Last updated: May 24, 1999 Applied Network Research Group Department of Computer Engineering, Kasetsart University


  1. 1/30 DNS : Domain Name System Surasak Sanguanpong nguan@ku.ac.th http://www.cpe.ku.ac.th/~nguan Last updated: May 24, 1999 Applied Network Research Group Department of Computer Engineering, Kasetsart University 2/30 Outline � DNS basic � name space � name resolution process � protocol � configurations Applied Network Research Group Department of Computer Engineering, Kasetsart University

  2. 3/30 Why need DNS? � host table /etc/hosts compiled from HOST.TXT (maintain by SRI NIC) � simple text file with has IP address to name mapping � problems � traffic and load � name collision � consistency � A hierarchical name with distributed control is needed Applied Network Research Group Department of Computer Engineering, Kasetsart University 4/30 DNS basic � DNS is a distributed database � TCP/IP applications use DNS to � map hostname to IP address � map IP address to hostname � provide e-mail routing information � mail nguan@cpe.ku.ac.th => mail.cpe.ku.ac.th � handle aliases � www.eng.ku.ac.th is actually is1.eng.ku.ac.th Applied Network Research Group Department of Computer Engineering, Kasetsart University

  3. 5/30 Naming Scheme cc.cpe.ku.ac.th building tree th cc.cpe.ku.ac.th from top to bottom ac more specific ku � name space is a tree of domain cpe � names are case-insensitive cc cc.cpe.ku.ac.th Applied Network Research Group Department of Computer Engineering, Kasetsart University 6/30 Domain Name Space root gov mil net org au th arpa com edu int ac usu in-addr ku tu cc cc.usu.edu cpe eng cc cc.cpe.ku.ac.th generic domains country domains arpa domains Applied Network Research Group Department of Computer Engineering, Kasetsart University

  4. 7/30 DNS Management managed by NIC root managed by th Internic Thailand com � NIC manages root ac or and top level domain name � local admins manage ku tu 3rd level or more cpe eng manage by tu managed by ku Applied Network Research Group Department of Computer Engineering, Kasetsart University 8/30 Domain Name Concept label label every node has a label (except root) th domain name domain name the list of labels, starting at that node, working up to the root, using a “.” to separate ac e.g. ku.ac.th, cpe.ku.ac.th ku absolute domain name absolute domain name domain name that ends with a period e.g. cc.cpe.ku.ac.th. cpe relative domain name cc relative domain name name to be completed e.g. cc Applied Network Research Group Department of Computer Engineering, Kasetsart University

  5. 9/30 Domains domain domain subtree of the domain name space th ac.th domain ac ku tu ku.ac.th domain cpe eng cc cc.cpe.ku.ac.th node Applied Network Research Group Department of Computer Engineering, Kasetsart University 10/30 Domains and Zones � Zone is a subtree for which naming authority has been delegated ku.ac.th domain ku.ac.th domain ku.ac.th zone ku.ac.th zone ku ku ee ee sci sci eng eng rdi rdi lib kps kps cpe cpe lib case 1 : single DNS administration case 2 : cpe and eng have authority for their zones Applied Network Research Group Department of Computer Engineering, Kasetsart University

  6. 11/30 Name Servers � Name server : Server that store information about the zone ns.eng.ku.ac.th ns.ku.ac.th responsibility for eng.ku.ac.th zone ku ee responsibility for sci eng rdi ku.ac.th zone lib ns.cpe.ku.ac.th kps cpe responsibility for cpe.ku.ac.th zone Applied Network Research Group Department of Computer Engineering, Kasetsart University 12/30 Type of Name Servers Primary Name server gets the data for zones from files � on the host it runs on Secondary Name server gets its zone data from the � primary for redundancy and workload distribution ns.eng.ku.ac.th : primary ns.ku.ac.th : primary ns2.eng.ku.ac.th : secondary ku nontri.ku.ac.th: ee secondary ns.cpe.ku.ac.th: sci eng rdi primary lib kps cpe cc.cpe.ku.ac.th: secondary Applied Network Research Group Department of Computer Engineering, Kasetsart University

  7. 13/30 Zone Transfer Secondary Name Server pulls zone data over from the � primary called zone transfer. ns.eng.ku.ac.th primary for eng.ku.ac.th ns.ku.ac.th secondary for ku.ac.th primary for ku.ac.th secondary for cpe.ku.ac.th secondary for cpe.ku.ac.th ns2.eng.ku.ac.th secondary for eng.ku.ac.th nontri.ku.ac.th secondary for ku.ac.th secondary for cpe.ku.ac.th ns.cpe.ku.ac.th primary for cpe.ku.ac.th cc.cpe.ku.ac.th secondary for ku.ac.th secondary for eng.ku.ac.th secondary for cpe.ku.ac.th Applied Network Research Group Department of Computer Engineering, Kasetsart University 14/30 Root Name Server name server must contact other name servers for non � local IP it has to know IP address of the top most server � called root name server root name server - provide the names and address of � the name server authoritative for top level domain name I have to connect root, when I don’t have more info root ns.ku.ac.th Applied Network Research Group Department of Computer Engineering, Kasetsart University

  8. 15/30 Root Name Server (cont.) � 13 root servers are currently available in Internet (Last updated Aug 97) A.ROOT-SERVERS.NET 198.41.0.4 H.ROOT-SERVERS.NET 128.63.2.53 B.ROOT-SERVERS.NET 128.9.0.107 I.ROOT-SERVERS.NET 192.36.148.17 C.ROOT-SERVERS.NET 192.33.4.12 J.ROOT-SERVERS.NET 198.41.0.10 D.ROOT-SERVERS.NET 128.8.10.90 K.ROOT-SERVERS.NET 193.0.14.129 E.ROOT-SERVERS.NET 192.203.230.10 L.ROOT-SERVERS.NET 198.32.64.12 F.ROOT-SERVERS.NET 192.5.5.241 M.ROOT-SERVERS.NET 202.12.27.33 G.ROOT-SERVERS.NET 192.112.36.4 ftp://ftp.rs.internic.net/domain/named.root Applied Network Research Group Department of Computer Engineering, Kasetsart University 16/30 Name Resolution Process address of www.ku.ac.th ? name server root name server ask th name servers address of www.ku.ac.th ? th th name server ask ac.th name servers address of www.ku.ac.th ? ac or ac.th name server ask ku.ac.th name server address of www.ku.ac.th ? ku.ac.th name server ku tu ask ns.ku.ac.th name server address of www.ku.ac.th ? ns.ku.ac.th name server www address is 158.108.2.69 address is 158.108.2.69 resolver address of www.ku.ac.th ? Applied Network Research Group Department of Computer Engineering, Kasetsart University

  9. 17/30 Reverse Resolution root au th arpa in-addr.arpa domain � in reverse direction of IP address ac in-addr ku tu 0 255 158 255 0 cpe eng 108 0 255 34 cc 0 255 cc.cpe.ku.ac.th 3 3.34.108.158.in-addr.arpa Applied Network Research Group Department of Computer Engineering, Kasetsart University 18/30 Caching � all name servers employ a cache to reduce the DNS traffic � standard UNIX keep cache in name server with time-out � cache data is non-authoritative Applied Network Research Group Department of Computer Engineering, Kasetsart University

  10. 19/30 DNS message format (I) 0 15 16 31 identification:16 flags:16 number of questions :16 number of answer RRs:16 fixed header number of authority RRs :16 number of additional RRs:16 = = 1 or more questions query = = 1 or more answers = = reply 1 or more authority = = 1 or more additional information � fixed 12 byte header with 4 variable length fields � DNS message format is defined for both queries and answers Applied Network Research Group Department of Computer Engineering, Kasetsart University 20/30 DNS message format (II) 0 15 16 31 identification:16 flags:16 identification:16 flags:16 � set by the client and return by the server � lets the client match responses to requests Applied Network Research Group Department of Computer Engineering, Kasetsart University

Recommend


More recommend