Implementing parent and child domains in DNS, as well as authorization and forwarding

  
        


Implementing parent and child domains in DNS, and authorizing and forwarding 1: Setting up the experimental environment

Do this experiment according to the above experimental environment 2: Still use the above experiment 192.168. 100.60 (in Beijing) created abc.com this server as the primary DNS server and parent domain, the new two Linux hosts are configured with ip addresses 192.168.100.70 and 192.168.100.80 to act as a machine in Beijing and Shanghai, and they are two 192.168.100.60 Two subdomains of this host. 3: To explain that the subdomain must be on the primary DNS server, ie 192.168.100.60, Vim /var/named/chroot/etc/named.rfc1912.zones and then add zone "bj.abc.com" IN { type master; File "bj.abc.com.db"; allow-update { none; }; }; Because the host 192.168.100.70 is also in DNS1, so join this 4: configure the data file Cp &ndash for the Beijing subdomain 192.168.100.70 ; p abc.com.db bj.abc.com.db then vim bj.abc.com.db edited as follows: $TTL 86400@ IN SOA ns.bj.abc.com. master.sina.com. ( 43 ; Serial (d. adams) 1M ; refresh 1M ; retry 1W ; expiry 1D ) ; minimum IN NS ns.bj.abc.com.ns IN A 192.168.100.60www IN A 2.2.2 .2 then save and exit wq5: modify the parent DNS server in Shanghai to modify the parent DNS server abc.com.dbVim abc.com.db and add two lines sh.abc.com. IN NS ns.sh.abc.com.ns .sh.abc.com. IN A 192.168.100.806: Configure DNS2 on the host 192.168.100.80 and also switch to cd /var/named/chroot/etcvim named.conf to modify the localhost of 15, 27, 36, 37 lines. Change to any to 7: Cd /var/named/chroot/etcVim named.rfc1912.zones insert zone "sh.abc.com" IN { type master; file "sh.abc.com.db"; allow -update { none; }; };8:Cd /var/named/chroot/var/namedCp –p abc.com.db sh.abc.com.dbVim sh.abc.com.db reads as follows: $TTL 86400 @ IN SOA ns.sh.abc.com. master.sina.com. ( 43 ; serial (d. adams)


1M ; refresh 1M ; retry 1W ; expiry 1D ) ; minimum IN NS ns.sh.abc.com.ns IN A 192.168.100.80www IN A 3.3.3.39: Test: find a host placed in the Beijing subdomain 192.168. In this area of ​​100.60, configure the IP address. Note: The DNS should be configured to 192.168.100.60. Then find a host in the area of ​​Shanghai, 192.168.100.80, configure the ip address, note: DNS should be configured to 192.168.100.80. The test result at this time is: This host in the Beijing sub-domain can successfully resolve the www servers in these three places, but in this area of ​​Shanghai, it can only be resolved to the www server on the Shanghai side, the other two wwww The server does not resolve. 10: Solve the problem that Shanghai can't resolve the other two IP addresses. Configure the forwarder to configure the unconditional forwarder Cd /var/named/chroot/etcVim named.conf on the host 192.168.100.80 and then add it in options{ }; Forwarders { 192.168.100.60; }; can also be configured with conditional forwarders Cd /var/named/chroot/etcVim named.rfc1912.zones insert zone "abc.com" IN { type forward; forwarders { 192.168 .100.60; };allow-update { none; };};11: Test again, the result of the Shanghai side can also successfully resolve the ip address of the other two places. Author “Footer's Notes&#;>





Copyright © Windows knowledge All Rights Reserved