DNS server Configuration
I. DNS Overview: DNS is an abbreviation for the domain Name System and is a computer and network service naming system that organizes the domain hierarchy. Its role is: to convert the domain name into a network can recognize the IP address, the query results are saved and told to the client.
Second, the DNS query process
A DNS query process is the process by which a client translates an IP address into an FQDN, translates an FQDN into an IP address, or queries a region's mail server through a DNS server.
1. Classification of DNS queries by query method
A. Recursive query: When a DNS server receives a query request, it either makes a successful response to the query, or makes a response that fails the query. Recursive queries typically occur between DNS clients and DNS servers.
B. Iterative query: The DNS server responds with the best results based on its own cache or zone data. If the DNS server cannot resolve, it may return a pointer. The pointer points to a DNS server with a subordinate domain name, and continues the process until it finds the DNS server that owns the queried name, or until the error occurs and the time-out expires. Iterative queries typically occur between DNS servers.
2. Classify DNS queries by query content
A. Forward query; domain name-"IP"
B. Reverse query: IP----domain name
Third, DNS installation
1. Configuring Yum local source, using Group installation method
2. Do not forget to also install the Caching-nameserver
Iv. Application Cases
1. Primary scope and secondary scope
Configuration parameters: The domain name is a.com.
The primary domain IP is 192.168.142.2;
Secondary zone IP is 192.168.142.20
1) Copy the master configuration file and configure it as follows
In the master configuration file, you must add the primary DNS data to the specified DNS server (secondary zone)
2) Edit the Named.rfc1912.zones file, as added:
3) Copy the zone file template and modify it
4) Restart the DNS service
5) At this point, the primary zone is complete.
6) The file of the auxiliary area is basically the same as the configuration of the main area, that is no longer need to add allow-transfer {} in the options block, and edit the Named.rfc1912.zones file, such as add:
Be sure to set the default "Allow-update {none;}; "Item, which is about to allow updates to be deleted, and where the files are stored or stored in other directories, you must ensure that the owner of the directory being stored and the owning group are named, otherwise bind will not be able to write DNS information transferred from the primary zone to the file.
7) Start the DNS service, you will find that the A.com.db file is generated under slaves, note the size of its value, and compare it with the following
8) Test phase: Now add a few records in the main zone file, for example, to observe the related changes of the auxiliary DNS,
9) Set the DNS of the test machine to secondary DNS,
10) test with Nslookup to find that the newly added record is not parsed correctly because the refresh time of the DNS setting is 2 minutes, after a period of time, You can see that the a.com.db file under slaves has increased, and that several records have been added to the zone file for the secondary zone.
11) in the test machine can correctly parse the newly added smtp.a.com
Note Be sure to shut down the firewall when testing.
DNS of Linux