Domain Name System

The DNS (Domain Name System) is used to translate hostnames and service names (e. g. to numeric IP addresses (e.g., which is a more suitable format for computers. In short this is done by a lookup in the DNS server’s database, and if not found the server will contact other DNS servers to get the correct IP address for the requested lookup (Figure 1).

IP addresses to other DNS servers and hosts will be cached in the local DNS server performing a lookup. How long an address is valid in the cache is decided by the TTL value of the IP address. TTL is set when the address is added in its authoritative DNS server’s database. This cache function results in that commonly used addresses and domains are often found in the cache. With cached information the time of the lookup decreases and less data traffic is produced.

In a full DNS lookup without any cached information, the local DNS server will request a root name server for an IP address to the correct top level domain DNS server (, .com). The top level server, which knows what lower level DNS servers’ IP addresses are, redirects the local DNS server further down the hierarchy of DNS servers. This proceeds between the local DNS server and other DNS servers until the IP of the requested host name is known or results in an error. The local DNS server also sends the correct address or an error to the client that requested the DNS lookup.

The DNS server contacted last in a lookup which is responsible for a portion of the name space delegated to its organisation, which is called the DNS zone. This authoritative DNS server has the address saved in its database along with the TTL value. An example of a DNS lookup where the top level domain server is known by the local DNS server is illustrated in Figure 1.

Figure 1: Standard DNS lookup

  1. Client asks for an IP address to a certain name of for example a web server.
  2. Local DNS server asks a top level domain server for an address to a lower level DNS server.
  3. The top level domain server answers with an IP-address to an authoritative DNS server.
  4. Local DNS server asks the new DNS server for the address of the web server.
  5. The server was an authoritative DNS server thus it answers with the correct IP address.
  6. The IP address is forwarded to the client.
  7. Now the client can ask for the web page from the web server since it got the exact address.
  8. Data exchange between client and web server starts.



Tags : , , , , , ,

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Leave Comment