ELEC3506

Topics

Application LayerLecture 8 PDF15 min

DNS

How the Domain Name System maps names to IP addresses using an inverted-tree name space and a hierarchy of distributed name servers, and how iterative and recursive resolution differ.

By the end of this page you should be able to

  • State what DNS does and why it is not a single central database
  • Describe the domain name space, including labels and how a domain name is read
  • Name the roles of root, TLD, local and authoritative name servers
  • Distinguish iterative from recursive resolution and say who does the work in each
  • Trace the lecture's example of engineering.nyu.edu resolving gaia.cs.umass.edu

The idea

Networks route by IP address. People remember names. Something has to turn yahoo.com into an address before any packet can be sent, and it has to do that for the whole Internet, quickly, without one machine holding every answer.

DNS does it by splitting the job in the same shape as the names themselves. A name is made of parts, and each part is looked after by a different group of servers. A query walks down that structure until it reaches the server that knows.

How it works

The problem and the definition

TCP/IP protocols use an IP address to uniquely identify the connection of a host. People prefer names, for example yahoo.com. The Domain Name System (DNS) is an application-layer protocol that allows hosts and name servers to communicate to resolve address and name translation.

How it works

Domain name space

The name space is hierarchical, so each name is made of several parts. Names are defined in an inverted-tree structure with the root at the top. Each node has a label and a domain name.

  • A label is a string with a maximum of 63 characters.
  • A domain name is a sequence of labels separated by dots, read from the node up to the root.

How it works

Domains and the hierarchy of name servers

A domain is a subtree of the domain name space. The information held in the name space is distributed among many computers called DNS servers. The servers form a hierarchy in the same way the names do, with top level domain (TLD) servers and local servers on the slide.

The lecture asks why DNS is not centralised, and answers in five reasons: a single point of failure, traffic volume, a distant centralised database, maintenance, and that it does not scale. No server has all the name-to-IP mappings.

ServerRole in the lecture
Root serverTop of the hierarchy. Information about authoritative servers is added to the root servers when a domain is registered.
TLD serverTop level domain server, one level below the root.
Local name serverEach ISP or organisation has a default local name server. A host DNS query goes to it first.
Authoritative name serverConfigured by an administrator with the hostname information for a particular domain.
The slide gives local and authoritative servers a definition. Root and TLD servers appear in the diagrams and the registration note.

How it works

Name-address resolution

Resolution is mapping a name to an address. There are two styles.

  • Recursive resolution: the DNS server that does not know the mapping makes queries to other DNS servers on behalf of the client. The slide gives its voice as “I don’t know this name, but I will find it out for you.”
  • Iterative resolution: the DNS server that does not know the mapping sends the address of the next server back to the one that requested it. Its voice is “I don’t know this name, but you may ask this server.”

How it works

Iterated query, the lecture's example

A host at engineering.nyu.edu wants the IP address for gaia.cs.umass.edu. Its local DNS server is dns.nyu.edu and the authoritative server for the target is dns.cs.umass.edu. The slide numbers the arrows 1 to 8. In an iterated query the contacted server replies with the name of the server to contact. Following that rule, the exchange is:

  1. The requesting host asks its local DNS server.
  2. The local server asks the root DNS server.
  3. The root replies with the TLD DNS server to contact.
  4. The local server asks the TLD server.
  5. The TLD server replies with the authoritative server dns.cs.umass.edu.
  6. The local server asks the authoritative server.
  7. The authoritative server replies with the IP address.
  8. The local server returns the address to the requesting host.

The local server does all the asking, and every other server just points onward.

How it works

Recursive query, the same example

For the same lookup, a recursive query puts the burden of name resolution on the contacted name server. The root server contacts the next server itself instead of sending its address back. The slide asks, as a question, whether this means heavy load at the upper levels of the hierarchy.

Aside

Message order on the diagrams

The two figures are numbered 1 to 8, but the arrows and labels did not extract, only the numbers and server names. The order above is built from the lecture’s definitions of iterative and recursive resolution, not read off the arrows. If a question depends on which arrow is which number, check the slide.

Where marks get lost

Do not confuse the two styles by who the client is. In both, the host asks its local server with a simple request. What differs is whether the contacted server hands back another server’s address (iterative) or goes and fetches the answer itself (recursive).

In the exam

  • Label limit: 63 characters. Reading order: node up to the root.
  • Why distributed: single point of failure, traffic volume, distance, maintenance, does not scale.
  • Server roles: local (default per ISP or organisation, queried first), authoritative (administrator-configured for a domain, registered with the root servers).
  • Iterative versus recursive: one-line definition of each, and who carries the burden. Know the two quoted voices.
  • The example: host engineering.nyu.edu, target gaia.cs.umass.edu, local dns.nyu.edu, authoritative dns.cs.umass.edu.

Check yourself

  • DNS maps names to IP addresses using a distributed hierarchy of servers.
  • Domain names are an inverted tree, labels of up to 63 characters, read from the node up to the root.
  • Local server first, authoritative server holds the final answer.
  • Iterative returns the next server’s address. Recursive resolves on the client’s behalf and loads the contacted server.

Check yourself

  1. How is a domain name read?
  2. Which is NOT one of the reasons the lecture gives for avoiding a centralised DNS?
  3. A local DNS server does not know a name and replies to the host with the address of another server to ask. Which resolution style is this?
  4. In which type of query does the contacted server carry the burden of finding the answer?
  5. Which server is configured by an administrator with the hostname information for a particular domain?