In the process of using a vro for networking, the DNS server is an essential public service. Today, we will explain how to install and configure DNS servers in Linux. The network topology is three dns servers (primary DNS, lower-layer DNS, and secondary DNS respectively) it is composed of a DNS test client and uses the default settings for the vro.
Linux uses CentOS, which is not only stable but also free of charge, and is very popular with the majority of webmasters.
First, check whether the bind program is installed on CentOS. By using rpm-qa | grep bind, you can find that Centos has installed the bind client by default, but has not installed the server, all software on the server is installed using rpm-ivh.
After the bind software package is installed, named is not displayed in/etc. conf file, which is very complex. If it is manually written, it will take a lot of time. All the packages that need to install a caching-nameserver can help us install many standard documents. It will cache the data in the dns configuration file. A lot of regional data files will also be installed. We only need to modify those files.
View the named. ca file. This file is actually the root list. The first experiment is to configure the bind software as a cache server. This is very simple because the caching-nameserver is installed, and it is already a cache server. You only need to use/etc/init. d/named start.
If the bind software you installed is 9.3, the configuration file is in/usr/share/doc/bind-9.3/etc/named. conf: copy the file and modify it.
Use commands such as nslookup and dig on the client to check DNS resolution.
Start another Linux server and install the bind software. As a backup server of the original DNS service, create a configuration file, set it to a server Load balancer instance, and then start the service, it automatically copies the region file from the primary DNS. (Note: The region file must contain SON records and NS records)
Next, set up to authorize A region to the lower-layer DNS server. This is also very simple. On the upper-layer DNS, write the NS record as the lower-layer DNS name, and add A new A record, you can explain the IP corresponding to this name. In this way, when there is a request for this region, it will go to the lower-layer DNS server.