Configure DNS experiment with bind

Source: Internet
Author: User

Use bind to configure DNS Experiment 1. experiment environment: Red Hat Enterprise Linux Server release 5.6 Host name www.2cto.com IP system version Host role%0119%2.111oel5.6server%02192.168.2.112oel5.6client%03192.168.2.113oel5.6client ..... Www.2cto.com configuration Description: The NDS server is deployed on the slave 01 (master) node, and the host names of slave 01, slave 02, and slave 03 are parsed. 2. install and configure DNS1. install bind and caching-nameserver software packages. Because the unregistered OEL version is used, yum cannot install bind software online. Install the following bind package, if it is missing, you can find and install [root @ brief 01 ~] on the installation disk. # Rpm-qa | grep bindbind-utils-9.3.6-16.P1.el5ypbind-1.19-12.el5bind-chroot-9.3.6-16.P1.el5bind-9.3.6-16.P1.el5bind-libs-9.3.6-16.P1.el5bind-libbind-devel-9.3.6-16.P1.el5bind-devel-9.3.6-16.P1.el5bind-libs-9.3.6-16.P1.el5 [root @ brief 01 ~] # Rpm-qa | grep caching-nameservercaching-nameserver-9.3.6-16.P1.el5 2. modify the name of the bind configuration file. conf and region files are all configured in the/var/named/chroot/directory. conf is under/var/named/chroot/etc/, and the region configuration file is under/var/named/chroot/var/named/. 1) modify the configuration file named. conf [root @ users 01 ~] # Cd/var/named/chroot/etc [root @ other 01 etc] # cp-p named. caching-nameserver.conf named. conf [root @ override 01 etc] # vi named. confoptions {listen-on port 53 {any;}; -- change 127.0.0.1 to any listen-on-v6 port 53 {: 1 ;}; directory "/var/named "; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt "; memstatistics-file "/var/named/data/named_mem_stats.txt"; // Those options shocould be used carefully because they disable port // randomization // query-source port 53; // query-source-v6 port 53; allow-query {any ;}; allow-query-cache {any ;}; logging {channel default_debug {file "data/named. run "; severity dynamic ;};}; view localhost_resolver {match-clients {any ;}; -- change localhost to any match-destinations {any ;}; -- change localhost to any recursion yes; include "/etc/named. rfc1912.zones ";}; 2) modify the configuration file named. rfc1912.zones: Add the following content to the file: [root @ 000001 etc] # pwd/var/named/chroot/etc [root @ 000001 etc] # vi named. rfc1912.zones zone "licz.com" IN {// This is your own domain name type master; file "licz.com. zone "; allow-update {none ;};}; zone" created 192.in-addr. arpa "IN {// This is the reverse configuration file type master; file" 127192.in-addr. zone "; allow-update {none ;}; 3) create leonarding.com. zone and region 192.in-addr. zon region file [root @ Issue 01 etc] # cd/var/named [root @ Issue 01 named] # cp-p localdomain. zone chroot/var/named/licz.com. zone [root @ resolve 01 named] # cp-p named. local chroot/var/named 192.zone -- modify leonarding.com. zone and region 192.in-addr. zon region file [root @ login 01 named] # cd/var/named/chroot/var/named [root @ login 01 named] # vi licz.com. zone $ TTL 86400 @ in soa localhost root (42; serial (d. adams) 3 H; refresh 15 M; retry 1 W; expiry 1D ); minimum in ns localhost // Add the following forward File Content: 201701 in a 192.168.2.11111602 in a 192.168.2.000003 in a 192.168.2.113 [root @ 000001 named] # vi LIMIT 192.in-addr. zone $ TTL 86400 @ in soa localhost. root. localhost. (1997022700; Serial 28800; Refresh 14400; Retry 3600000; Expire 86400); Minimum in ns localhost. // Add the following reverse direction to the file: 111 in ptr limit 01.licz. com112 in ptr 1_02.licz. com113 in ptr defaults 03.licz.com 4) modify each node/etc/resolv. conf file [root @ resolve 01 named] # vi/etc/resolv. confnameserver 192.168.2.111 [root @ login 02 named] # vi/etc/resolv. confnameserver 192.168.2.111 [root @ 12703 named] # vi/etc/resolv. confnameserver 192.168.2.111 3. verification test [root @ other 01 etc] # nslookup> 1_01.licz. comServer: 192.168.2.111Address: 192.168.2.111 #53 Name: 255.01.licz. comAddress: 192.168.2.111> 255.02.licz. comServer: 192.168.2.111Address: 192.168.2.111 #53 Name: 255.02.licz. comAddress: 192.168.2.112> 255.03.licz. comServer: 192.168.2.111Address: 192.168.2.111 #53 Name: 255.03.licz. comAddress: 192.168.2.113 [root @ 12701 named] # ping 255.03.licz. comPING route 03.licz.com (192.168.2.113) 56 (84) bytes of data.64 bytes from route 03 (192.168.2.113): icmp_seq = 1 ttl = 64 time = 10.8 ms64 bytes from route 03 (192.168.2.113 ): icmp_seq = 2 ttl = 64 time = 0.360 ms64 bytes from 000003 (192.168.2.113): icmp_seq = 3 ttl = 64 time = 0.332 ms64 bytes from 000003 (192.168.2.113 ): icmp_seq = 4 ttl = 64 time = 0.299 ms64 bytes from 000003 (192.168.2.113): icmp_seq = 5 ttl = 64 time = 0.306 MS

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.