DNS (domainnameserver) is simply a domain name resolution server, which is the result of research at Berkeley University. When IP addresses challenge everyone's memory, DNS is undoubtedly a life-saving tool, because of his high efficiency compared with the previous hosts and NIS, he wants to know more about DNS. Please go to the Internet to see it! Lab level
DNS (domain name server) is simply a domain name resolution server, which is the result of research at Berkeley University. When IP addresses challenge everyone's memory, DNS is undoubtedly a life-saving tool, because of his high efficiency compared with the previous hosts and NIS, he wants to know more about DNS. Please go to the Internet to see it!
Experimental Platform: two Linux CentOS5.5 servers under the VM, one as the master server and the other as the auxiliary server (slave)
IP address planning:
Master server: 192.168.1.193
Secondary server: 192.168.1.195
First, the settings to be done on the primary and secondary servers
First, install the DNS suite.
[Root @ localhost ~] # Yum-y install bind-chroot ypbind bind-utiLsCaching-nameserver
Second: settings on the master server (key)
[Root @ localhost ~] #Cd/Var/namEd/Chroot/etc // enter the directory where the main setting file is located
[Root @ localhost etc] #Cp-P named. caching-nameserver.conf named. conf // create the master configuration file
The following procedure indicates that the configuration file is searched in the/etc directory by default when the service is started. This is also the reason for this soft connection.
[Root @ localhost etc] #Ln-S/var/named/chroot/etc/named. conf/etc/named. conf
Follow these steps to configure rndc. (With rndc, you can update the changes made to the master server without shutting down the DNS server)
[Root @ localhost ~] # Rndc-confgen>/etc/rndc. conf // generate the main configuration document of rndc
Do not make any changes to this file. just copy the part required by DNS.
[Root @ localhost ~] # Vi/etc/rndc. conf
[Root @ localhost ~] # Vi/etc/named. conf // modify the main configuration file. You can modify the parts listed below.
Listen-on port 53 {any ;};
Forwarders {202.102.240.65 ;};
Allow-query {any ;};
Allow-query-cache {any ;};
Match-clients {any ;};
Match-destinations {any ;};
####################### Rndc-confgen ############### ####
Key "rndckey "{
Algorithm hmac-md5;
Secret "JkZ/MxIb8I58yefvWMkpIw = ";
};
ConTrOls {
Inet 127.0.0.1 port 953
Allow {127.0.0.1;} keys {"rndckey ";};
};
############################ END ########### #######
The above steps can be used # rdNcReload the configuration file
[Root @ localhost ~] # Vi/etc/named. rfc1912.zones // Add your own domain
Zone "ethnicity.com" IN {
Type master;
File"Named.ethnicity.com ";
Allow-upDate{None ;};
Allow-transfer {192.168.1.195;}; // This is the settings for the secondary server.
Also-policy {192.168.1.195 ;};
};
Zone "1.168.192.in-DdR. arpa "IN {
Type master;
File "named.192.168.1 ";
Allow-update {none ;};
Allow-transfer {192.168.1.195 ;};
Also-policy {192.168.1.195 ;};
};
Follow these steps to create a configuration file for your domain name
[Root @ localhost named] # cp-p localhost. zone named.ethnicity.com
[Root @ localhost named] # cp-p named. local named.192.168.1
[Root @ localhost named] # vi named.ethnicity.com // sets the correct solution.
$ TTL 86400
@ In soa dns.ethnicity.com. root.ethnicity.com .(
46; serial (d. adams)
3 H; refresh
15 M; retry
1 W;ExPiry
1D); minimum
In ns dns.ethnicity.com.
@ In mx 10 mail.ethnicity.com.
Www1 in a 192.168.1.195
Www2 in a 192.168.1.196
Www3 IN