1 / 26

DNS - The Domain Name System

DNS - The Domain Name System. Sirak Kaewjamnong Computer Network Systems. Outline. DNS basic name space resolver protocol configuration. Why need DNS?. host table /etc/hosts simple text file with has IP address to name mapping problems name collision consistency

denver
Download Presentation

DNS - The Domain Name System

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. DNS - The Domain Name System Sirak Kaewjamnong Computer Network Systems

  2. Outline • DNS basic • name space • resolver • protocol • configuration

  3. Why need DNS? • host table /etc/hosts • simple text file with has IP address to name mapping • problems • name collision • consistency • A hierarchical name with distributed control is needed

  4. 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 ksirak@ratree.psu.ac.th => ratree.psu.ac.th • handle aliases • www.cs.psu.ac.th is actually www2.cs.psu.ac.th

  5. th ac psu Naming Scheme www.cs.psu.ac.th building tree from top to bottom • name space is a tree of domain • names are case-insensitive more specific cs www www.cs.psu.ac.th

  6. th gov org mil net au edu int com arpa ac usu in-addr psu ku Domain Name Space root cc cc.usu.edu cs eng www www.cs.psu.ac.th generic domains country domains

  7. root th com ac or psu ku cs eng DNS Management managed by ICANN • ICANN manages root and top level domain name • local admins manage 3rd level or more managed by thnic Thailand manage by ku managed by psu

  8. th ac psu cs Domain Name Concept label every node has a label (except root) domain name the list of labels, starting at that node, working up to the root, using a “.” to separate psu.ac.th, cs.psu.ac.th domain name that ends with a period absolute domain name www.cs.psu.ac.th. www name to be completed relative domain name www

  9. th ac psu ku Domains domain subtree of the domain name space ac.th domain psu.ac.th domain cs eng www www.cs.psu.ac.th node

  10. psu psu eng eng sci sci pn pn clib mgt cs clib Domains and Zones • Zone is a subtree for which naming authority has been delegated psu.ac.th domain psu.ac.th domain psu.ac.th zone psu.ac.th zone cc cc mgt cs case 1 : single DNS administration case 2 : cs and cc have authority for their zones

  11. psu eng sci pn clib mgt Name Servers • Name server : Server that store information about the zone ns.cc.psu.ac.th ns.psu.ac.th responsibility for cc.psu.ac.th zone cc responsibility for psu.ac.th zone ns.cs.psu.ac.th cs responsibility for Cs.psu.ac.th zone

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

  13. 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 secondary for ku.ac.th secondary for cpe.ku.ac.th ns.ku.ac.th primary for 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 forku.ac.th secondary for cpe.ku.ac.th ns.cpe.ku.ac.th primary for cpe.ku.ac.th secondary for ku.ac.th secondary for eng.ku.ac.th cc2.cpe.ku.ac.th secondary for cpe.ku.ac.th

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

  15. Root Name Server • 13 root servers are currently available in Internet A.ROOT-SERVERS.NET 198.41.0.4 B.ROOT-SERVERS.NET 128.9.0.107 C.ROOT-SERVERS.NET 192.33.4.12 D.ROOT-SERVERS.NET 128.8.10.90 E.ROOT-SERVERS.NET 192.203.230.10 F.ROOT-SERVERS.NET 192.5.5.241 G.ROOT-SERVERS.NET 192.112.36.4 H.ROOT-SERVERS.NET 128.63.2.53 I.ROOT-SERVERS.NET 192.36.148.17 J.ROOT-SERVERS.NET 198.41.0.10 K.ROOT-SERVERS.NET 193.0.14.129 L.ROOT-SERVERS.NET 198.32.64.12 M.ROOT-SERVERS.NET 202.12.27.33 http://www.icann.org/committees/dns-root/y2k-statement.htm

  16. th ac or ku psu Name Resolution Process address of www.psu.ac.th? name server root name server ask th name servers address of www.psu.ac.th? th name server ask ac.th name servers address of www.psu.ac.th? ac.th name server ask psu.ac.th name server address of www.psu.ac.th? psu.ac.th name server ask ns.psu.ac.th name server address of www.psu.ac.th? ns.psu.ac.th name server www address is 192.168.100.61 address is 192.168.100.61 resolver address of www.psu.ac.th?

  17. th au arpa ac in-addr psu ku www cs Reverse Resolution root • in-addr.arpa domainin reverse directionof IP address 0 255 192 255 0 168 255 0 100 0 255 www. psu.ac.th 61 61.100.168.192.in-addr.arpa

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

  19. DNS message format • fixed 12 byte header with 4 variable length fields • DNS message format is defined for both queries and answers 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 = = 1 or more authority reply = = 1 or more additional information

  20. DNS message format: detail 0 15 16 31 • set by the client and return by the server • lets the client match responses to requests Identification : 16 Flags : 16

  21. DNS message format: detail identification:16 flags:16 QR opcode AA TC RD RA (zero) rcode 1 4 1 1 1 1 3 4 QR 0= query, 1= response opcode 0= standard query, 1=inverse query, 2=server status request AA 0= authoritatived answer,1 = non authoritatived answer TC 1= truncated. using UDP, reply was>512 bytes, return only 512 bytes RD 1= recursive desired, 0= iterative RA 1= recursion available (server support recursion) rcode return code : 0=no error, 3=name error

  22. DNS message format: detail questions :32 query name • query classnormally =1 meaning Internet address query type query class • query name is the name being lookup • sequence of label begins with 1-byte count 3www2cs3psu2ac2th0 A 1 IP address • query type indicates desired response NS 2 name server CNAME 5 canonical name PTR 12 pointer record HINFO 13 host info MX 15 mail exchange record

  23. DNS message format: detail these three fields share a common resource record (RR) = = 1 or more answers 1 or more authority 1 or more additional information = = reply = = = = domain name type class time-to-live resource data resource length = = • domain name : corresp. response name, (query name format) • type : response RR type code (see query type) • time-to-live : cache life time of RR (often 86400=1 day) • resource length : specify the size of resource data • resource data : the answer, e.g. IP address or other type

  24. Operation • use port 53 • typically UDP request and reply • if answer is too big, use TCP ip hdr UDP hdr DNS hdr query answer#1 answer#2

  25. Resolves file • resolver must have address for local name server • /etc/resolv.conf on UNIX /etc/resolv.conf #domain domain cs.psu.ac.th #list of name server 192.100.77.5 192.100.77.2

  26. Setting up DNS • BIND (Berkeley Internet Name Domain) package • /usr/somewhere/in.named - BSD named DNS server • /etc/named.boot - named configuration (tell named where to find database files)

More Related