Linux builds DNS two multi-domain name resolution
Continue on an article
SVR5 Server CENTTOS6 192.168.4.5
pc205 Client CENTOS6 192.168.4.405
Domain name
hellc.cn
hellc.com.cn
----------------------------------------
Add hellc.cn Zone (append in profile)
[Email protected] ~]# vim/etc/named.conf
Options {
Directory "/var/named";
};
Zone "hellc.cn" in {
Type master;
File "Hellc.cn.zone";
};
Zone "hellc.com.cn" in {
Type master;
File "Hellc.com.cn.zone";
};
....
Establishing the Parsing database (zone file)
Depending on the path and name specified in the named.conf configuration
[Email protected] ~]# Vim/var/named/hellc.cn.zone
$TTL 86400
@ in SOA @ root.hellc.cn. (
2015052201. Update serial number
4H; Refresh Time
15M; retry Interval
4H; timeout time
1D; time to live for invalid records
)
@ in NS www.hellc.cn. ; The FQDN of the DNS server in this region
www in A 192.168.4.5; The IP address of the DNS server in the region
BBS in A 192.168.4.205; other parsing records
[Email protected] ~]# Vim/var/named/hellc.com.zone
$TTL 86400
@ in SOA @ hellc.com.cn. (
2017052401
4H
15M
4H
1D
)
@ in NS www.hellc.com.cn.
www in A 202.98.192.67
Music in A 202.08.198.168
Restart named service
Client modifies DNS for server-side IP
Detect if parsing is correct
nslookup query www.hellc.com.cn parsing result should be 192.168.4.5
nslookup query www.hellc.com.cn parsing result should be 202.98.192.67
Linux builds DNS two multi-domain name resolution