Master-slave replication, zone transfer for the Linux DNS service family

Source: Internet
Author: User

Objective

Objective

In the previous article has explained the cache server and forward-and-backward parsing, in this article explains how to configure the DNS master-slave server, and zone transfer, according to the previous experiment continue to complete the DNS master-slave server configuration.

DNS master-Slave server configuration requirements:

Add a Slave server with IP 192.168.1.105 for 192.168.1.192 Primary DNS Server

Only allow zone transfer from server to 192.168.1.105, other hosts prohibit transfer

Master-Slave DNS server:

Primary DNS Server (MASTERDNS): Modification and update of database;

Secondary DNS server (SLAVEDNS): Request data synchronization updates from the primary DNS server;

Cache DNS Server: It is primarily used to cache the address information of a query without taking any other work. It does not have a zone file and does not transfer data from other DNS servers. It responds to queries from the client, but is not authorized.

650) this.width=650; "title=" Untitled. png "alt=" wkiom1xqpetcex_jaadwek36wgy789.jpg "src=" http://s3.51cto.com/wyfs02/M00 /72/aa/wkiom1xqpetcex_jaadwek36wgy789.jpg "/>

Zone Transfer ( zone transfer )

The process of copying a zone file to multiple servers is called a zone transfer . It is implemented by copying the information from the zone file on the primary server to the secondary server.

Two ways to copy zone files (zone transfer):

AXFR ( full zone transfer): All zone files are copied, and the entire zone file is copied.

such as: Dig–t AXFR 51yunxuexi.club

IXFR ( Incremental zone transfer): incremental zone File replication, which replicates only the changed records in the region.

such as: Dig-t Ixfr=201508030151yunxuexi.club

Modify the master configuration file on the primary server 192.168.1.192 only allow zone transfers from the server

[Email protected] ~]# vim/etc/named.conf
zone  "51yunxuexi.club"  IN {                 type master;                 file  "51yunxuexi.club.zone";                 allow-transfer { 192.168.1.105; };   #添加只允许192.168.1.105 for zone transfer                  notify    yes;                    #开启通知, notifies the server to synchronize};zone  when the master server is updated 1.168.192.in-addr.arpa " IN {                 type master;                 file  "192.168.1.Zone ";                 allow-transfer { 192.168.1.105; };                 notify    yes; }; Check the syntax and restart [[email protected ] ~]# named-checkconf[[email protected] ~]#[[email protected] ~]# /etc/ Init.d/named  reload

Modify 51yunxuexi.club.zone on the primary server 192.168.1.192

[[email protected] ~]# cat /var/named/51yunxuexi.club.zone$ttl      600@       IN      SOA      ns1.51yunxuexi.club.    admin.51yunxuexi.club.  (                                           2015080304    #每次修改配置文件则需要修改版本号                                           1H                                          5m                                          2D                                           6H )         in      ns       ns1        IN       NS      ns2                           # Add NS and A records from the server         in      mx       10      mailns1     in       A       192.168.1.192ns2     IN       a       192.168.1.105mail    in       A       192.168.1.104www      IN      A        192.168.1.106www     in      a        192.168.1.103ftp     in      cname    wwwpop3    IN      A        192.168.1.107[[email protected] ~]# 

Modify 192.168.1.zone on the primary server 192.168.1.105

[[email protected] ~]# cat /var/named/192.168.1.zone$ttl     600@        IN      SOA      ns1.51yunxuexi.club.    admin.yunxuexi.club.  (                                           2015080304                                          1H                                          5m                                          2D                                          6H )          IN      NS       Ns1.51yunxuexi.club.        in      ns       ns2.51yunxuexi.club.192     IN       ptr     ns1.51yunxuexi.club.105     in      &nbsP ptr     ns2.51yunxuexi.club.     #添加从服务器的NS和A记录的反向解析106       IN      PTR      www.51yunxuexi.club.104     in      ptr      mail.51yunxuexi.club.103     IN       Ptr     www.51yunxuexi.club. [[email protected] ~]#

Modifying the master configuration file from the server 192.168.1.105

[[email protected] named]# vim /etc/named.confzone  "51yunxuexi.club"  IN {                 type  slave;                            #从服务器类型                  file  "Slaves/51yunxuexi.club.zone";                 masters {  192.168.1.192; };          #  defining a master server                  allow-transfer {  none; };             #不允许区域传送};zone   "1.168.192.in-addr.arpa"  in {                type slave;                 file  " Slaves/192.168.1.zone ";                 masters { 192.168.1.192; };                 allow-transfer { none; };}; " /etc/named.conf " 65l, 1687c
Check the syntax and restart [[email protected] slaves]# Named-checkconf[[email protected] slaves]#[[email protected] slaves]#/etc/ Init.d/named Reload

View logs to determine if they were successful

650) this.width=650; "title=" log. png "alt=" wkiom1xqu6nqxfmhaaqk16brusw825.jpg "src=" http://s3.51cto.com/wyfs02/M01/ 72/ab/wkiom1xqu6nqxfmhaaqk16brusw825.jpg "/>

View files to be transferred in slaves [[email protected] named]# Ls/var/named/slaves/192.168.1.zone 51yunxuexi.club.zone[[email protected ] named]#

Parsing tests from the server

650) this.width=650; "title=" Ces.png "alt=" wkiom1xqvo_yoyehaakaavlp8mo762.jpg "src=" http://s3.51cto.com/wyfs02/M01 /72/ab/wkiom1xqvo_yoyehaakaavlp8mo762.jpg "/>

This article is from a "self-made" blog, be sure to keep this source http://baishouqijia.blog.51cto.com/2580498/1692032

Master-slave replication, zone transfer

for the Linux DNS service family

Related Article

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.