DNS Overview: DNS is the domain Name System, which is a distributed database, organized into a domain hierarchy of the structure of the computer and Network service naming system. Its role is: to transform the domain name into a network can identify the IP address, the results of the query to save, and told the client.
Second, DNS query process
1. Local resolution
DNS query records that clients usually get are recorded in the DNS cache, the DNS client program first resolves using local cache information, and if the name to be queried is resolved, the DNS client program answers the query directly without having to query the DNS server. The DNS query processing process is over.
2. Direct resolution
If the DNS client does not respond to DNS queries from the local DNS cache, it sends a query request to the local DNS server set by the client, requiring the local DNS server to resolve.
3. Recursive parsing
When the local DNS server itself can not answer the client's DNS query, it will want to query other DNS servers, at this time there are two ways of a recursive query, the local server is generally the domain name of the root domain server query, and then by the root domain server level down query, The resulting results are returned to the local server, which is returned to the client by the local server.
4. Iterative parsing
When a local DNS server cannot answer DNS queries from the client itself, it can also be resolved by iterating through queries. Local DNS does not query itself to other DNS servers, but instead returns the IP address that resolves the domain name to the client DNS program, and the client DNS program continues to query the DNS server until the results of the query are obtained.
5. Classify DNS queries by query content
A. Forward query; domain name--IP
B. Reverse query: IP----domain name
Iii. Table of Contents
1.dns Server Directory
/var/named/chroot/
2. Main Configuration Document Directory
/var/named/chroot/etc
3. Directory of regional documents
/var/named/chroot/var/named
Four Case one.
Linux system master DNS server ip:192.168.1.25
Linux system secondary DNS server ip:192.168.1.26
Test machine XP ip:192.168.1.30
Five, DNS installation
Main installation of these 3 packages
1.bind Main Program
2.bind-chroot security "Generate extra Catalogs"
3.caching-nameserver A sample file that generates the primary configuration document for DNS, implementing a caching server
Configuration of the primary DNS server
1. [Root@dg ~]# Mount/dev/cdrom/mnt/cdrom
[ROOT@DG cdrom]# CD server/
[ROOT@DG server]# ll bind*
-r--r--r--the root root 1001253 2009-07-31 bind-9.3.6-4.p1.el5.i386.rpm
-r--r--r--the root root 44959 2009-07-31 bind-chroot-9.3.6-4.p1.el5.i386.rpm
[ROOT@DG server]# RPM-IVH bind-9.3.6-4.p1.el5.i386.rpm
[ROOT@DG server]# RPM-IVH bind-chroot-9.3.6-4.p1.el5.i386.rpm
[ROOT@DG server]# RPM-IVH caching-nameserver-9.3.6-4.p1.el5.i386.rpm
2. Switch to/VAR/NAMED/CHROOT/ETC
[ROOT@DG ~]# Cd/var/named/chroot/etc
[ROOT@DG etc]# LL
-rw-r--r--1 root root 405 09-10 18:16 localtime
-rw-r-----1 root named 1230 2009-07-30 named.caching-nameserver.conf
-rw-r-----1 root named 113 10-19 13:40 Rndc.key
3. Copy the main configuration file and modify the following
[ROOT@DG etc]# cp-p named.caching-nameserver.conf named.conf
[Root@dg etc]# Vim named.conf