- 論壇徽章:
- 0
|
本帖最后由 w80286 于 2010-06-16 10:35 編輯
不好意思,我開始把帖子發(fā)在新手區(qū),但問題一直沒有解決,所以發(fā)來服務(wù)版了。
各位,我在學(xué)習(xí)搭建dns,用的CENTOS 5.4的OS,現(xiàn)在named能正常啟動了,但是我已經(jīng)配置好的域名查詢不到,請各位幫忙看看又是哪里出問題了,謝謝。
[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 #在查詢不到記錄的時候,我的機(jī)器有時會固定地給出這個地址,不知道為什么.
[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
這個是系統(tǒng)日志:
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
|
|