Configure DNS Server

Senin, 28 Juni 2010

For the operation of a computer network Internet, actually addressing a computer performed using numbers known as Internet Protocol (IP) address which consists of 32 bits. Surely it would be difficult for the human / user to remember the many millions of computers around the Internet. For naming it developed engine that is more humane to use the concept of Domain Name System (DNS). In this paper we will try to explain how to set up DNS Server on the machine with a UNIX OS. This capability will be needed if an institution / company wants to have a hostname own name on the Internet.

Domain Name System is one of the types of systems that serve the demand for mapping IP addresses to FQDN (Fully Qualified Domain Name) and the FQDN to IP Address. FQDN easier to remember by humans rather than an IP Address. For example, a computer has an IP Address 167.205.22.114 and have a FQDN "nic.itb.ac.id". The name "nic.itb.ac.id" certainly easier to remember than an IP Address numbers above. Especially after the birth of the concept of IP Version 6 that has six segments for each computer so that the number of IP addresses to be longer and more difficult to remember. In addition, the control also provides mail routing service, information about the hardware, operating system you run, and network applications are handled by the host.

In the UNIX operating system, control is implemented using the software Berkeley Internet Name Domain (BIND). BIND has two sides, namely the client side and server side. Client side is called the resolver. Resolver is in charge of raising questions about domain name registration information that is sent to the server side. BIND server side, this is a daemon called named. He who will answer queries from the resolver given to him.

At the time of BIND running, he has four operating modes, namely:

Resolver-only
Computers only generate information query the domain name to a DNS server and DNS server does not perform the function.
 
Caching-only
Computers running the name server function, but does not have a DNS server database. He only learned the answers to queries that are provided by a remote control server and store them in memory. The data in memory will be used to answer subsequent queries granted him.

Primary server
Computers running the function name servers based on its database. This database is built by the administrator control. This server becomes authoritative source for a particular domain

Secondary server
Computers running the name server functions based on a database drawn from the primary server. The process of making the database files are often called zone transfer files. He is also an authoritative source for that domain
  • Resolver-only
When in resolver-only mode, BIND will find the file / etc / resolv.conf (on UNIX in general) and read the configuration specified in the file. If BIND does not find that file it will use its default configuration.
Basic form of syntax in the / etc / resolv.conf is as follows:

name domain
nameserver address
[Nameserver address]
declare a default domain name domain as defined by the entry name. If there is writing a host name that contains no punctuation point the resolver would add the entry the name behind the name of that host. As an example, if you write the mail just the host name and entry name contains ptn.co.id then the resolver will use the name mail.ptn.co.id. Name server states which server should be contacted if there is a query from the resolver on the above domain. If the server could not be reached, then the target server query throws.

Example listing file / etc / resolv.conf :

# Resolver configuration file
domain ptn.co.id
# Server neareset is mumet.ptn.co.id, IP 169.98.3.1
nameserver 169.98.3.2
# failed ??? Try the second server : nggliyeng.ptn.co.id, IP 169.98.2.15
nameserver 169.98.2.15
# Fail again? The third server : ngeh.ptn.co.id, IP 169.98.1.2
nameserver 169.98.1.2

The third mode can then be done in parallel or stand alone on a computer that becomes a DNS server. Mode setting is done in the named daemon configuration. Critical files which is a reference to named to operate is named.boot, data_cache, data_domain, and data_reverse. named.boot is a file that contains a boot script for the DNS server. data_cache is a file that contains the DNS root servers. data_domain is a file that contains the mapping of the FQDN to IP Address and complete data from the relevant domain. data_reverse is a file that contains data about an IP address to FQDN mapping. In the UNIX operating system, the files are located in the directory / etc / namedb. Becomes the default directory for the named.

The most important configuration file for named is the file / etc / namedb / named.boot. This file contains commands that define the function named as a caching-only server, primary server, or the secondary server.
  • Caching-only
If we wanted to set the named only operates on the caching-only mode the file containing the command cache named.boot just follow the file name that contains the main servers as the place to throw a query.
Here is an example file named named.boot which we set to operate at a caching-only mode

; File named.boot
;
; Defines the default directory
directory / etc / namedb
;
; A caching-only server
data_cache cache
;
; Be the primary domain name server on ptn.co.id
ptn.co.id primary PTN
;
; Be the primary server for mapping IP addresses to FQDN 169.98.1.x
1.98.169.IN-ADDR.ARPA primary rev_169.98.1.x
;

If we also be the primary computer server for mapping IP addresses to FQDN 169.98.1.x then we add the last entry.
  • Secondary Server
Secondary servers are DNS servers that use the domain database has been transferred from the primary server. To set the server to be secondary to a specific domain, we add a word followed by a secondary domain that was held, followed by the primary server IP address and ends with the file name database.

For example, our computer will act as secondary servers for the domain pts.ac.id. Primary domain server dns.pts.ac.id held by the server with IP Address 190.21.85.2 numbers. Named.boot so we edit the file like the following:

; File named.boot
;
; Defines the default directory
directory / etc / namedb
;
; A caching-only server
data_cache cache
;
; Be the primary domain name server on ptn.co.id
ptn.co.id primary PTN
;
; A secondary domain name server on pts.ac.id from dns.pts.ac.id
pts.ac.id 190.21.85.2 secondary sec_pts
;
; Be the primary server for mapping IP addresses to FQDN 169.98.1.x
1.98.169.IN-ADDR.ARPA primary rev/rev_169.98.1.x
;
; A secondary server for mapping IP addresses to FQDN 190.21.85.x
85.21.190.IN-ADDR.ARPA 190.21.85.2 secondary rev/sec_190.21.85.x
If we also become a secondary server for mapping an IP address to the FQDN of the server 190.21.85.x dns.pts.ac.id we add the last entry.

The next step is to create, and data_reverse data_domain file (such as State and rev/rev_169.98.1.x file) which will be discussed in future articles.

0 Comments:

 
FaceBlog © Copyright 2009 NETWORK COMPUTER | Blogger XML Coded And Designed by Edo Pranata