- 论坛徽章:
- 0
|
我的系统是rhel 4.0 update 6,bind版本是9.2.4-28.el4。
我打算配置ns1.aaa.cn和ns2.aaa.cn来解析aaa.cn、bbb.cn、ccc.com.cn。
我设置一个域,解析没问题。我把第二个域用相同的方式加入named.conf,却解析不出来。请各位高手指点。我的配置文件如下:
******************* /etc/hosts ***********************************************
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
222.2.2.10 servera.aaa.cn servera
*******************************************************************************
****************** /etc/resolv.conf *******************************************
search aaa.cn
nameserver 222.2.2.10
nameserver 222.2.2.20
*******************************************************************************
****************** /etc/named.conf ********************************************
// named.conf for Red Hat caching-nameserver
//
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone "aaa.cn" IN {
type master;
file "aaa.cn.hosts";
allow-update { none; };
};
zone "bbb.cn" IN {
type master;
file "bbb.cn.hosts";
allow-update { none; };
};
zone "2.2.222.in-addr.arpa" IN {
type master;
file "222.2.2.rev";
allow-update { none; };
};
zone "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.ip6.local";
allow-update { none; };
};
zone "255.in-addr.arpa" IN {
type master;
file "named.broadcast";
allow-update { none; };
};
zone "0.in-addr.arpa" IN {
type master;
file "named.zero";
allow-update { none; };
};
include "/etc/rndc.key";
*******************************************************************************
****************** /var/named/aaa.cn.hosts ***********************************
$TTL 86400
@ IN SOA ns1.aaa.cn. root.aaa.cn. (
20080730001 ;serial
3600 ; refresh
600 ; retry
604800 ; expire
3600 ; minimum TTL
)
;
;Nameservers
;
@ IN NS ns1.aaa.cn.
@ IN NS ns2.aaa.cn.
;
ns1 IN A 222.2.2.10
ns2 IN A 222.2.2.20
;
;Domain Mail Handlers
;
@ IN MX 10 mail.aaa.cn.
;
;Hosts in order
;
servera IN A 222.2.2.10
serverb IN A 222.2.2.20
www IN CNAME serverb.aaa.cn.
mail IN CNAME serverb.aaa.cn.
test IN CNAME serverb.aaa.cn.
*******************************************************************************
****************** /var/named/bbb.cn.hosts ***********************************
$TTL 86400
@ IN SOA ns1.aaa.cn. root.aaa.cn. (
20080730001 ;serial
3600 ; refresh
600 ; retry
604800 ; expire
3600 ; minimum TTL
)
;
;Nameservers
;
@ IN NS ns1.aaa.cn.
@ IN NS ns2.aaa.cn.
;
ns1 IN A 222.2.2.10
ns2 IN A 222.2.2.20
;
;Domain Mail Handlers
;
@ IN MX 10 mail.bbb.cn.
;
;Hosts in order
;
servera IN A 222.2.2.10
serverb IN A 222.2.2.20
www IN CNAME serverb.bbb.cn.
mail IN CNAME serverb.bbb.cn.
test IN CNAME serverb.bbb.cn.
*******************************************************************************
****************** /var/named/222.2.2.rev **********************************
$TTL 86400
@ IN SOA ns1.aaa.cn. root.aaa.cn. (
20080730 ; serial
3600 ; refresh
600 ; retry
604800 ; expire
3600 ; ttl
)
;
;Nameservers
@ IN NS ns1.aaa.cn.
@ IN NS ns2.aaa.cn.
;
10 IN PTR servera.aaa.cn.
20 IN PTR serverb.aaa.cn.
10 IN PTR ns1.aaa.cn.
20 IN PTR ns2.aaa.cn.
******************************************************************************* |
|