1 / 38

Domain Name System

Domain Name System. IP assigns 32-bit addresses to hosts (interfaces) Binary addresses easy for computers to manage All applications use IP addresses through the TCP/IP protocol software Difficult for humans to remember: % telnet 134.82.11.70

yagil
Download Presentation

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. Domain Name System • IP assigns 32-bit addresses to hosts (interfaces) • Binary addresses easy for computers to manage • All applications use IP addresses through the TCP/IP protocol software • Difficult for humans to remember: % telnet 134.82.11.70 • The Domain Name System (DNS) provides translation between symbolic names and IP addresses • DNS serves listen on UDP port 53 and TCP port 53. For short requests and replies UDP is used. TCP is used for ZONE transfer.

  2. Domain names and IP addresses • People prefer to use easy-to-remember names instead of IP addresses • Domain names are alphanumeric names for IP addresses e.g., neon.ece.utoronto.ca, www.google.com, ietf.org • The domain name system (DNS) is an Internet-wide distributed database that translates between domain names and IP addresses • How important is DNS? Imagine what happens when the local DNS server is down.

  3. Before there was DNS …. …. there was the HOSTS.TXT file • Before DNS (until 1985), the name-to-IP address was done by downloading a single file (hosts.txt) from a central server with FTP. • Names in hosts.txt are not structured. • The hosts.txt file still works on most operating systems. It can be used to define local names.

  4. DNS Services • Hostname to IP Address mapping • Inverse Mapping: IP Address to Hostname mapping • Mail Domain to Mail Server mapping; needed for mail delivery by mail servers • Host aliasing; Mail Domain aliasing • Canonical (real) and alias names • Load distribution • Replicate a heavily accessed web site (e.g. “www.cnn.com”) to multiple web servers (i.e. different hosts with different IP addresses) • Associate “www.cnn.com” with the IP addresses of web servers

  5. Structure of DNS names • Each name consists of a sequence of alphanumeric components separated by periods • Examples: www.eg.bucknell.edu www.netbook.cs.purdue.edu charcoal.eg.bucknell.edu • Names are hierarchical, with most-significant component on the right • Left-most component is computer name • Local name server, root name server, authoritative name server

  6. a NSI Herndon, VA c PSInet Herndon, VA d U Maryland College Park, MD g DISA Vienna, VA h ARL Aberdeen, MD j NSI (TBD) Herndon, VA k RIPE London i NORDUnet Stockholm m WIDE Tokyo e NASA Mt View, CA f Internet Software C. Palo Alto, CA b USC-ISI Marina del Rey, CA l ICANN Marina del Rey, CA Domain Name Tree Root Server 13 root name servers worldwide, according to www.dnso.org 2002

  7. Design principle of DNS • The naming system on which DNS is based is a hierarchical and logical tree structure called the domain namespace. • An organization obtains authority for parts of the name space, and can add additional layers of the hierarchy • Domain Names are assigned independent of geographic locations or IP addresses. However, in practice, allocation of domain names generally follows the allocation of IP address, e.g., • All hosts with network prefix 128.143/16 have domain name suffix virginia.edu • All hosts on network 128.143.136/24 are in the Computer Science Department of the University of Virginia

  8. Top-level domains • Three types of top-level domains: • Organizational: 3-character code indicates the function of the organization • Used primarily within the US • Examples: gov, mil, edu, org, com, net • Geographical: 2-character country or region code • Examples: us, va, jp, de • Reverse domains: A special domain (in-addr.arpa) used for IP address-to-name mapping

  9. gTLDs versus ccTLDs • gTLDS (generic TLDs) were originally meant to be US-centric. Nowadays, only mil and govTLDs are for US. • ccTLDs (countrycode TLDs) used for organizations in other countries: • Countries define their own internal hierarchy: ac.uk and .edu.au are used for academic organizations in the United Kingdom and Australia. In SA, it is edu.sa.

  10. DNS naming structure • Top level domains (rightmost components; also known as TLDs) defined by global authority com Commercial organization edu Educational institution gov Government organization mil Military organization • Organizations apply for names under a top-level domain: kfupm.edu macdonalds.com • Organizations determine their own internal structure ccse.kfupm.edu cs.purdue.edu

  11. Domain names within an organization • Organizations can create any internal DNS hierarchy • Uniqueness of TLD and organization name guarantee uniqueness of any internal name (much like file names in your directories) • All but the left-most component of a domain name is called the domain for that name: • Authority for creating new subdomains is delegated to each domain • Administrator of kfupm.edu has authority to create ri.kfupm.edu and need not contact any central naming authority • DNS domains are logical concepts and need not correspond to physical location of organizations • DNS domain for an organization can span multiple networks

  12. DNS and client-server computing • DNS names are managed by a hierarchy of DNS servers • There could be multiple ways of dividing up DNS name space • Root server at top of tree knows about next level servers. • Next level servers, in turn, know about lower level servers • Each DNS server is the authoritative server for the names it manages • What a server is responsible for or has authority over is called a zone. A domain can span multiple servers. • Primary server is also called authoritative server • Second server has a copy

  13. Root DNS Servers TLD Servers ca DNS servers edu DNS servers com DNS servers usask.ca DNS servers poly.edu DNS servers ucalgary.ca DNS servers amazon.com DNS servers umass.edu DNS servers yahoo.com DNS servers Distributed, Hierarchical Database Root servers and TLD servers typically do not contain hostname to IP mappings; they contain mappings for locating authoritative servers.

  14. Root name servers • The root name servers know how to find the authoritative name servers for all top-level zones. • There are only 13 root name servers • Root servers are critical for the proper functioning of name resolution

  15. Addresses of root servers A.ROOT-SERVERS.EDU. (formerly NS.INTERNIC.NET) 10.0.2.32 A.ROOT-SERVERS.NET. (formerly NS1.ISI.EDU) 198.41.0.4 B.ROOT-SERVERS.NET. (formerly C.PSI.NET) 128.9.0.107 C.ROOT-SERVERS.NET. (TERP.UMD.EDU) 192.33.4.12 D.ROOT-SERVERS.NET. (NS.NASA.GOV) 128.8.10.90 E.ROOT-SERVERS.NET. (NS.ISC.ORG) 192.203.23 F.ROOT-SERVERS.NET. (NS.NIC.DDN.MIL) 192.5.5.241 G.ROOT-SERVERS.NET. (AOS.ARL.ARMY.MIL) 192.112.36.4 H.ROOT-SERVERS.NET. (NIC.NORDU.NET) 128.63.2.53 I.ROOT-SERVERS.NET. (at NSI (InterNIC)) 192.36.148.17 J.ROOT-SERVERS.NET. (operated by RIPE NCC) 198.41.0.10 K.ROOT-SERVERS.NET. (at ISI (IANA)) 193.0.14.129 L.ROOT-SERVERS.NET. (operated by WIDE, Japan) 198.32.64 M.ROOT-SERVERS.NET. 202.12.27.33

  16. TLD and Authoritative Servers • Top-level domain (TLD) servers: responsible for com, org, net, edu, etc, and all top-level country domains like: uk, fr, ca, jp. • Network solutions maintains servers for COM TLD • Educause for EDU TLD • Authoritative DNS servers: organization’s DNS servers, providing authoritative hostname to IP mappings for organization’s servers (e.g., Web and mail). • Can be maintained by organization or service provider

  17. Local Name Server • Each ISP (residential ISP, company, university) has one. • Also called “default name server” • When a host makes a DNS query, query is sent to its local DNS server • Acts as a proxy, forwards query into hierarchy. • Reduces lookup latency for commonly searched hostnames

  18. An application program on a host accesses the domain system through a DNS client, called the resolver Resolver contacts DNS server, called name server DNS server returns IP address to resolver which passes the IP address to application Reverse lookups are also possible, i.e., find the hostname given an IP address Resolver and name server

  19. DNS hierarchy can be represented by a tree Root and top-level domains are administered by an Internet central name registration authority (ICANN) Below top-level domain, administration of name space is delegated to organizations Each organization can delegate further Managed by UofT Managed by ECE Dept. DNS Name hierarchy

  20. Domain name system • Each node in the DNS tree represents a domain (or a domain name) • Each branch below a node is a DNS domain. • DNS domain can contain hosts or other domains (subdomains) • Example: DNS domains are . (root domain), edu, virginia.edu, cs.virginia.edu

  21. Domain names • Hosts and DNS domains are named based on their position in the domain tree • Every node in the DNS domain tree can be identified by a unique Fully Qualified Domain Name (FQDN). The FQDN gives the position in the DNS tree. • A FQDN consists of labels (“cs”,“virginia”,”edu”) separated by a period (“.”) • There can be a period (“.”) at the end. • Each label can be up to 63 characters long • FQDN may contain letters, numerals, and dash character (“-”) • FQDNs are not case-sensitive

  22. Hierarchy of name servers • The resolution of the hierarchical name space is done by a hierarchy of name servers • Each server is responsible (authoritative) for a contiguous portion of the DNS namespace, called a zone. • Zone is a part of the subtree • DNS server answers queries about hosts in its zone

  23. Authority and delegation • Authority for the root domain is with the Internet Corporation for Assigned Numbers and Names (ICANN) • ICANN delegates to accredited registrars (for gTLDs) and countries for country code top level domains (ccTLDs) • Authority can be delegated further • Chain of delegation can be obtained by reading domain name from right to left. • Unit of delegation is a “zone”.

  24. DNS domain and zones • Each zone is anchored at a specific domain node, but zones are not domains. • A DNS domain is a branch of the namespace • A zone is a portion of the DNS namespace generally stored in a file (It could consists of multiple nodes) • A server can divide part of its zone and delegate it to other servers

  25. Primary and secondary name servers • For each zone, there must be a primary name server and a secondary name server • The primary server (master server) maintains a zone file which has information about the zone. Updates are made to the primary server • The secondary server copies data stored at the primary server. Adding a host: • When a new host is added (“gold.cs.virginia.edu”) to a zone, the administrator adds the IP information on the host (IP address and name) to a configuration file on the primary server

  26. Domain name resolution • User program issues a request for the IP address of a hostname • Local resolver formulates a DNS query to the name server of the host • Name server checks if it is authorized to answer the query. • If yes, it responds. • Otherwise, it will query other name servers, starting at the root tree • When the name server has the answer it sends it to the resolver.

  27. DNS server architecture • All DNS servers are linked together to form a unified system. Each server keeps a set of NS (Name Server) Resource Records that identify root servers and servers for child domains. • Small organizations can use a single “primary” server • Easy to administer • Inexpensive • Large organizations often use multiple servers • Reliability through redundancy • Improved response time through load-sharing • Delegation of naming authority • Locality of reference applies - users will most often look up names of computers within same organization

  28. Recursive and Iterative Queries • There are two types of queries: • Recursive queries • Iterative (non-recursive) queries • The type of query is determined by a bit in the DNS query • Recursive query: When the contacted Name Server cannot resolve a query, the server becomes a DNS client, issues a query, wait for reply and pass reply back to requestor • Iterative queries: When the contacted Name Server cannot resolve a query, it replies to the requestor with the IP address/name of another Name Server

  29. host surf.eurecom.fr wants IP address of www.umass.edu 1. contacts its local DNS server, dns.eurecom.fr 2.dns.eurecom.fr contacts root name server, if necessary 3. root name server eventually contacts authoritative name server, dns.cs.umass.edu, if necessary This is called “Recursive Resolution” local name server dns.eurecom.fr edu name server A.GTLD-SERVERS.NET. Name Resolution root name server A.ROOT-SERVERS.NET. 6 2 3 7 5 4 1 8 authoritative name server dns.umass.edu requesting host surf.eurecom.fr www.umass.edu

  30. recursive query: puts burden of name resolution on contacted name server heavy load? iterated query: contacted server replies with name of server to contact “I don’t know this name, but ask the following server(s)” Gives more control to client local name server dns.eurecom.fr edu name server A.GTLD-SERVERS.NET. Types of Queries root name server iterated query 2 3 4 7 5 6 1 8 authoritative name server dns.cs.umass.edu requesting host surf.eurecom.fr gaia.cs.umass.edu

  31. contacted by local name servers that can not resolve query (mapping) Root Name Server: contacts authoritative name server if mapping not known gets mapping returns mapping to local name server DNS: Root Name Servers

  32. A DNS server stores DNS info. in a DNS database (act. a simple txt file): A set of records known as Resource Records (RRs) Type=NS* name is some domain name (e.g. foo.com) value is hostname of authoritative name serverfor the domain RR format: (class, name, type, value, TTL); class value set to “IN” for Internet DNS Resource Records (RRs) • Type=CNAME • name is alias name for some “canonical” (the real) name www.ibm.com is really servereast.backup2.ibm.com • value is canonical name • Type=A • name is hostname • value is IP address • Type=MX* • name is a mail domain • value is hostname of mail server responsible for mail domain *Note: IP addresses associated with the relevant hostnames are entered as A records

  33. DNS Resource Records (RRs): continued • Type=SOA • Start of Authority Record. The SOA is the first record in entered in the zone’s file • name is domain name for this zone • value(MNAME, RNAME, SERIAL, REFRESH , RETRY, Min. TTL); the Serial field acts as a time stamp that is cahnged whenever the zone’s file is modified. This filed is regularly checked by secondary to tell if a zone transfer is needed. • Type= PTR • used to resolve IP-address to hostname queries • name is IP address (e.g. 1.2.3.196.in-addr.arpa.) • value is hostname

  34. DNS protocol :queryand reply messages, both with same message format DNS protocol, messages msg header • identification: 16 bit # for query, reply to query uses same # • flags: • query or reply • recursion desired • recursion available • reply is authoritative

  35. DNS protocol, messages Name, type fields for a query RRs in response to query NS records for authoritative servers additional “helpful” info that may be used

  36. Becoming Part of DNS • Example: just created startup “Network Utopia” • Register name networkutopia.com at a Registrar (e.g., Network Solutions) • Need to provide Registrar with names and IP addresses of your authoritative name servers (primary and secondary) • Registrar inserts two RRs into the COM TLD server: (networkutopia.com, NS, dns1.networkutopia.com) (dns1.networkutopia.com, A, 200.200.200.1) • Network Utopia adds it own RRs as part of the configuration of its DNS server (dns1.networkutopia.com), for example: • Type A record for www.networkuptopia.com • Type MX record for networkutopia.com

  37. Measures to Improve Performance of DNS • DNS resolution can be very inefficient • Every host referenced by name triggers a DNS request • Every DNS request for the address of a host in a different organization goes through the root server • Caching: Name Servers and hosts use caching of DNS replies to reduce the need to issue further DNS requests • Cache is a list of recently resolved names and IP addresses • A DNS reply (i.e. RR) is kept in Cache for no more than the time set by the TTL (time-to-live) field • Replication of Name Servers • There are 13 root name servers • Every zone maintains at least two name servers (primary and secondary)

  38. (DDNS) Dynamic Domain name System • When a new node is added/deleted authoritative DNS server is updated accordingly. • When a new domain is added, update message is sent to upper servers • Servers query other servers periodically for latest changes • update/notify mechanisms under design by IETF • RFC 2136 • http://www.ietf.org/html.charters/dnsind-charter.html

More Related