What DNS server is and how it works?
If DNS is a hierarchical and decentralized naming system, which contains data about server names (hosts) and allows to identify their IP addresses, than DNS server as a component of it is a software and hardware system, which contains necessary data about domain and provides it upon request in accordance with technical network requirements.
In simpler language: DNS server is an app, which establishes correspondences between IP addresses and domain names (and vice versa), and is intended for DNS responses by related protocol. Also DNS refers to device where this app is launched. You enter ‘superdomain.com.ua’ in browser address bar, your computer connects to a DNS-server, finds out the IP address associated with the website name, and connects to this address, showing a required website
There are 3 strategies of IP address search in DNS database:
- A computer, what needs to connect with another computer in the same zone, sends a request to local DNS zone server to search of remote computer IP address. A local DNS server, that has its address in local database, sends a response back with required IP address.
- A computer, that needs to connect with another computer in the other zone, sends a request to local DNS zone server. A local DNS server finds out that the required computer is in the other zone and sends a request to root DNS server. The root DNS server finds the required local server and gets from it the IP address of required computer. Next, this local DNS server sends the address to the local server, which has sent the request. And the server sends the IP address back to the computer. Also the specific value is sent with the IP address — the Time to Live (TTL). This value shows the time, during which a local server is allowed to keep an IP address of remote computer in cache. Due to this speed of the next requests exceeds.
- A computer, that needs to connect with another computer in the other zone, sends a request to local DNS zone server. The local DNS server checks whether its name is in the cache, and checks its TTL. If the address is still in the cache and TTL is valid, than IP address is send to requesting computer. It is considered to be a unauthorized response, because a local DNS server reckon that IP address of remote computer didn’t change from the last request.
In all three cases, to find any computer in the network, only IP address of local DNS server is required. Further searches of an IP address are to be done by DNS server.
That is a brief description of DNS server functionality.
For more information read this