Lec 6 Domain Name System

Objectives

In this page we look into Domain Name System (DNS) and brief information on the following related to DNS:

Domain Name System (DNS)

DNS is a global service that converts or resolves host names to IP addresses. DNS is an application-layer protocol that allows hosts to query the hierarchical distributed database. The DNS protocol runs over UDP and uses port 53.

It is a mechanism for

  • querying and updating the DNS database

  • replicating the information across DNS database servers

DNS Name Space

Upside-down tree structure. A web host is regarded by hostname and domain, separated by dots, e.g.www.uts.edu.au

Root Domain (null): represented by “” or .

Top Level Domains (TLD) (First Level)

    • Generic: .org, . gov, .com, .edu , and now .biz, .info, .tv, etc

    • Country code: e.g., .au, .uk , .us, .md, nz , etc

    • ICANN selects organizations to manage TLD

Second Level domains (and further)

  • 2nd level domain (edu.au & ns.edu. au)

    • 3rd level domain (uts.edu.au & ns.uts.edu.au)

      • 4th level domain (it.uts.edu.au & ns.it.uts.edu.au)

DNS Slaves and aching

The Distributed database includes master & slave servers - slaves update off master (zone xfer). Distributed database performs queries too (hierarchical)


Roughly defined terminology:

Primary (Master) DNS: Required, authoritative server

Secondary (Slave) DNS:

  • Optional, to improve performance

  • periodically downloads a zone file from a master DNS server

  • slave can then answer authoritative queries about that zone

Caching - only DNS

  • caching to improve performance

  • Normally used by ISP

  • Time To Live (TTL) before it has to download the data again


How Does DNS Works?

Clients access libraries called resolver to perform DNS queries. DNS query can be iterative or recursive.

Iterative: Server points client to a different DNS server

Recursive: Server responds with destination IP address or an error message

Figure 1 above shows:

  1. The host cis.poly.edu first sends a DNS query message to its local DNS server, dns.poly.edu. The query message contains the hostname to be translated, namely, gaia.cs.umass.edu.


  1. The local DNS server forwards the query message to a root DNS server.


  1. The root DNS server takes note of the edu suffix and returns to the local DNS server a list of IP addresses for TLD servers responsible for edu.


  1. The local DNS server then resends the query message to one of these TLD servers.


  1. The TLD server takes note of the umass.edu suffix and responds with the IP address of the authoritative DNS server for the University of Massachusetts, namely, dns.umass.edu.


  1. The local DNS server resends the query message directly to dns.umass.edu


  1. The authoritative DNS server responds to the local DNS server with the IP address of gaia.cs.umass.edu.


  1. Finally, the local DNS server returns back to the host with the IP address of gaia.cs.umass.edu

Note that in this example, in order to obtain the mapping for one hostname, eight DNS messages were sent: four query messages and four reply messages!


Figure 2 shows a DNS query chain for which all of the queries are recursive.

DNS Binding

BIND is one implementation of a DNS server


DNS Client

The DNS client sends a query containing the hostname to a DNS server. For instance, a DNS client to determine the IP address for the hostname www.cisco.com would send a query to its local DNS server first.