LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 988|回复: 1

配置从DNS服务器,有问题.

[复制链接]
发表于 2003-7-3 11:56:09 | 显示全部楼层 |阅读模式
实验环境: 两台RH8.0. 其一:IPaddress : 192.168.0.254,其二:ipaddress: 192.168.0.2:

服务器的相关文件:
/etc/named.conf  文件内容:
options {
        directory "/var/named";
        forwarders { 210.35.88.5; 210.35.99.3; };
        //forward only;
        //allow-query { 192.168.0/24; };
        //allow-transfer { 192.168.0/24; };
};

zone "." {
        type hint;
        file "named.ca";
};

zone "localhost" {
        type master;
        file "localhost.zone";
};

zone "0.0.127.in-addr.arpa" {
        type master;
        file "named.local";
};

zone "example1.com" {
        type master;
        file "db.example1";
};

zone "0.168.192.in-addr.arpa" {
        type master;
        file "db.192.168.0.254";
};

/etc/hosts  文件内容:
127.0.0.1        localhost.localdomain        localhost
192.168.0.254        server1.example.com        server1

/etc/resolve  文件内容:
search example1.com
nameserver 192.168.0.254

说明:主DNS服务器可以工作,host  www.example1.com能够解析出:192.168.0.254
host station2.exmaple2.com能够解析出:192.168.0.2

从服务器的相关配置文件:
/etc/named.conf 文件内容:
options {
        directory "/var/named";
        forwarders { 192.168.0.254; };
        forward only;
};

zone "." {
        type hint;
        file "named.ca";
};

zone "localhost" {
        type master;
        file "localhost.zone";
};

zone "0.0.127.in-addr.arpa" {
        type master;
        file "named.local";
};

zone "example1.com" {
        type slave;
        masters { 192.168.0.254; };
        file "db.example1-slave";
};

zone "0.168.192.in-addr.arpa" {
        type slave;
        masters { 192.168.0.254; };
        file "db.192.168.0-slave";
};

/etc/hosts 文件内容:
127.0.0.1                localhost localhost.localdomain

/etc/resolv.conf
search example1.com
nameserver 192.168.0.2

说明:当service  named restart时,/var/named/ 下,无db.example1-slave和db.192.168.0-slave生成

从/var/log/message中,最后有下列显视:
Jul  3 11:52:05 station2 named[2045]: shutting down: flushing changes
Jul  3 11:52:05 station2 named[2045]: stopping command channel on 127.0.0.1#953
Jul  3 11:52:05 station2 named[2045]: no longer listening on 127.0.0.1#53
Jul  3 11:52:05 station2 named[2045]: no longer listening on 192.168.0.2#53
Jul  3 11:52:05 station2 named[2042]: exiting
Jul  3 11:52:05 station2 named[2087]: starting BIND 9.2.1 -u named
Jul  3 11:52:05 station2 named[2087]: using 1 CPU
Jul  3 11:52:05 station2 named[2090]: loading configuration from '/etc/named.conf'
Jul  3 11:52:05 station2 named[2090]: no IPv6 interfaces found
Jul  3 11:52:05 station2 named[2090]: listening on IPv4 interface lo, 127.0.0.1#53
Jul  3 11:52:05 station2 named[2090]: listening on IPv4 interface eth0, 192.168.0.2#53
Jul  3 11:52:05 station2 named[2090]: command channel listening on 127.0.0.1#953
Jul  3 11:52:05 station2 named[2090]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
Jul  3 11:52:05 station2 named[2090]: zone localhost/IN: loaded serial 42
Jul  3 11:52:05 station2 named: named startup succeeded
Jul  3 11:52:05 station2 named[2090]: running
Jul  3 11:52:20 station2 named[2090]: zone 0.168.192.in-addr.arpa/IN: refresh: failure trying master 192.168.0.254#53: timed out
Jul  3 11:52:21 station2 named[2090]: zone example1.com/IN: refresh: failure trying master 192.168.0.254#53: timed out


问题,为什么会这样?是哪个配置文件的问题?
 楼主| 发表于 2003-7-3 14:53:11 | 显示全部楼层
我知道为什么了:
因为主DNS服务器的防火墙打开了,禁止从DNS服务器去COPY它的数据库.
关闭主DNS服务器的防火墙,问题就解决了.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表