Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

What is DNS in Computer Networks?

Introduction

The Internet is an extensive network of connected devices, each with an individual identification number known as an IP address. People find it extremely challenging to memorize numbers, especially since IP addresses are dynamic and can change over time. As a result, a mapping is needed to convert a website's Domain name, such as www.google.com, to its corresponding IP address, like 142.250.74.196.

Domain Name System (DNS) is a service that offers this mapping. In this blog post, we will discuss DNS in computer networks, its history, purpose, and how DNS works.

Before getting into more details, let's first define DNS in computer networks.

What is DNS in Computer Networks?

DNS, or Domain Name System, is a hierarchical naming system that allows communication across devices on a network. It generally translates human-readable domain names to computer-friendly Internet Protocol (IP) addresses. It additionally offers information associated with domain names, such as mail Servers, name servers, and authoritative resources.

DNS is a distributed database implemented in a hierarchy of name servers. A name server is a machine that stores and responds to queries about domain names and IP addresses. There are various types of name servers, which include root name servers, top-level domain (TLD) name servers, and authoritative name servers.

History of Domain Name Systme

When we talk about the history of DNS, we talk about the early days of the Internet when hosts were identified by their hostnames. All these hostnames were stored in a file commonly known as HOSTS.TXT. But as the number of users grew with time, so did the hosts, and it became difficult as well as impractical to manage the host file, which is too large. This will directly impact the consistency and accuracy across all hosts.

In order to overcome these limitations, Domain Name System, was introduced in 1983. It is a hierarchical structure for domain names where each level is separated by a dot, for example, google.com.

After its introduction to the Internet era, DNS in computer networks has evolved with new features and functionalities for better functioning. Some of the milestones have been discussed below:

  • In 1987, the first edition of RFC 1034 and RFC 1035 was published, which included new specifications and is known to be the base of DNS used today.
  • After 1987, the Internet Corporation for Assigned Names and Numbers (ICANN) was developed in order to coordinate the global management of domain names and IP addresses.
  • Lastly, in 2003, the Domain Name System Security Extensions (DNSSEC) was introduced to provide cryptographic authentication and integrity for DNS data.

Now that we know the history of DNS, let's discuss the purpose of DNS in detail.

Purpose of DNS in Computer Networks

DNS serves several purposes for the functioning of the Internet. Some of them are:

  • It offers a user-friendly way to access websites and other online services by way of using meaningful names in preference to numerical addresses.
  • It enables scalability and decentralization of the Internet by permitting any host to join or leave the network without affecting other hosts.
  • It also supports load balancing and fault tolerance by distributing requests amongst multiple servers that host the same domain name.
  • It allows mobility and dynamic addressing by way of allowing hosts to change their IP addresses without changing their domain names.
  • It permits interoperability and compatibility among various applications and protocols that use domain names for communication.

Let's understand the workings of DNS in computer networks.

How does DNS work?

Domain Name System (DNS) works the same as a client-server model in which a DNS client sends a query to a DNS server and in return the DNS server sends back the requested information to the client. When we talk about a query, it is the request that the client made to the server side. A response is the solution to the query that the server sends to the client.

The process of finding the IP address for a domain or website is commonly known as DNS lookup. A DNS lookup generally involves various steps and working closely with several name servers. Below, we have explained the functioning of DNS lookup.

  • Firstly, the user or a client enters a website or domain name in their browser.
  • Once the user sends a request, the browser contacts a local resolver, also known as a DNS resolver. It is a software component that mainly manages the DNS queries requested by the client. The resolver checks its cache to see if it already has the solution to the query. If not, it proceeds to the next step.
  • After that, the root name server searches for its database to find which TLD name server is responsible for the domain name in the query requested by the client. The root name servers are mainly responsible for the top-level domain. For example, if you search for google.com, then the root name servers send a list of all name servers associated with .com.
  • Once the root name server generates a list of all possible domains, the .com TLD name server checks its database to look at the authoritative name server. For example, if you search for www.google.com, the .com TLD name server will return the IP associated with the google.com authoritative name server.
  • The authoritative name server checks its database to see if it has the solution that is required for the query asked by the client side. This name server is mainly responsible for returning the IP address of the domain name to the resolver. For example, if the query is for ww.google.com, the authoritative name server returns 142.250.72.36 back to the resolver and, at the end, to the client, and only then it is possible to establish a connection with the host at that address.

We have explained the functioning of DNS, and now, let's understand the different types of DNS servers.

Different Types of DNS Servers

The hierarchy consists of four levels of name servers. These are:

  1. Local name servers: These mainly deal with the requests or queries from the clients or hosts in a network, such as web browsers. They do not store any domains or IP addresses, but they cache the results of previous queries for faster responses. They additionally forward the queries to other name servers if they cannot solve them locally.
  2. Root name servers: These are the top-level name servers that can be contacted through different name servers that cannot resolve a website name. They do not store any domain names or IP addresses; however, they know the authoritative name servers for all the top-level domain names (TLDs), including .com, .Org, .Edu, etc. There are thirteen root name servers globally recognized by using letters A to M. They are distributed across numerous locations and operated by means of different organizations.
  3. Top-level domain (TLD) name servers: These are accountable for managing the second-level domain names under a specific TLD, consisting of google.com, xyz.org, stanford.edu, and so on. They do not store any domains or IP addresses, but they realize the authoritative call servers for every second-level domain under their TLD.
  4. Authoritative name servers: These are responsible for storing and providing the authoritative mappings between domain names and IP addresses for a selected domain or subdomain, such as www.google.com, cs.stanford.edu, and so forth. They are typically maintained by means of the groups or organizations that own or operate those domains or subdomains.

Types of DNS Queries

DNS queries are the requests that clients send to DNS servers to resolve domain names. There are three main types of DNS queries, these are:

Recursive DNS Query

Recursive queries are the simplest of all DNS query types. They occur when a user asks a DNS server to resolve a website or domain name, and the server either comes up with a solution or, if not, contacts other servers until it finds the solution. The server then returns the answer to the query to the client in a single response. Recursive queries are convenient for clients; however, they place a lot of loads on DNS servers.

Iterative DNS Query

Iterative queries are complex as compared to recursive queries. They arise when a client asks a DNS server to resolve a website or domain name, and the server no longer understands the answer but is aware of any other server that would have a solution to the client’s query. The server then returns a referral to the client, pointing to any other server that is closer to the answer.

The client then repeats the query with the new server, and this manner is maintained till the client reaches the authoritative server that is aware of the solution. Iterative queries are more efficient for DNS servers; however, they require more work from clients.

Non-Recursive DNS Query

Non-recursive queries are the rarest kind of DNS queries. They occur when a user asks a DNS server to resolve a website or domain name, and the server either knows the answer to the request or query made by the client and, if not, sends it to other servers for the solution. The server then returns the answer or an error to the client without contacting any other server. Non-recursive queries are helpful for testing or debugging purposes but are not very common in regular operations.

These are the three kinds of DNS Queries.

Frequently Asked Questions

Q1. What is DNS and uses?

DNS, or domain name system, specifically turns domain names into IP addresses, allowing users to reach the websites they requested. With DNS, it is easier for users to access websites without even memorizing the numbers or IP addresses.

Q2. What is the DNS hostname?

A DNS hostname is a name that identifies a device on a network. For example, xyz.com is a DNS hostname.

Q3. What is an example of a DNS?

An example of a DNS is www.pynetlabs.com.

Q4. What is the port number of DNS?

The port number of DNS is 53. This means that when a computer wants to resolve a domain name to an IP address, it sends a query to a DNS server on port 53.

Conclusion

DNS is a crucial component in computer networks that enables communication across devices on the Internet. It provides a user-friendly way to access websites and other online services by using meaningful names instead of numerical addresses. In this blog, we have discussed DNS in computer networks in detail, along with its functioning and different types of DNS servers.



This post first appeared on What Is Access Control List (ACL) In Networking?, please read the originial post: here

Share the post

What is DNS in Computer Networks?

×

Subscribe to What Is Access Control List (acl) In Networking?

Get updates delivered right to your inbox!

Thank you for your subscription

×