What is Dns (Domain Name System)?

February 28, 2018

Dns (Domain Name System) in its simplest definition, is a system that assigns user-friendly domain names to unique ip addresses. Without Dns, we'd all have to remember the IP addresses of websites we want to reach. Being have to memorize several numbers in order to reach a single website... Could have spoiled the fun of internet surfing.

It's also possible to access a website by simplying typing its IP address instead of its domain name. However, Dns creates a better way of accessing a website by each of them having a recognizable address. For instance, you may as well reach google.com by typing 172.217.9.174 into your browser. But how user-friendly could that be?

Historical Information

The system initially found to support the email communication system of ARPANET. Stanford Research Institute (SRI) held the mapping of host names and numerical addresses of computers, in a text file named HOSTS.TXT.

Only administrators had the access to this file. To request a host name or an address, or to add a new computer information to the HOST.TXT file, people had to contact SRI's Network Information Center (NIC), by telephone, during business hours.

When the year comes to early 1980s, as the file grew more and more, maintaining of it had become slow and unwieldy. Five competing solution proposals have been offered to Paul Mockapetris; instead he chose to create Domain Name System.

In 1984, four UC Berkeley students, Douglas Terry, Mark Painter, David Riggle, and Songnian Zhou wrote the first Unix name server implementation for the Berkeley Internet Name Domain, commonly known as BIND. It was widely distributed, especially on Unix systems, and is still the most widely used Dns software on internet.

Function

As you may already know, each IP address in a network must be unique, which contains 4 set of numbers, from 0 to 255, e.g. 172.217.9.174. When you type a domain name of the site you want to reach to your web browser, Dns system takes action, translating the domain name into the corresponding IP address. Once the IP adress is found by Dns, your computer connects to that IP address and the website will be displayed on your PC.

It is obvious that Dns adds an additional process time, makes the user wait longer. Admiringly, this only happens for the first time you visit a website. Once the Dns result is achieved, it is cached for a period of time.

Linking domain names to IP addresses is not the only function of Dns but the simplest one. Major functions of Dns include storing, maintaining and distributing the records over a vast network of connections.

Domain namespace, which are individual labels subsequently divided through dots, forms a hierarchical tree structure. A fully qualified domain name is unique enough to be easily identified by the host’s position in the Dns's structure.

Dns HierarchyDns Hierarchy

Resolution of domain name process starts with a query to one of the root servers. The root server answers with a referral to more authoritative servers. For instance, when www.wikipedia.org query is made, the root server refers to org servers. The process goes on by querying the referred server, and iteratively repeats this process until an authoritative server is found.

Address Resolution MechanismAddress Resolution Mechanism

Dns Hijacking

Dns hijacking is the most common subject in Dns security issues. In practise, when a user attemps to visit google.com, enters the URL into the browser, address resolution process starts and ISP name servers respond back with the correct IP address.

In cases of Dns hijacking, a malicious software which is installed in the system, intercepts this process and tricks the system as it retrieved the IP address from name servers but outputs an invalid IP address by connecting malicious Dns servers operated by scammers.

Even though users see google.com in their browser's address bar, the connected IP address is different from the expected. So the site that is reached will be different from google.com.

Dns Records

A Dns Record is a single database record, which provides guidance on how to process incoming queries.

A Dns Record has four attributes: Type, name, value, and TTL (Time to Live). TTL points out the time (in seconds) how fast a record is refreshed. Any changes on a record will start carry out once the TTL has expired. Until that time, record will have the older value.

Dns Records example from GoDaddy<br/>@ is used to define the root domain, * is used as a wildcard,.Dns Records example from GoDaddy
@ is used to define the root domain, * is used as a wildcard,.

Dns Record Types

A (Address) Records

A Records simply links a domain (or subdomain) to an IP address.

CNAME (Canonical Name) Records

An alias for a domain name. For example, maps.google.com is a CNAME for domain name google.com. Allows to point of a domain (or subdomain) to another domain. Cannot point to an IP address directly.

NS (Name Server) Records

List of Dns servers responsible for a zone. For instance, ns23.domaincontrol.com and ns24.domaincontrol.com GoDaddy default NS records.

MX (Mail Exchange) Records

Specifies email servers to route emails to those servers, which accept emails on behalf of the host.

TXT Records

This record, unlike the others, does not direct any traffic, but stores and provides human-readable text files for outside sources. One example of using this record is verifying ownership of a website through Google Webmaster Central.