This article discusses the basic aspects of DNS functioning necessary for practical application.
DNS (Domain Name System) is a distributed system for storing and processing information about domain zones. It is necessary, first of all, to correlate the IP addresses of devices on the network and symbolic names more adapted for human perception. Providing information about IP addresses of hosts by symbolic address is not the only task of DNS. The system works with different types of resource records, which allow implementing a very wide range of tasks: forwarding between domain names, load balancing between hosts, binding specific services (for example, e-mail) to a domain.
The domain name system is one of the fundamental technologies of the modern Internet environment, since information about the IP address of the requested host is a prerequisite for receiving a response to any Internet request. But the IP address is a numerical value like “184.108.40.206”, which is not suitable for human comfort. In addition, the basic principle of the distribution of IP addresses in the network is uniqueness. It is also important that the network address is not the most stable parameter. It may change (eg, when the host serving the requested node changes, the hosting provider changes, etc.). All of these features make the network address navigation system difficult for humans.
DNS provides the transformation of the symbolic domain name requested by the client into the IP address (s) of the server (servers) serving this domain zone. Initially, before the growth of the Internet, addresses were translated according to the contents of the “hosts” file, compiled centrally and automatically distributed to each of the machines on the network. As the global network grew, this method ceased to justify itself – there was a need for a new mechanism, which was the DNS, developed in 1983 by Paul Mokapetris.
The key characteristics of DNS are:
- Distributed storage and management – each DNS server is required to store information only for domains delegated to it, and different persons are responsible for different nodes of the domain name tree
- Data caching – the DNS server can temporarily store some information about non-delegated domains to reduce the level of overall load
- Hierarchical structure – the node responsible for the domain zone can independently delegate downstream nodes to other DNS servers
- Redundancy – storage and processing of information about the same hosts is usually provided by several DNS servers isolated physically and logically. This approach ensures that information is available even if one or more nodes fail.
Hierarchy and delegation of domain names
A domain is a named branch in the name tree that includes the node itself (e.g., the first-level domain “.com”), as well as its subordinate nodes (e.g., the second-level domain “example.com”, the third-level domain “mail .example.com”, etc.). To indicate the hierarchical belonging of domain names, it is customary to use the concept of “level” – an indicator of the position of a node in the domain tree. The lower the level value, the higher the hierarchical position of the domain
- “.” – zero level domain
- “.ru” – first (top) level domain
- “example.com” – second level domain
- “mail.example.com” – third level domain
- This list goes on
Notice the zero-level domain “.” (dot – dot) , also called the root. In practice, the dot is usually omitted (“example.com” instead of “example.com.”), i.e. specifying the root domain is not a requirement for resolving an IP address. Most client programs (Internet browsers, etc.) add the zero-level domain automatically and do not display it to the user. A domain name that does not include the designation of a zero-level domain is called relative, but that includes a dot at the end is called fully qualified (FQDN – Fully Qualified Domain Name) .
A domain zone is a part of a hierarchical tree of domain names (for example, “.ru”), wholly transferred to a specific DNS server (usually several) for the purpose of delegating responsibility for this and all subordinate domains to another person (“anyaddress.ru”, “any .anyaddress.ru”).
Delegation – the transfer of responsibility for a specific branch of the domain name tree to another individual or legal entity. It is this procedure that practically implements an important principle of DNS operation – the distribution of record storage and query processing. The delegation process itself is the addition of the so-called “glue” NS records for the delegated child zone (“example.com”) to the resource records of the parent zone (“.ru”), pointing to the DNS server of the host domain parties (for example, our company’s DNS servers). From now on, all resource records of the second-level domain “example.com” and all its child domains (for example, “mail.example.com”, etc.) are stored on the DNS servers of this company, and the parent zone “.ru”
DNS server – a host that stores resource records and processes DNS requests. The DNS server can independently resolve addresses related to its area of responsibility (in the example above, this is the example.com zone), or transfer requests for zones that it does not serve to upstream servers.
DNS client – a set of software tools for working with DNS. The DNS server itself periodically also acts as a client.
Main types of resource records
Resource record (RR – Resource Record) – a unit of storage and transmission of information in the DNS, which includes the following elements (fields):
- Name (Name) – the name of the domain to which the entry belongs
- TTL (Time To Live) – the allowed time for storing a record by an irresponsible server
- Type (Type) – a parameter that determines the purpose and format of the entry in the data field (Rdata)
- Class (Class) – type of data transmission network (it implies the ability of DNS to work with types of networks other than TCP / IP)
- Data field length (Rdlen)
- Data field (Rdata) – the content and format of the field depends on the record type
The following are the most commonly used types of resource records:
- A (IPv4 Address Record – address record) – associates a domain name with an IPv4 host address
- AAAA (IPv6 Address Record) – associates a domain name with an IPv6 host address (similar to an A-record)
- CNAME (Canonical Name Record – canonical name record) – used to redirect to another domain name
- MX (Mail Exchange – mail exchanger) – refers to the mail server serving the domain
- NS (Name Server – name server) – refers to the DNS server responsible for the domain
- TXT – text description of the domain. Often required to perform specific tasks (for example, confirming ownership of a domain when linking it to a mail service)
- PTR (Point to Reverse – pointer record) – associates the ip-address of the machine with the domain, it is used mainly for checking by third-party mail services of emails sent through this machine for relation to the domain specified in the mail server parameters. If these parameters do not match, the letter is checked more carefully according to other criteria.
Recursive and non-recursive DNS queries
Recursion is a model of query processing by a DNS server, in which the latter performs a complete search for information, including about domains not delegated to it, if necessary, referring to other DNS servers.
DNS queries (DNS queries) from the client (server) to the server are recursive and non-recursive. In the first case, the DNS server that received the request polls all nodes in descending order of the zone level until it receives a positive response or information that the requested domain does not exist. In the case of non-recursive requests, the server will give a positive response only when requesting a host that is part of the domain zone for which this server is responsible. The absence of recursion may be due not only to the type of request, but also to the ban on the execution of such requests by the DNS server itself.
Caching is another important characteristic of DNS. When the server sequentially accesses other nodes in the process of executing a recursive query, the DNS server can temporarily store in the cache memory the information contained in the responses it receives. In this case, a repeated request for a domain does not go beyond its cache. The cache time limit is contained in the TTL field of the resource record.
Welcome to the world of DomainRooster, where roosters (and hens) rule the roost! We're a one-stop shop for all your entrepreneurial needs, bringing together domain names and website hosting, and all the tools you need to bring your ideas to life. With our help, you'll soar to new heights and hatch great success. Think of us as your trusty sidekick, always there to lend a wing and help you navigate the sometimes-complex world of domain names and web hosting. Our team of roosters are experts in their fields and are always on hand to answer any questions and provide guidance. So why wait? Sign up today and join the ranks of the world's greatest entrepreneurs. With DomainRooster, the sky's the limit! And remember, as the saying goes, "Successful people do what unsuccessful people are not willing to do." So don't be afraid to take that leap of faith - DomainRooster is here to help you reach for the stars. Caw on!