centons 7.9 安装bin.dns 建立智能dns ,针对不通的网段解析,返回不同的IP地址
1.根据view 建立一个域名in.maxim-group.com,dns可以正常根据IP地址不通,分别解析并返回不同的IP地址
2.但是在同一台DNS建立第二个bd.maxim-group.com域名时(代码一致,只是域名不一样而已),不能正常返回第二个域名的IP地址 ,但是第二个域名与第一个域名配置一样.
3.针对不通域相对于的A记录文件已经修改
view "zj-in" {
match-clients { 192.168.192.0/24;172.31.16.0/24;192.168.8.0/21;192.168.20.0/22; };
zone "in.maxim-group.com" { type master; file "in.maxim-group.com.lan.zone"; };
};
view "all-in" {
match-clients { any; };
zone "in.maxim-group.com" { type master; file "in.maxim-group.com.wan.zone"; };
};
/*以下为孟加拉子域 bd.maxim-group.com根据来源不通返回结果不同,策略设置/
view "zj-bd" {
match-clients { 192.168.192.0/24;172.31.16.0/24;192.168.8.0/21;192.168.20.0/22; };
zone "bd.maxim-group.com" { type master; file "bd.maxim-group.com.lan.zone"; };
};
view "all-bd" {
match-clients { any; };
zone "bd.maxim-group.com" { type master; file "bd.maxim-group.com.wan.zone"; };
};
以下为A记录对应文件
[root@DNS var]# cd named/
[root@DNS named]# ls
bd.maxim-group.com.lan.zone chroot data dyndb-ldap in.maxim-group.com.wan.zone named.empty named.loopback
bd.maxim-group.com.wan.zone chroot_sdb dynamic in.maxim-group.com.lan.zone named.ca named.localhost slaves
[root@DNS named]# more in.maxim-group.com.lan.zone
$TTL 1D
@ IN SOA @ in.maxim-group.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 192.168.14.14
t100 A 192.168.56.10
t100rpt A 192.168.56.11
[root@DNS named]#
[root@DNS named]# more bd.maxim-group.com.lan.zone
$TTL 1D
@ IN SOA @ bd.maxim-group.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 192.168.14.14
t100 A 192.168.32.10
t100rpt A 192.168.32.11
[root@DNS named]#
[root@DNS etc]# nslookup
server 192.168.14.14
Default server: 192.168.14.14
Address: 192.168.14.14#53
t100.in.maxim-group.com
Server: 192.168.14.14
Address: 192.168.14.14#53
Name: t100.in.maxim-group.com
Address: 192.168.56.10
t100.bd.maxim-group.com
Server: 192.168.14.14
Address: 192.168.14.14#53
** server can't find t100.bd.maxim-group.com: NXDOMAIN
现在郁闷找不到原因了希望能否给出方法谢谢 必有悬赏
yu.bai@maxim-group.com
一台智能dns,可以自动解析多个域名.