Easy to build master-slave DNS

Source: Internet
Author: User
Tags mail resource firewall

Forward Resolution:

IP--> FQDN (host name)

FQDN--> IP

Common types of DNS servers:

Primary DNS server: Data modification

Secondary DNS server: Requesting data synchronization

Caching DNS servers

Transponder

In the database, each entry is called a resource record (Resource RECORD,RR)

Format of resource records:

TTL 600;

NAME [TTL] in RRT VALUE

Www.magedu.com. In A 1.1.1.1

1.1.1.1 in PTR www.nagedu.com.

Resource record Type (RT):

1. SOA (start of authority): Start authorization record

ZONE NAME TTL in SOA FQDN Administrator_mailbox (

Serial number

Refresh Time

Retry Retry Time

Expire Expiration Time

Na ttl) The TTL value of the negative answer

Time Unit: M (minutes), H (Hours), D (days), W (week), default unit is seconds

Mailbox format: admin@magedu.com-written as-> admin.magedu.com

Magedu.com in SOA ns1.magedu.com. Admin.magedu.com. (

2013040101 (maximum 10 digits)

1H

5M

1W

1D)

2. NS (name server);D omain name--> FQDN name server that identifies the server name of a domain

Magedu.com in NS ns.magedu.com

Ns.magedu.com in A 1.1.1.2

3, MX (mail exchanger): ZONE NAME-->FQDN Mail Exchanger

ZONE NAME TTL in MX pri (level) VALUE

Priority: 0-99, the smaller the number the higher the level

Magedu.com in MX mail.magedu.com

Mail.magedu.com in A 1.1.1.3

4, A (address): Fqdn-->ipv4 record host name is IPV4

5, Aaaa:fqdn-->ipv6 record host name is IPV6

6, PTR (pointer): IP-->FQDN reverse resolution pointer record

7, CNAME (Canonical NAME): Fqdn-->fqdn, alias Record

Www2.magedu.com in CNAME www.magedu.com.

Type of zone transfer:

Full zone transfer: AXFR

Incremental zone transfer: IXFR

Type of zone:

Main type: Master

From area: Slave

Tip area: Hint

Forwarding Area: Forward

Using BIND97 for the creation of DNS servers

BIND97: Configuration file

/etc/named.conf

Work properties for the bind process

Definition of the area

/etc/rndc.key

Rndc:renote Name Domain Controller key File

Configuration information:/etc/rndc.conf

/var/named/

Zone data file name can be defined by itself

/etc/rc.d/init.d/named

{Start|stop|restart|status|reload}

The approximate steps of using BIND97 to build a DNS server:

  First, configure the primary DNS server

1, installation bind97:

2, write the main configuration file/etc/named.conf (the owner and the group is root.named, with 640 privileges)

The format is:

Here is only a reference template, show the format, the specific content, please write together with the actual situation.

3, write forward parsing file, write reverse parsing file (the owner and the group for Root.named, with 640 privileges)

The forward parsing file format is:

The reverse parsing file format is:

Here is only a reference template, show the format, the specific content, please write together with the actual situation.

4, write the completion of the use of named-checkconf command for grammar checking. (Notice to modify the owner and group, the permission is 640)

 Second, configure from DNS server

1, installation bind97: #yum install bind97 bind97-utils bind97-lib

2, write the main configuration file/etc/named.conf (the owner and the group is root.named, with 640 privileges)

The format is:

3, modify the owner, the group and permissions, and the grammar check

4, adjust master and slave server time, and close SELinux firewall

#setenforce 0//means to turn off the firewall//setenforce 1 means to open the firewall

5, check the log to verify that the master and slave server to complete data synchronization (log storage location for/var/log/messages)

6, to view the synchronized data files, and the main server's data file is the same as the completion of synchronization

At this point, the simple DNS master, from the server even if the build completed.

Command Checonfig--list named//See if named is running

If you want DNS to boot up next time. You only need to enter

#chkconfig named on

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.