DNS-Domain Name System
In the network, devices are labelled with numeric numbers called IP addresses to send and receive data over networks. Domain Name Service (DNS) was created to change the numeric address into a simple, recognizable name. DNS is short for Domain Name System (Service or Server). It is an extensive database that resides on various computers. It contains the names and IP addresses of different Internet hosts and domains. It is the Internet’s equivalent of a phone book.
The domain name system is an essential service because domain names are easy for people to remember and access on computers, servers, and websites based on IP addresses. A domain name, such as https://networkustad.com, is much easier for humans to remember that its IP address is 64.91.237.241. If the IP address of https://networkustad.com changes, it is transparent to the user because the domain name remains the same. The new address will be linked to the existing domain name.
The domain name system defines an automatic service that matches resource names with the required numeric IP address, including query format, responses, and data. The domain name system protocol uses a single format called a message for all types of client queries and server responses, error messages, and the transfer of resource record information bet]. Ween servers.
The domain name system is its complete network. If one domain name server doesn’t know how to translate a particular domain name, it asks for another domain name system, and so on, until the correct IP address is returned. The Figure below illustrates the steps involved in the domain name system resolution.
DNS Message Format
The domain name server has two types of messages: query and response. The query message has a header and question records, and the response message has a header, question records, answer records, authoritative records, and additional records. The domain name server stores names, addresses and other records to resolve the names. Some types of records are the following:
- A – The IPv4 address of An end device
- AAA – The IPv6 address record of an end devices
- NS – An authoritative name server
- PTR – Record has the name of a node in the DNS namespace.
- SRC – Record has information about a server
- TXT – Record contains arbitrary text
- MX – A mail exchange record
Whenever a host sends a query for name resolution, the domain name system process first checks its own stored records to resolve the name. If the record is not found in its own stored records, it forwards the query to other servers to resolve the name. Once a name is resolved and returned to the requesting server, the server stores the IP address for the time being in the event that the same name is requested again. The figure above illustrates that process.
The DNS Client service on Windows PCs also stores names in memory after they have been resolved. The ipconfig /displaydns command displays all later resolved entries that are cached in memory. The domain name system uses the message format below for all types of client queries and responses, error messages, and resource record sharing between DNS servers.
The domain name system has two types of messages: query and response. Both have the same format. The query message consists of a header and the question records, and the response message contains a header, question records, answer records, authoritative records, and additional records, as shown in the figure.
Header
The header is an essential element for any message because the header contains necessary control fields. In DNS messages, the header section carries several key control flags and is also where we find out which additional sections are even being used in the message. The header also states whether the message is a query or a response. The header for query and response are the same as shown in the figure. The length of the header is 12 bytes.
Questions
The question section has fields describing a question to a name server, which may be a query or response. If the message has a query, then this section contains the question expressing the query. If the message is a response, this section has the question sent in the query to which this is the response.
Answers
The answer section has resource records that answer the question. If the message has a non-error response, this section has the resource record(s) that match the query to which this is the response.
Authority
The authority section has one or more resource records that point toward an authoritative name server. If the message is an error response, this section may contain resource record(s) identifying DNS servers, which can be queried instead.
Additional
The additional records section has Resource records that relate to the query but are not strictly answers for the question. If the message is a non-error response, then this section may contain resource records that do not match the query but are related to it.
Fully Qualified Domain Name (FQDN)
To understand the DNS hierarchy, knowing about a Fully Qualified Domain Name (FQDN) is essential. A fully qualified domain name (FQDN) consists of the hostname and domain name. The hostname is not case-sensitive and can also contain alphabetic and numeric letters.
An FQDN is the domain name that specifies its exact site in the DNS hierarchy. It specifies all domain levels, including root and top-level domains. The example of FQDN is “mail.fschub.com” where “mail” is the hostname and the “fschub.com” is the domain name.
DNS Hierarchy
The DNS uses a hierarchical system database for resolving name addresses. DNS uses domain names to form the hierarchy. The DNS hierarchy is comprised of the following five elements:
1) Root Level
2) Top-Level Domains
3) Second-Level Domains
4) Sub-Domain
5) Host
Root Level
The DNS root zone is the uppermost level in the DNS hierarchy tree. The root name server is the server for the root zone. These servers contain information that makes up the root zone, the global list of top-level domains. The root name servers are critical as they are the first step in resolving a domain name. The root name server is the authoritative server that serves the DNS root zone. These servers contain the global list of the top-level domains. 12 different organizations operate the root servers:
- University of Maryland
- VeriSign Global Registry Services
- Cogent Communications
- University of Southern California, Information Sciences Institute
- Internet Systems Consortium, Inc.
- NASA Ames Research Center
- VeriSign Global Registry Services
- US Army Research Lab
- US DoD Network Information Center
- Netnod
- WIDE Project
- RIPE NCC
- ICANN
Top Level Domains (TLDs)
TLDs are the next level in the DNS hierarchy. Many TLDs serve at the moment. As we have seen, the TLDs are classified into two subcategories. The different top-level domains represent either the type of organization or the country of origin. Examples of top-level domains are:
- .com – A business or industry
- .org – A non-profit organization
- .edu – Educational Institutions
- .gov – Government Intuitions
- .mil – Military Groups
- .net – Major network Support Centers
- .org – Nonprofit Organizations and others
- .int – International Organization
- .au – Australia
- .pk – Pakistan
- .us – United States
Second-Level Domains
Second-level Domains come after TLDs in the DNS hierarchy. These domains are directly below the TLDs. The second-level domain is an important part of the DNS. There are no limits to the second-level domain like the TLDs. If the domain is available, anyone can buy it.
Sub-domain
The subdomain is the last level in the DNS servers. It is part of the main domain. The only domain that is not only a subdomain is the root domain. For example, alfa.example.com and bravo.example.com are subdomains of the example.com domain, which in turn is a subdomain of the com top-level domain (TLD).
This is the DNS hierarchy and elements of the DNS hierarchy. The DNS hierarchy is just like an inverted tree. The figure below illustrates the hierarchy of DNS.
The nslookup Command
The domain name server addresses are essential for network device configuration. Generally, the ISPs provide the IP addresses for the DNS servers. The host usually requests to connect to a remote device by name; the requesting client queries the name server to resolve the name to the IP address.
Operating systems also have a utility called nslookup that allows users to manually query the name servers to resolve a given hostname. nslookup can also be used to troubleshoot name resolution issues and verify the current status of the name servers.
Easy.gr
September 23, 2020 @ 6:40 am
After reading this post, I learnt a lot of things about DNS Thank you for sharing.
Easy.gr
November 3, 2020 @ 11:09 am
very informative post!!
thanks for sharing this post here with us