红联Linux门户
Linux帮助

centos 5.5 dns实验故障(已解决)

发布时间:2010-12-04 23:51:23来源:红联作者:hyf320481
[i=s] 本帖最后由 hyf320481 于 2010-12-5 12:46 编辑 [/i]

我在做dns实验时检查named-conf出现了错误。 启动服务也是这个错误。 去除最下面蓝色的字,服务就可以正常启动了。

当使用view声明时,所有的区域必须在view中。是什么意思搞不明白

options {
listen-on port 53 { any; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";

// Those options should be used carefully because they disable port
// randomization
// query-source port 53;
// query-source-v6 port 53;

allow-query { any; };
allow-query-cache { any; };
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view localhost_resolver {
match-clients { any; };
match-destinations { any; };
recursion yes;
include "/etc/named.rfc1912.zones";
};

zone "benet.com" {
type master;
file "benet.com.zone";
};
zone "1.168.192.in-addr.arpa" {
type master;
file "192.168.1.rev";
};

[root@localhost etc]#
文章评论

共有 4 条评论

  1. jhasheng 于 2011-06-27 19:45:24发表:

    努力回贴挣金币!

  2. hyf320481 于 2010-12-05 12:45:31发表:

    3# bloodiron


    谢了

  3. bloodiron 于 2010-12-05 12:12:39发表:

    错误提示说的很明确了,当你使用view功能时候,所有的zone申明要写在view里面哈,还有/usr/share/doc/bindxx/下面的文档有范例,看一下就好了

    view “xx” {
    .....................
    ......................
    zone "xx"{
    ....................
    ....................
    }
    }

    最后,doc文档上有一句话:

    If named.conf contains any "view" clause, then all zones MUST be in a view.

    现在你应该ok了吧

  4. dqshur 于 2010-12-05 08:40:32发表:

    不懂,帮顶上