Rhel Learning from DNS configuration

Source: Internet
Author: User
Tags nameserver

From the server you can crawl the specified zone data file from the primary server to the backup parsing record and load balancing role.

Primary DNS server ip:192.168.16.20

From the DNS server ip:192.168.16.30

1. Modify the master server zone configuration file

[Email protected] ~]# vim/etc/Named.rfc1912.zones};//Named.rfc1912.zones:////provided by the Red Hat caching-nameserver Package////ISC BIND named zone configuration for zones recommended by//RFC 1912 Section 4.1:localhost TLDs and address zones// andHttp://www.ietf.org/internet-drafts/draft-ietf-dnsop-default-local-zones-02.txt//(c) R W Franks////see/usr/share/doc/bind*/sample/for example named configuration files.//Zone"Localhost.localdomain"In {type master; file "Named.localhost"; allow-update {none;};}; Zone"localhost"In {type master; file "Named.localhost"; allow-update {none;};}; Zone"1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa"In {type master; file "Named.loopback"; allow-update {none;};}; Zone"1.0.0.127.in-addr.arpa"In {type master; file "Named.loopback"; allow-update {none;};}; Zone"0.in-addr.arpa"In {type master; file "Named.empty"; allow-update {none;};}; Zone"kernel.org"In {type master; file "Kernel.org.zone"; allow-update {192.168.16.30; }; Change "Any" to allow the server IP address "192.168.16.30" to update the zone information;

2. Modify the configuration file from the server zone

[[email protected] slaves]#!Vvim/etc/Named.rfc1912.zones//Zone"Localhost.localdomain"In {type master; file "Named.localhost"; allow-update {none;};}; Zone"localhost"In {type master; file "Named.localhost"; allow-update {none;};}; Zone"1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa"In {type master; file "Named.loopback"; allow-update {none;};}; Zone"1.0.0.127.in-addr.arpa"In {type master; file "Named.loopback"; allow-update {none;};}; Zone"0.in-addr.arpa"In {type master; file "Named.empty"; allow-update {none;};}; Zone"kernel.org"In {type slave; "Slave" means from server Masters {192.168.16.20;}; "192.168.16.20" The IP address of the primary serverfile "Slaves/kernel.org.zone"; Crawl over the area information file saved in "/var/named/slaves/kernel.org.zone"};

3, verify from DNS server

Information files fetched from the server.

ls /var/named/slaves/             through "from server: 192.168.16.30" authentication  ~ls /var/named/slaves/

DNS is configured from the server IP address on another host by querying the "www.kernel.org" information from the server.

[[email protected] ~]# vim/etc/resolv.conf through "Client host: 192.168.16.40" authentication

# Generated by NetworkManager
NameServer 192.168.16.30

[[Email protected] ~]# dig www.kernel.org; <<>> DiG9.9.4-redhat-9.9.4- -. EL7 <<>>www.kernel.org; global options:+cmd;; Got answer:;; ->>header<<-Opcode:query, Status:noerror,ID:4310; ; flags:qr AA Rd RA; QUERY:1, ANSWER:1, authority:1, ADDITIONAL:2;; OPT pseudosection:; Edns:version:0, Flags:; Udp:4096;;            QUESTION section:;www.kernel.org. in A;;        ANSWER SECTION:www.kernel.org. 86400In A192.168.16.20;;        Authority SECTION:kernel.org. 86400In NS ns.kernel.org.;;        ADDITIONAL SECTION:ns.kernel.org. 86400In A192.168.16.20;; Query Time:3msec;; SERVER:192.168.16.30# -(192.168.16.30)//dns server address is "192.168.16.30";; When:thu Feb One  -: -:xxEst .;; MSG SIZE RCVD: the

Rhel Learning from DNS configuration

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.