我配拉好几天的DNS拉,但就是测试不出来,那为大侠帮我看看我的系统日志
看看问题出在那,每次用host测试就显示
Host www.king.com not found:2 (SERVFAIL)
下面的是我的系统日志
Dec 27 14:59:38 ns 12月 27 14:59:38 named: succeeded
Dec 27 06:59:40 ns named[7125]: starting BIND 9.2.2 -u named -t /var/named/chroot
Dec 27 06:59:40 ns named[7125]: using 1 CPU
Dec 27 06:59:40 ns named[7127]: loading configuration from '/etc/named.conf'
Dec 27 14:59:40 ns 12月 27 14:59:40 named: named 启动 succeeded
Dec 27 06:59:40 ns named[7127]: no IPv6 interfaces found
Dec 27 06:59:40 ns named[7127]: listening on IPv4 interface lo, 127.0.0.1#53
Dec 27 06:59:40 ns named[7127]: listening on IPv4 interface eth0, 201.200.73.6#53
Dec 27 06:59:40 ns named[7127]: command channel listening on 127.0.0.1#953
Dec 27 06:59:40 ns named[7127]: dns_rdata_fromtext: 127.0.0.rev:2: near eol: unexpected end of input
Dec 27 06:59:40 ns named[7127]: zone 0.0.127.in-addr.arpa/IN: loading master file 127.0.0.rev: unexpected end of input
Dec 27 06:59:40 ns named[7127]: dns_rdata_fromtext: 201.200.73.6.rev:2: near eol: unexpected end of input
Dec 27 06:59:40 ns named[7127]: zone 73.200.201.in-addr.arpa/IN: loading master file 201.200.73.6.rev: unexpected end of input
Dec 27 06:59:40 ns named[7127]: dns_master_load: king.zone:2: unknown RR type 'SOAking.com.'
Dec 27 06:59:40 ns named[7127]: zone king.com/IN: loading master file king.zone: unknown class/type
Dec 27 06:59:40 ns named[7127]: dns_rdata_fromtext: localhost.zone:2: near eol: unexpected end of input
Dec 27 06:59:40 ns named[7127]: zone localhost/IN: loading master file localhost.zone: unexpected end of input
Dec 27 06:59:40 ns named[7127]: running
小弟在这先谢拉!
语法错误一大堆:
[code:1]Dec 27 06:59:40 ns named[7127]: dns_rdata_fromtext: 127.0.0.rev:2: near eol: unexpected end of input
Dec 27 06:59:40 ns named[7127]: zone 0.0.127.in-addr.arpa/IN: loading master file 127.0.0.rev: unexpected end of input
Dec 27 06:59:40 ns named[7127]: dns_rdata_fromtext: 201.200.73.6.rev:2: near eol: unexpected end of input
Dec 27 06:59:40 ns named[7127]: zone 73.200.201.in-addr.arpa/IN: loading master file 201.200.73.6.rev: unexpected end of input
Dec 27 06:59:40 ns named[7127]: dns_master_load: king.zone:2: unknown RR type 'SOAking.com.'
Dec 27 06:59:40 ns named[7127]: zone king.com/IN: loading master file king.zone: unknown class/type
Dec 27 06:59:40 ns named[7127]: dns_rdata_fromtext: localhost.zone:2: near eol: unexpected end of input
Dec 27 06:59:40 ns named[7127]: zone localhost/IN: loading master file localhost.zone: unexpected end of input [/code:1]
[quote:e9d8275383="bumingbai"]语法错误一大堆:
[code:1]Dec 27 06:59:40 ns named[7127]: dns_rdata_fromtext: 127.0.0.rev:2: near eol: unexpected end of input
Dec 27 06:59:40 ns named[7127]: zone 0.0.127.in-addr.arpa/IN: loading master file 127.0.0.rev: unexpected end of input
Dec 27 06:59:40 ns named[7127]: dns_rdata_fromtext: 201.200.73.6.rev:2: near eol: unexpected end of input
Dec 27 06:59:40 ns named[7127]: zone 73.200.201.in-addr.arpa/IN: loading master file 201.200.73.6.rev: unexpected end of input
Dec 27 06:59:40 ns named[7127]: dns_master_load: king.zone:2: unknown RR type 'SOAking.com.'
Dec 27 06:59:40 ns named[7127]: zone king.com/IN: loading master file king.zone: unknown class/type
Dec 27 06:59:40 ns named[7127]: dns_rdata_fromtext: localhost.zone:2: near eol: unexpected end of input
Dec 27 06:59:40 ns named[7127]: zone localhost/IN: loading master file localhost.zone: unexpected end of input [/code:1]
king.zone的数据库文件
$ttl 1D
@ IN SOA king.com. root.king.com. (
2004122100
3H
15M
1W
1D )
IN NS ns.king.com.
IN MX 5 mail.king.com.
localhost IN A 127.0.0.1
ns IN A 201.200.73.6
www IN A 201.200.73.6
ftp IN A 201.200.73.11
ns IN CNAME ns.king.com.
www IN CNAME www.king.com.
ftp IN CNAME ftp.king.com.
localhost.zone的数据库文件
$ttl 1D
@ 1D IN SOA @ root (
42
3H
15M
1W
1D )
1D IN NS @
1D IN A 127.0.0.1
201.200.73.6.rev的数据库文件
$ttl 1D
@ IN SOA ns.king.com. root.ns.king.com. (
2004122100
3H
15M
1W
1D )
IN NS ns.king.com.
6 IN PTR ns.king.com.
6 IN PTR www.king.com.
11 IN PTR ftp.king.com.
127.0.0.rev的数据库文件
$ttl 1D
@ IN SOA localhost. root.localhost. (
2004122100
3H
15M
1W
1D )
IN NS localhost.
1 IN PTR localhost.
多谢各为大侠的指点
[quote:31cb22c462="thizlinux"]king.zone的数据库文件
...
ns IN A 201.200.73.6
www IN A 201.200.73.6
ftp IN A 201.200.73.11
ns IN CNAME ns.king.com.
www IN CNAME www.king.com.
ftp IN CNAME ftp.king.com.
...[/quote]
ns IN A 201.200.73.6和www IN A 201.200.73.6重复定义,而且后面的CNAME又一次重复定义,应该这么写:
ns IN A 201.200.73.6
ftp IN A 201.200.73.11
www IN CNAME ns.king.com.
各位大侠,我照你们说的改拉,现在是正向的测试不好用显示
Host www.king.com not found:2 (SERVFAIL)
但反向的好用,测试结果和书上写的一样,但这还是不好用阿,
还有就是现在我用service named start或是/etc/rc.d/init.d/named restart等命令启动服务器都不好用啦,系统啥提示也没有,还请各位大侠再帮帮我,让小弟将这个服务器弄明白,再次表示感谢!下面是我安各位说的改完后的系统日志,还是文件里有错误,但我按书上写的对拉一下,都一样,就是日期是我自己给的,和日期有没有关系我也不是很清楚,
Dec 29 16:05:40 localhost 12月 29 16:05:40 named: named 启动 succeeded
Dec 29 08:05:40 localhost named[3087]: no IPv6 interfaces found
Dec 29 08:05:40 localhost named[3087]: listening on IPv4 interface lo, 127.0.0.1#53
Dec 29 08:05:40 localhost named[3087]: listening on IPv4 interface eth0, 201.200.73.6#53
Dec 29 08:05:40 localhost named[3087]: command channel listening on 127.0.0.1#953
Dec 29 08:05:40 localhost named[3087]: zone 0.0.127.in-addr.arpa/IN: loaded serial 2004122100
Dec 29 08:05:40 localhost named[3087]: zone 73.200.201.in-addr.arpa/IN: loaded serial 2004122100
Dec 29 08:05:40 localhost named[3087]: dns_master_load: king.zone:14: ftp.king.com: CNAME and other data
Dec 29 08:05:40 localhost named[3087]: zone king.com/IN: loading master file king.zone: CNAME and other data
Dec 29 08:05:40 localhost named[3087]: dns_rdata_fromtext: localhost.zone:2: near eol: unexpected end of input
Dec 29 08:05:40 localhost named[3087]: zone localhost/IN: loading master file localhost.zone: unexpected end of input
Dec 29 08:05:40 localhost named[3087]: running
Dec 29 08:05:40 localhost named[3087]: zone 73.200.201.in-addr.arpa/IN: sending notifies (serial 2004122100)
Dec 29 16:21:01 localhost kernel: application bug: xterm(4874) has SIGCHLD set to SIG_IGN but calls wait().
Dec 29 16:21:01 localhost kernel: (see the NOTES section of 'man 2 wait'). Workaround activated.
Dec 29 16:23:09 localhost kernel: application bug: xterm(4874) has SIGCHLD set to SIG_IGN but calls wait().
Dec 29 16:23:09 localhost kernel: (see the NOTES section of 'man 2 wait'). Workaround activated.
[code:1]Dec 29 08:05:40 localhost named[3087]: dns_rdata_fromtext: localhost.zone:2: near eol: unexpected end of input
Dec 29 08:05:40 localhost named[3087]: zone localhost/IN: loading master file localhost.zone: unexpected end of input [/code:1]