How DNS works?

Published Dec 19, 2017

DN ... What?

If you have ever surfed the Internet then you have used DNS without even knowing it; The DNS (Domain Name System) is a hierarchical and decentralized nomenclature system for those devices that are connected to an IP network, such as the Internet. The most important function of DNS is to "translate" domain names (such as simplemail.com), which are much more meaningful and easy to remember for people, in binary identifiers associated with computers connected to the network, in order to to be able to locate these teams worldwide.

Great, but how does it work?

The DNS translation process begins when a user wants to navigate to their favorite website, suppose that our user wants to navigate to simplemail.com, he enters the domain name in his browser and expects to see all his emails displayed . The browser first checks its cache to verify if the user has previously visited this site, if so, the browser has surely saved the search result and could address it immediately, in the case of not having this information the browser in case you just do not know which address to request the emails of our user; but he knows who to ask.

Recursive Resolver

The Recursive Resolver, usually the ISP (Internet Service Provider) of the user, is the first one to be asked to what IP address the domain name corresponds, simplemail.com in our case. The resolver then checks its own cache to verify if it has this information in advance, all the resolvers must know at least one thing: where to locate the Root Server.

Root Server

The Root Server is in charge of knowing how to locate the TLD (Top-Level Domain) server.

The resolver then asks the root server, it checks its cache, if it does not know how to solve the request, the root server redirects it to the appropriate TLD server, in our case it would be the .com TLD server. The resolver then saves the address of the .com TLD server in its cache to answer future requests without having to ask the root server again.

The root server is one of the 13 that currently exist, these root servers are those that are at the top of the DNS hierarchy and are operated by 12 different organizations; they are called [letter] .root-servers.net, where the range of letters goes from A to M.

TLD Server

The coordination of the Top-Level-Domain Servers belong to ICANN (Internet Corporation for Assigned Names and Numbers). The TLD server to resolve the .com domains was one of the first to be created, back in 1985

Once having the address of the appropriate TLD server the resolver proceeds to make the query about our site simplemail.com, the TLD server then proceeds to check its cache and if it does not have the required information, it provides when resolving with the addresses of the authoritative DNS servers, who in turn keep these addresses in their cache for future queries.

When a domain is purchased, the domain registrar reserves the name and communicates to the TLD about authoritative DNS servers so that future queries about this domain are redirected to them.

The resolver then proceeds to consult the authoritative DNS servers which have the information that was requested in the beginning: the IP address that corresponds to the simplemail.com domain. Once the IP address has been obtained, the resolver saves it in its cache for future queries and, finally, returns it to the Operative System, who in turn provides it to the browser, who can finally request the user's emails. It is fascinating to think that all of this transfer of information happens in a few thousandths of a second.

Discover and read more posts from Oscar Flores Presidente
get started