Example of a master-slave server configuration for Linux DNS (ii)

Source: Internet
Author: User
Tags domain transfer

In the case where the primary DNS server is functioning properly, configure the slave DNS server on a different server with the same: operation is as follows:

We create here DNS from the server is the experiment, no registration, the actual work needs to register to normal use, understand!! Hehe you know!

650) this.width=650; "title=" 7777.jpg "alt=" wkiom1pimz6c7g86aadvn41a2zu966.jpg "src=" http://s3.51cto.com/wyfs02/ M00/44/ae/wkiom1pimz6c7g86aadvn41a2zu966.jpg "/>

from the server configuration prerequisite Debugging : (The network must be the same, children know!) )


1. Unified Time
#ntpdate 172.16.0.1-----Specify the time server address (instant and new Time)
#corntab-E----------------------Scheduled tasks can be set up for periodic updates
*/3 * * * */sbin/ntpdate 172.16.0.1 &>/dev/null


2. Ensure that the BIND software version cannot be lower than the main server version
[[email protected] ~]# Yum Info bind-----View version guaranteed that the version from the server must be no less than the major version, otherwise it cannot be synchronized


Specific configuration actions


1. Add an NS record to the domain name registrar

Because if you want to use, you need to go to the domain registrar to register, and they need to specify the NS record
That means you have several DNS master-slave servers, you need to specify several NS records in the Registrar and the corresponding a record (that is, the parent domain of the DNS) is as follows:
Ning.com. In NS ns.ning.com.
Ning.com. In NS ns2.ning.com.
Ns.ning.com. In A 172.16.3.1
Ns2.ning.com. In A 172.16.3.10

2, the main parsing library needs to add the specified from the Server zone address


Main forward parsing:


#vim/var/named/ning.com.zone
$TTL 3600
$ORIGIN ning.com.---------function to specify the zone name, you can omit the designation for each FQDN below
@ in SOA ns.ning.com. Ning.qq.com. (
20140806----------If the library configuration file changes, you need to add a version number of 1 (larger than the original version number on the line), used to synchronize from the server.
2H
10M
7D
7D)
In NS NS
In MX ten Mail
In NS ns2-----------specified from server zone name
NS2 in A 172.16.3.10------------specified from the server IP address
NS in A 172.16.3.1
Mail in A 172.16.3.3
www in A 172.16.3.4
QQ in A 172.16.3.5
Liang in A 172.16.3.20
Hong in CNAME Mail


Main reverse parsing:


[Email protected] named]# Vim/var/named/172.16.3.zone
$TTL 3600
$ORIGIN 3.16.172.in-addr.arpa.
@ in SOA ns.ning.com. Ning.qq.com. (
20140804
2H
10M
7D
7D)
In NS ns.ning.com.
In NS ns2.ning.com.-----------Specify from the server zone name
1 in PTR ns.ning.com.
In PTR ns2.ning.com.------------Specifies the IP address from the server
3 in PTR mail.ning.com.
4 in PTR www.ning.com.
5 in PTR qq.ning.com.


[Email protected] run]# named-checkzone "ning.com."/var/named/ning.com.zone---Check the parsed library configuration file that you just modified
Zone ning.com/in:loaded Serial 20140806
Ok
After the configuration has changed, we need to load it here so that we can update #rndc from the server reload

3. From the server configuration file


Prerequisite Configuration Environment: Bind installation, etc., will not be described here.


to parse from a forward direction :


[[Email protected]]# vim/etc/named.rfc1912.zones (add content to this file)
Zone "ning.com." In {-------------The zone name here must match the name of the server to be made on the primary server
type slave;---------------------------specified from server type
File "Slaves/ning.com.zone";---------------specify the files to which to synchronize the data from the server, where the name must be the same as (the primary server)
Masters {172.16.3.1;}; -----------------Specify the primary server address for synchronization (multiple-finger, several servers)
};
Parse from reverse:
Zone "3.16.172.in-addr.arpa" in {
Type slave;
File "Slaves/172.16.3.zone";
Masters {172.16.3.1;};
};
[[Email protected]]# named-checkconf--------Check the configuration file you just modified
#rndc Reload


4, Test simple query: (in this do not say command use,, positive and negative analysis under the specific instructions)


To test forward parsing:


# dig-t AXFR ning.com @172.16.3.10-----can view the multi-resolution information under the Ning.com domain, whether synchronization
#tail/var/log/messages------View log information.
5 18:20:05 localhost named[18186]: client 172.16.3.10#44547 (ning.com): Transfer of ' ning.com/in ': AXFR started---full zone Domain transfer
5 18:20:05 localhost named[18186]: client 172.16.3.10#44547 (ning.com): Transfer of ' ning.com/in ': AXFR ended
[[email protected] ~]# dig-t A liang.ning.com @172.16.3.10---Here the IP is from the service IP, you understand!
[Email protected] ~]# host-t A liang.ning.com 172.16.3.10


Test Reverse resolution:


[[email protected] ~]# tail/var/log/messages------View the log information.
5 19:29:57 localhost named[18186]: client 172.16.3.10#39276 (3.16.172.IN-ADDR.ARPA): Transfer of ' 3.16.172.IN-ADDR.A Rpa/in ': AXFR started
5 19:29:57 localhost named[18186]: client 172.16.3.10#39276 (3.16.172.IN-ADDR.ARPA): Transfer of ' 3.16.172.IN-ADDR.A Rpa/in ': AXFR ended
[Email protected] ~]# dig-t AXFR 3.16.172.in-addr.arpa @172.16.3.10---------- You can view all the parsing information under the 3.16.172.IN-ADDR.ARPA domain, whether it is synchronized

This article is from the "struggling People" blog, please be sure to keep this source http://wodemeng.blog.51cto.com/1384120/1536626

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.