配置dns不知问题在哪,请高手帮忙

配置dns不知问题在哪,请高手帮忙

我第一次配置dns 一直无法配置成功,以下我的配置文件,请帮忙看看问题在哪
文件named.conf
// generated by named-bootconf.pl

options {
        directory "/var/named";
        /*
         * 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;
        ile "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 "sundyhuang.com" IN {
       type master;
       file "sundyhuang.com.db";
       allow-update {none;};
};
zone "40.9.10.in-addr.arpa" IN {
      type master;
      file "db.10.9.40.50";
      allow-update {none;};
};
include "/etc/rndc.key";



文件sundyhuang.com.db

$TTL86400
@IN SOA www.sundyhuang.com. sundyhuang.com.(
2007032801;Serial
28800;Refresh
14400;Retry
3600000;Expire
86400);Minimum
IN NS www.sundyhuanng.com.
localhost IN A 127.0.0.1
www.IN A 10.9.40.50


文件db.10.9.40.50

$TTL86400
@IN SOA www.sundyhuang.com. sundyhuang.com. (
2007032801;Serial
28800;Refresh
14400;Retry
3600000;Expire
86400);Minimum
IN NS www.sundyhuang.com.
10.9.40.50 IN PTR www.sundyhuang.com.



文件resolv.conf
nameserver 202.96.128.86
domain sundyhuang.com
search sundyhuang.com


文件hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1        localhost.localdomain        localhost
10.9.40.50        jyhuang.sundyhuang.com        jyhuang


文件network
NETWORKING=yes
HOSTNAME=jyhuang.sundyhuang.com


文件ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
IPADDR=10.9.40.50
NETMASK=255.255.0.0
USERCTL=no
PEERDNS=no
GATEWAY=10.9.40.100
TYPE=Ethernet
NETWORK=10.9.0.0
BROADCAST=10.9.255.255
我把resolv.conf修改了一下
nameserver  10.9.40.50//本机的ip
domain sundyhuang.com
search sundyhuang.com

用nslookup 测试时还是不成功,出现如下提示
>www.sundyhuang.com
;; connection timed out ;no servers could be reached
>

我查了很多资料,named.conf文件的配置应该没有问题啊
请你们帮帮忙吧
估计是你的版本对空格的要求太严格了, 你用的是什么版本,是不是在VMARE上做的呢???
是的,在VMARE4.5.2 build-8848
以下是我的执行结果,请帮帮看下,
#ps -aux|grep named
#root 2888 10.0  0.2 4776  628  pts/0 D 14:01 0:00 gred named
#dig www.sundyhuang.com@10.9.40.50
;<<>>DiG 9.2.1 <<>>www.sundyhuang.com@10.9.40.50
;;global options;printcmd
;;connection timed out;no servers could be reached
#

我实在是纳闷啊,为什么会不行呢
现在的情况如下,请帮我看看问题在哪吧
#nslookup
>www.sundyhuang.com
Server:10.9.40.50
Address:10.9.40.50#53
**server can't find www.sundyhuang.com:SERVFAIL
>10.9.40.50
Server:10.9.40.50
Address:10.9.40.50#53
**server can't find 50.40.9.10.in-addr.arpa:SERVFAIL
现在的情况如下,请帮我看看问题在哪吧
#nslookup
>www.sundyhuang.com
Server:10.9.40.50
Address:10.9.40.50#53
**server can't find www.sundyhuang.com:SERVFAIL
>10.9.40.50
Server:10.9.40.50
Address:10.9.40.50#53
**server can't find 50.40.9.10.in-addr.arpa:SERVFAIL
以下是我最新的文件配置,请各位帮忙看一下问题到底出在哪吧


文件named.conf

// generated by named-bootconf.pl

options {
        directory "/var/named";
        version "9.2.1-16";        
/*
         * 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 "sundyhuang.com" IN {
       type master;
       file "sundyhuang.com.db";
       allow-transfer {
       10.9.40.50;};
};
zone "50.40.9.10.in-addr.arpa" IN {
      type master;
      file "50.9.40.10.in-addr.arpa";
      allow-update {none;};
};
include "/etc/rndc.key";



文件sundyhuang.com.db

$TTL        86400
sundyhuang.com        IN        SOA        dns.sundyhuang.com.        sundyhuang.com.(
2007032801;Serial
28800;Refresh
14400;Retry
3600000;Expire
86400);Minimum
sundyhuang.com        IN        NS        dns.sundyhuanng.com.
dns.sundyhuang.com        IN        A        10.9.40.50
localhost        IN        A        127.0.0.1
www        IN        A        10.9.40.50



文件50.40.9.10.in-addr.arpa

$TTL        86400
@IN        SOA        dns.sundyhuang.com.        sundyhuang.com. (
2007032801;Serial
28800;Refresh
14400;Retry
3600000;Expire
86400);Minimum
@IN        NS        www.sundyhuang.com.
50        IN        PTR        www.sundyhuang.com.



tar -n 30 /var/log/messages   的执行结果

Mar 29 18:11:38 jyhuang named[3671]: loading configuration from '/etc/named.conf'
Mar 29 18:11:38 jyhuang  3月 29 18:11:38 named: named 启动 succeeded
Mar 29 18:11:38 jyhuang named[3671]: no IPv6 interfaces found
Mar 29 18:11:38 jyhuang named[3671]: listening on IPv4 interface lo, 127.0.0.1#53
Mar 29 18:11:38 jyhuang named[3671]: listening on IPv4 interface eth1, 10.9.40.50#53
Mar 29 18:11:38 jyhuang named[3671]: command channel listening on 127.0.0.1#953
Mar 29 18:11:38 jyhuang named[3671]: zone 50.40.9.10.in-addr.arpa/IN: loading master file 50.9.40.10.in-addr.arpa: file not found
Mar 29 18:11:38 jyhuang named[3671]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
Mar 29 18:11:38 jyhuang named[3671]: zone sundyhuang.com/IN: has no NS records
Mar 29 18:11:38 jyhuang named[3671]: zone localhost/IN: loaded serial 42
Mar 29 18:11:38 jyhuang named[3671]: running
Mar 29 18:26:29 jyhuang named[3671]: shutting down: flushing changes
Mar 29 18:26:29 jyhuang named[3671]: stopping command channel on 127.0.0.1#953
Mar 29 18:26:29 jyhuang named[3671]: no longer listening on 127.0.0.1#53
Mar 29 18:26:29 jyhuang named[3671]: no longer listening on 10.9.40.50#53
Mar 29 18:26:29 jyhuang named[3671]: exiting
Mar 29 18:26:31 jyhuang named[3719]: starting BIND 9.2.1 -u named
Mar 29 18:26:31 jyhuang named[3719]: using 1 CPU
Mar 29 18:26:31 jyhuang named[3719]: loading configuration from '/etc/named.conf'
Mar 29 18:26:31 jyhuang  3月 29 18:26:31 named: named 启动 succeeded
Mar 29 18:26:31 jyhuang named[3719]: no IPv6 interfaces found
Mar 29 18:26:31 jyhuang named[3719]: listening on IPv4 interface lo, 127.0.0.1#53
Mar 29 18:26:31 jyhuang named[3719]: listening on IPv4 interface eth1, 10.9.40.50#53
Mar 29 18:26:31 jyhuang named[3719]: command channel listening on 127.0.0.1#953
Mar 29 18:26:31 jyhuang named[3719]: zone 50.40.9.10.in-addr.arpa/IN: loading master file 50.9.40.10.in-addr.arpa: file not found
Mar 29 18:26:31 jyhuang named[3719]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
Mar 29 18:26:31 jyhuang named[3719]: dns_master_load: sundyhuang.com.db:8: sundyhuang.com.sundyhuang.com: not at top of zone
Mar 29 18:26:31 jyhuang named[3719]: zone sundyhuang.com/IN: loading master file sundyhuang.com.db: not at top of zone
Mar 29 18:26:31 jyhuang named[3719]: zone localhost/IN: loaded serial 42
Mar 29 18:26:31 jyhuang named[3719]: running
文件named.conf

// generated by named-bootconf.pl

options {
        directory "/var/named";
        version "9.2.1-16";        
/*
         * 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 "sundyhuang.com" IN {
       type master;
       file "sundyhuang.com.db";
       allow-transfer {
       10.9.40.50;};   ----------------------------------------------------------这里是什么? 不用改.
};
zone "50.40.9.10.in-addr.arpa" IN {
      type master;
      file "50.9.40.10.in-addr.arpa";
      allow-update {none;};
};
include "/etc/rndc.key";



文件sundyhuang.com.db

$TTL        86400
sundyhuang.com        IN        SOA        dns.sundyhuang.com.        sundyhuang.com.(
2007032801;Serial
28800;Refresh
14400;Retry
3600000;Expire
86400);Minimum
sundyhuang.com        IN        NS        dns.sundyhuanng.com.
dns.sundyhuang.com        IN        A        10.9.40.50
localhost        IN        A        127.0.0.1
www        IN        A        10.9.40.50



文件50.40.9.10.in-addr.arpa

$TTL        86400
@IN        SOA        dns.sundyhuang.com.        sundyhuang.com. ( ---------------------------------------@ 这里把它删了最好,系统不认识
2007032801;Serial
28800;Refresh
14400;Retry
3600000;Expire
86400);Minimum
@IN        NS        www.sundyhuang.com.-------------------------同上
50        IN        PTR        www.sundyhuang.com.
要留心细节!
结果如何?是否是上述问题?期待中.