Basic Theory Of DNS
Before using DNS, computer networks use HOSTS files that contain information from the computer name and IP address. On the Internet, these files are managed centrally and in every location should be copied to the latest version of HOSTS files, from here it can be imagined how much trouble if there is addition of 1 computer in the network, then we must copy the latest version of this file to every location. With the increasingly widespread Internet network this is more troublesome, then finally made a solution where the DNS in the design to replace the function of HOSTS files, with the advantages of unlimited database size and good performance. DNS is a service application on the Internet that translates a domain name to an IP address or vice versa. For example when we connect to the Internet and type in a domain name, for example: yahoo.com on a web browser it will be plotted by a DNS server to an IP Address eg: 202.68.0.134 where the IP Address is the IP Address of the web server owned by yahoo.com. So, DNS can be analogized to the use of the phone book, where people we know by name to contact us should dial the phone number on the phone. Similarly, the host computer sends queries of computer names and domain name servers to DNS, then by DNS mapped to the IP address.
Domain Name System (DNS) is a service application on the Internet that translates a domain name to an IP address or vice versa and one type of system that serves IP address mapping requests to FQPN (Fany Qualified Domain Name) and from FQDN to IP Address. DNS is typically used in Internet-related applications such as web browsers or e-mail, where DNS helps to map a hostname of a computer to an IP address. In addition to use on the Internet, DNS can also be implemented to a private network or intranet.
DNS works with the concept of "client-server". A computer running this server function is called a DNS server or name server and another computer that requests a hostname translation to an IP Address called a DNS client. DNS is generally applied by using a centralized server that has the authority or authority to manage multiple domain names and refers to several other domains managed by other DNS servers. When the client computer requests the IP Address information of a hostname to the name server, then this request is addressed to port 53.
Domain Name System (DNS) is a distributed database system used to search computer names (name resolution) on a network using TCP / IP (Transmission Control Protocol / Internet Protocol). DNS has the following advantages:
- Easy, DNS is very easy because the user is no longer bothered to remember the IP address of a computer is enough hostname (computer name).
- Consistently, the IP address of a computer may change but the hostname does not change.
- Simple, the user only uses one domain name to search both on the Internet and on the Intranet.
DNS Structure
Domain Name Space is a hierarchy of grouping of domains by name, which is divided into several parts including:
- Root-Level Domains, the domain is determined by the level of ability that is in the hierarchy structure called the level. The topmost level in the hierarchy is called the root domain. The root domain is expressed based on the period in which the emblem for the root of the domain is (".").
- Top-Level Domains, Below are examples of top-level domains:
a. com. = Commercial organization
b. edu.= Educational institution or university
c. org.= Non-profit organization
d. net.= Networks (Internet backbone)
e. gov. = Non-military government organization
f. miles. = Organization of military government - Second-Level Domains, eg: yahoo.com, google.com, and others.
- Host Names, Domain name used with host name will create fully qualified domain name (FQDN) for each computer. For example, if there is fileserver1.detik.com, where fileserver1 is host name and detik.com is the domain name. It's also often called a subdomain.
How does DNS work?
The function of DNS is to translate computer names into IP addresses (map). Client DNS is called by resolvers and DNS servers are called by name servers. Resolvers or clients send queries to the name server queries. Name server will process by checking to local DNS database, contacting other name server or will send "message failure" if client request is not found. The process is called Forward Lookup Query, which is the request of the client by way of mapping the name of the computer (host) to the IP address.
In short as follows:
- Resolvers sends queries to the name server
- Name server checks to local database, or contacts other server name, if found will be notified to resolvers otherwise will send failure message.
- Resolvers contact the target host using the given IP address name server.
DNS provides a fairly important service for the Internet, when computer and network hardware work with IP address addresses to perform tasks such as addressing and routing, humans generally prefer to use hostnames and domain names, for example URLs and email addresses .
DNS Components
DNS is actually a server-client system, so there is a mechanism from the client to request information from the server that will provide the requested information the client. As mentioned above the program on the server is often called the name server. On the client is often called a resolver. DNS has a hierarchy of DNS servers. Each domain or subdomain has one or more authoritative DNS Servers that publish information about that domain and the server names of each of its "down" domains. At the top of the hierarchy, there are root servers, which are the servers being questioned when searching for (resolving) from a top-level domain name.
Structure and How DNS Works
The DNS database structure is very similar to that of a UNIX-file / filesystem file in the form of a hierarchy or tree. The top level in DNS is the root symbolized by dot (.), While in the UNIX file system, root is symbolized by slash (/). Each branch point has a label that identifies it relative to root (.). Each branch point is the root for the sub-tree / lower level. Each sub-tree is a domain and under the domain there is another sub-tree named subdomain. Each domain has a unique name and shows its position in the DNS tree, sorting / naming the domain name in full starting from the lowest domain to root (.). Each of the names that make up a domain is separated by dot (.) And ends with a point that is an absolute name relative to root (.).
For example, there is a domain "mysite.cs.mit.edu", then the explanation:
• "." Is the root of the domain
• edu is a top level domain
• mit is a second level domain
• cs is a third-level domain
• mysite is the name of the computer / machine in question
The absolute and complete name writing system is called FQDN (Fully Qualified Domain Name). On the Linux operating system, DNS is implemented using the Berkeley Internet Name Domain (BIND) software. BIND has two sides, namely the client side and server side. The client side is called a resolver. This resolver is responsible for generating questions about domain name information that is sent to the server side. This BIND server side is a daemon called named. He will answer the queries from the resolver given to him.
History of BIND
BIND is one of the most widely used DNS implementations on servers on the Internet. The first DNS implementation was JEEVES by Paul Mockapetris. BIND is still being coordinated by the Internet Software Consortium (ISC). The main program of BIND is named named which is a daemon which when executed will wait for connection on port 53 (default). Connection on port 53 is connection request information mapping from domain name / machine to IP address and vice versa.
If a DNS server has authorization of a domain then the DNS server will provide information about the name of the machine / domain under the domain it holds. For example: the author's DNS server has the authorization of the domain indolinux.com, then when there is a computer from the Internet want to access pikachu.indolinux.com, then the computer will contact the author's DNS server to find out the IP address information from pikachu.indolinux.com. The DNS server will answer the request / query from the requesting computer with the appropriate IP address then the computer can access pikachu.indolinux.com via the IP address provided by the name-server.
So, How how to create your own DNS Server? I have documented my steps to create DNS Server using Debian OS.
Source:
its very interesting info..great post keep it up. Love it.
thank you @video-master. I'll try your suggest.