Recent

What is DNS - What is its function and how it works

Usually when we want access a web page either we write the address of it or we ask Google. Every address on every internet page has an IP address that is 'hidden' behind a name. This is done through the DNS protocol and in this article we will explain what DNS is and how it works

We could make a similarity to the way our computer works. Although we have a graphical interface through Windows 10 or whatever operating system, the processor works with 1 and 0. What the software does is translate everything we do so that the processor understands it and the result is translated and we are sample.

No products found.

What is DNS

DNS stands for Domain Name System, which is translated Domain Name System. It is basically a hierarchical system that manages the entire domain name space (Domain Name Space). What this system does is resolve the requests we make by assigning names.

The domain name system uses a global network of DNS servers. This network is divided into several independently administered name zones. What this system allows is a decentralized management of domain information.

When a user registers a domain, a WHOIS entry is generated in the corresponding registry and stored in DNS as a “resource record”. A DNS server database is essentially a large warehouse with all the domain records that you are tasked with managing.

It was in 1983 when this DNS system which replaces the previous resolution procedure. The old system was very error prone and based on a local hosts file. Interestingly, the hosts.txt file is still present on UNIX-based operating systems in the 'etc/' directory and on Windows in %SystemRoot%\system32\drivers\etc.

The problem with the hosts.txt file is that it needed regular updating and manual maintenance. This system was a problem as the internet grew exponentially, becoming impossible to maintain. Currently this file is only used for IP address classification on local networks. In addition, it allows blocking web servers by automatically diverting the address to the local host.

We can therefore deduce that the DNS system is used to translate names to IP addresses and vice versa. It is made up of three identifiable parts

  • DNS client: These would be us entering an address in our browser and our team requesting a resolution request
  • DNS server: Respond to requests and resolve names using a tree system
  • Areas of authority: They are servers or groupings of these that are assigned the resolution of a set of domains

DNS requests

When we enter the address of a web (URL) in the address bar, a call request called solve is made. The operating system through a function caches the web addresses (IP addresses) that we have visited. When we make a request via browser or mail manager, are provided by the operating system.

Could it be that the requested IP address is not in the cache of the resolver, so a request will be made to the DNS server that it touches. Normally this DNS server is usually that of the internet provider. The DNS database is checked and if the IP address is available it is sent as a response (forward lookup). The browser will automatically open the web page that we had requested. There is a reverse way, which is to translate the IP address into the domain address (reverse lookup)

There is the possibility that the DNS server of our internet provider does not have the address that we have requested. It will be this server that will request the information from another server or the request will be sent to the corresponding DNS server. The resolution method is as follows:

  • Recursive resolution: It occurs when the DNS server cannot respond by itself to a request and takes the information from another server. The resolver transfers the request to the DNS server who provides its viewer after resolving with the domain name, if it has been resolved.
  • Iterative resolution: If the DNS server cannot resolve the request, it returns the address of the next DNS server in the hierarchy. Here the resolver sends a new request and repeats the process until the domain name is resolved.

The centralized management of domains in the DNS guarantees high reliability and flexibility. When the IP of a server changes, the user will not see said change, since the IP will be reported and stored in the database

What is a DNS server

Name servers are software for servers that requests a DNS database to respond to stored requests related to the domain name. Since these are hosted on dedicated hosts, the systems that host them are also called by this name.

Usually a distinction is made between primary and secondary DNS servers:

  • Primary, main, or master server: The primary or master DNS server is the one that stores the information of a certain zone of the domain namespace in its database. The domain name system is created so that each zone has a primary name server. This system is usually based on a cluster of servers where the data of a zone is stored in a master system with several slaves. By means of this redundant system the possibilities of drops or losses of availability are reduced.
  • Secondary or slave server: The information on these servers comes from the primary servers or from the primary's slaves. It may not be able to resolve the request as the IP address is not in its database. So you must draw on information from other secondaries or from a primary. Addresses are stored in a database permanently or temporarily, depending on demand.

How DNS works

A tree-like structure has been created for name resolution. The different DNS servers in each zone of authority are responsible for resolving the requests for each zone. In case they cannot, they will make the request to the corresponding server. The process would look something like this:

  1. We put in our browser: hardwaresfera.com
  2. The operating system looks to see if it has the domain address in the cache. If the operating system does not have it, it makes a request to the DNS server configured manually or through DHCP
  3. It turns out that the DNS server doesn't have the domain IP stored either, for whatever reason. This will make a request to the DNS server in charge of the IP addresses of the '.com' domains
  4. This DNS server that is in charge of the '.com' searches for the IP assigned to the domain in question. When it finds it, it returns it indicates to the DNS server assigned to us the server where the domain we seek to access is stored
  5. When our DNS server knows the server from which to claim the information, it makes a request for the IP address of the Hardwaresfera.com server
  6. This server looks for the domain in its database and returns an IP to our DNS server
  7. Now the IP is returned to our browser and the exchange of data packets begins
Show more

Robert Sole

Director of Contents and Writing of this same website, technician in renewable energy generation systems and low voltage electrical technician. I work in front of a PC, in my free time I am in front of a PC and when I leave the house I am glued to the screen of my smartphone. Every morning when I wake up I walk across the Stargate to make some coffee and start watching YouTube videos. I once saw a dragon ... or was it a Dragonite?

Related publications

Leave your comment

Your email address will not be published. Required fields are marked with *

Button back to top
CLOSE

Ad blocker detected

This site is funded through the use of advertising. We always make sure that the advertising is not too intrusive for the reader and we prioritize the reader's experience on the website. However, if you block the ads, part of our funding will be reduced.