- 论坛徽章:
- 0
|
本帖最后由 w80286 于 2010-05-06 20:08 编辑
各位,我在学习搭建dns,用的CENTOS 5.4的OS,现在named能正常启动了,但是我已经配置好的域名查询不到,请各位帮忙看看又是哪里出问题了,谢谢。
[root@localhost etc]# cat named.conf
options
{directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_sats.txt";
pid-file "/var/run/named/named.pid";
forwarders {61.139.2.69;8.8.8.8;};
allow-query {any;};
allow-transfer {none;};
};
include "/etc/rndc.key";
zone "."{
type hint;
file "named.root";
};
zone "localhost"{
type master;
file "named.localhost";
};
zone "0.0.127" {
type master;
file "named.127.0.0";
};
zone "test.com" {
type master;
file "named.test.com";
};
zone "70.196.222"{
type master;
file "named.222.196.70";
};
[root@localhost named]# cat named.test.com
$TTL 600
@ IN SOA test.com. root.test.com.(2006102003 28800 14400 72000 86400)
@ IN NS test.com.
IN A 222.196.70.38
[root@localhost named]# cat named.222.196.70
$TTL 600
@ IN SOA test.com. root.localhost.(2006102001 28800 14400 3600000 86400 )
@ IN NS test.com.
38 IN PTR test.com
[root@localhost named]# nslookup
> www.test.com
Server: 222.196.70.38
Address: 222.196.70.38#53
Non-authoritative answer:
Name: www.test.com.localdomain
Address: 61.139.8.100 #在查询不到记录的时候,我的机器有时会固定地给出这个地址,不知道为什么.
[root@localhost named]# nslookup
> www.test.com
Server: 222.196.70.38
Address: 222.196.70.38#53
** server can't find www.test.com: NXDOMAIN
> 222.196.70.38
Server: 222.196.70.38
Address: 222.196.70.38#53
** server can't find 38.70.196.222.in-addr.arpa.: NXDOMAIN
这个是系统日志:
May 6 20:00:17 localhost named[8287]: loading configuration from '/etc/named.conf'
May 6 20:00:17 localhost named[8287]: using default UDP/IPv4 port range: [1024,65535]
May 6 20:00:17 localhost named[8287]: using default UDP/IPv6 port range: [1024,65535]
May 6 20:00:17 localhost named[8287]: listening on IPv4 interface lo, 127.0.0.1#53
May 6 20:00:17 localhost named[8287]: listening on IPv4 interface eth0, 222.196.70.38#53
May 6 20:00:17 localhost named[8287]: command channel listening on 127.0.0.1#953
May 6 20:00:17 localhost named[8287]: command channel listening on ::1#953
May 6 20:00:17 localhost named[8287]: the working directory is not writable
May 6 20:00:17 localhost named[8287]: zone 0.0.127/IN: loaded serial 2006102001
May 6 20:00:17 localhost named[8287]: zone 70.196.222/IN: loaded serial 2006102001
May 6 20:00:17 localhost named[8287]: zone test.com/IN: loaded serial 2006102003
May 6 20:00:17 localhost named[8287]: zone localhost/IN: loaded serial 2006102001
May 6 20:00:17 localhost named[8287]: running
|
|