|
楼主 |
发表于 2003-3-23 13:45:51
|
显示全部楼层
questions about DNS.
经我下面的检测命令看我的DNS能正常工作吗?(截止到横线)
[ root@ljy /]# dig -x 192.168.2.1
; <<>> DiG 9.2.0 <<>> -x 192.168.2.1
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64366
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;1.2.168.192.in-addr.arpa. IN PTR
;; ANSWER SECTION:
1.2.168.192.in-addr.arpa. 86400 IN PTR ljy.test.com.
;; AUTHORITY SECTION:
2.168.192.in-addr.arpa. 86400 IN NS ljy.test.com.
;; Query time: 19 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Sun Mar 23 13:39:51 2003
;; MSG SIZE rcvd: 82
[ root@ljy /]# nslookup 192.168.2.1
Note: nslookup is deprecated and may be removed from future releases.
Consider using the `dig' or `host' programs instead. Run nslookup with
the `-sil[ent]' option to prevent this message from appearing.
Server: 192.168.2.1
Address: 192.168.2.1#53
1.2.168.192.in-addr.arpa name = ljy.test.com.
[ root@ljy /]# nslookup ljy.test.com
Note: nslookup is deprecated and may be removed from future releases.
Consider using the `dig' or `host' programs instead. Run nslookup with
the `-sil[ent]' option to prevent this message from appearing.
Server: 192.168.2.1
Address: 192.168.2.1#53
** server can't find ljy.test.com: NXDOMAIN
[ root@ljy /]#
----------------------------------------------------------------------------------------
我的配置文件如下:
我已经把我的有关DNS的配置文件给你发了一份,请有空帮我看一看,
还有我用dig -x 192.168.2.1命令的显示内容,请你帮我看看我的DNS服务器配置的对吗?
用什么工具能看出配置的对与否?
我用命令:ping ljy.test.com
后它找不到.(在/etc/hosts文件中我没有设置IP地址和ljy.test.com的对应关系.)
我的配置哪里有问题啊?请帮帮我.
请帮我看看我的DNS的配置有什么问题。
我用ping 命令:ping ljy.test.com后它显示找不到。
我用dig -x 192.168.2.1后显示的内容能说明它运行正常吗?还是有什么问题?
我现在配置了两块网卡,一块是:eth0 固定IP地址为:192.168.2.1
一块是:eth1 由主机动态分配IP地址为:192.168.0.29
为什么用nslookup显示的内容看eth1却能正常运行DNS?请帮我解释一下好吗?谢谢。
[ root@ljy root]# cd /
[ root@ljy /]# dig -x 192.168.2.1
; <<>> DiG 9.2.0 <<>> -x 192.168.2.1
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40535
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;1.2.168.192.in-addr.arpa. IN PTR
;; ANSWER SECTION:
1.2.168.192.in-addr.arpa. 86400 IN PTR ljy.test.com.2.168.192.in-addr.arpa.
;; AUTHORITY SECTION:
2.168.192.in-addr.arpa. 86400 IN NS ljy.test.com.2.168.192.in-addr.arpa.
;; Query time: 18 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Thu Mar 20 20:34:07 2003
;; MSG SIZE rcvd: 83
[ root@ljy /]# nslookup www.linuxaid.com.cn
Note: nslookup is deprecated and may be removed from future releases.
Consider using the `dig' or `host' programs instead. Run nslookup with
the `-sil[ent]' option to prevent this message from appearing.
Server: 192.168.0.1
Address: 192.168.0.1#53
Non-authoritative answer:
Name: www.linuxaid.com.cn
Address: 202.99.11.120
[ root@ljy /]#
/etc/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;
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 "test.com" IN{
type master;
file "test.com";
};
zone "2.168.192.in-addr.arpa" IN{
type master;
file "2.168.192.in-addr.arpa";
};
include "/etc/rndc.key";
/var/named/test.com
$TTL 86400
@ IN SOA ljy.test.com. root.ljy.test.com. (
1997022709 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS ljy.test.com
MX 10 ljy.test.com
localhost.test.com IN A 127.0.0.1
ljy.test.com IN A 192.168.2.1
www IN CNAME ljy.test.com.
/var/named/2.168.192.in-addr.arpa
$TTL 86400
@ IN SOA ljy.test.com. root.ljy.test.com. (
1997022707 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS ljy.test.com.
1 IN PTR ljy.test.com.
/var/named/named.local
$TTL 86400
@ IN SOA ljy.test.com. root.ljy.test.com. (
1997022705 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS ljy.test.com.
1 IN PTR localhost.
/var/named/localhost.zone
$TTL 86400
$ORIGIN localhost.
@ 1D IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
1D IN NS @
1D IN A 127.0.0.1 |
|