DNS domain Name service and build cache DNS server detailed (2)

Source: Internet
Author: User

DNS domain Name service and build cache DNS server detailed (2)

1.DNS Service Installation: BIND, full name is Berkeley Internet name Domain, this software is maintained by ISC

/etc/named.conf: The main function is to define the working properties and areas of the bind process

/etc/rndc.key: Full name Remote name Domain Controller, primary storage key file

/etc/rndc.conf: Configuration information:

/var/named/: Mainly storage area data files

/etc/rc.d/init.d/named: Service script file

Bind-chroot: For security, change the root directory of the named process

/var/named/chroot/: This directory has the following main files

etc/named.conf

Etc/rdnc.key

Sbin/named

var/named/

Protocol and port for 2.DNS listening: 53/udp,53/tcp,953/tcp (RNDC Port)

3. The regional zone write format is as follows:

Zone "Zone NAME" in {

Type {master or slave or hint or forward};

File "zone data Files";

};

Where: Master represents the primary Dns,slave representative from Dns,hint on behalf of the root server, forward on behalf of the forwarding server

3.1. The primary DNS server zone file format is as follows:

Assume that domain is Willow.com.IP 172.16.1.1, write out the primary DNS server zone file

Zone "Willow.com" in {

Type master;

File "Willow.com.zone";

};

3.2. The zone file format from the DNS server is as follows:

assume that domain is willow.com. The IP of the primary DNS is 172.16.1.1, write out the zone file from the DNS server

Zone "Willow.com" in {

Type slave;

File "Slaves/willow.com.slave.zone";

};

4.named-checkconf, syntax error in detecting named.conf configuration file

Name-checkzone, syntax error in detecting zone file

5.DNS Query tool:

5.1.dig: Format dig-t type FQDN [@Remote_DNS_Server]

-T: Specifying resource records

FQDN: the host to query

@Remote_DNS_Server: Which DNS server to query from, default to local DNS server

-x: Resolve the FQDN backwards based on IP address

such as: Dig-t NS sina.com

Dig-t A www.sina.com

Dig-t NS sina.com @8.8.8.8

5.2.HOST-T type FQDN: Parse result of query name

Host-t NS Sina.com

5.3.nslookup: Interactive

Server IP Specifies the DNS server

Set Q=rt the resource record type of the specified query

FQDN specifies which host to query

6. Manually deploy a DNS cache server, here we take the DNS software BIND97 as an example

6.1.yum Install Bind97

6.2.mv/etc/named.conf/etc/named.conf.bak renaming and backing up configuration files from the source

6.3.VIM/ETC/NAMED.CONF Create a new profile manually, add the following:

Options {

Directory "/var/named";

};

Zone "." in {

Type hint;

File "named.ca";

};

Zone "localhost" in {

Type master;

File "Named.localhost";

};

Zone "0.0.127.in-addr.arpa" in {

Type master;

File "Named.loopback";

};

6.4. Note that the named.conf owner, group and permissions, manually created named.conf files need to make corresponding changes

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/80/22/wKioL1c5VfKDce7KAABy0rR0olE882.jpg "title=" B22.jpg "alt=" Wkiol1c5vfkdce7kaaby0rr0ole882.jpg "/>

Chown root.named/etc/named.conf

chmod 640/etc/named.conf

6.5. Check for a syntax error for a file that you just created named.conf
Named-checkconf

Named-checkzone "."/var/named/named.ca

Named-checkzone "localhost"/var/named/named.localhost

Named-checkzone "0.0.127.in-addr-arpa"/var/named/named.loopback

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/80/22/wKioL1c5Vz7idtI4AAHPzESzwk8477.jpg "title=" B22.jpg "alt=" wkiol1c5vz7idti4aahpzeszwk8477.jpg "/> 6.6. Start the named service and view the logs to determine that the DNS service is healthy

Service named Start services

Tail/var/log/messages Viewing logs

NETSTAT-TUNLP | Grep:53 Viewing port startup status

Chkconfig--list named

Chkconfig named on boot self-starting DNS service

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/80/25/wKiom1c5WfHDJp_DAAOLIZ8Vv0A455.jpg "title=" B22.jpg "alt=" wkiom1c5wfhdjp_daaoliz8vv0a455.jpg "/> This cache server established OK

6.7. Modify client DNS to specify the cache server to see if it can be resolved

Vim/etc/resolv.conf

This article is from the "Xavier Willow" blog, please be sure to keep this source http://willow.blog.51cto.com/6574604/1773880

DNS domain Name service and build cache DNS server detailed (2)

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.