1.DNS设置要求:
一个没有授权的domain:menicserver.com
DNS SERVER:IP 192.168.2.2 主机名:www
解析的域名:ftp.menicserver.com, www.menicserver.com, mail.menicserver.com
2.resolve.conf文件内容如下:
domain menicserver.com
nameserver 192.168.2.2
search menicservr.com
3./ect/host.conf文件内容如下:
order hosts,bind
multi on
nospoof on
4.dns的主配置文件/ect/named.conf
- # Any changes not currently supported by redhat-config-bind should be put
- # in this file.
- #
- options {
- directory "/var/named/";
- };
- zone "." {
- type hint;
- file "named.root";
- };
- controls {
- inet 127.0.0.1 allow { localhost; } keys { rndckey; };
- };
- zone "localhost" IN {
- type master;
- file "localhost.zone";
- allow-update { none; };
- };
- zone "menicserver.com" IN {
- type master;
- file "menicserver.com";
- };
- zone "0.0.127.in-addr.arpa" IN {
- type master;
- file "named.local";
- allow-update { none; };
- };
- zone "2.168.192.in-addr.arpa" IN {
- type master;
- file "2.168.192";
- };
- include "/etc/rndc.key";
复制代码
5. /var/named/下面的localhost.zone
- $TTL 86400
- @ 1D IN SOA www.menicserver.com. root.menicserver.com.(
- 42 ;serial(d.adams)
- 3H ;refresh
- 15M ;retry
- 1W ;expriy
- 1D) ;minimum
- 1D IN NS @
- 1D IN A 127.0.0.1
复制代码
6./var/named/下面的menicserver.com
- $TTL 86400
- @ 1D IN SOA www.menic_server.com. root.menic_server.com.(
- 42 ;serial(d.adams)
- 3H ;refresh
- 15M ;retry
- 1W ;expriy
- 1D) ;minimum
- IN NS www.menic_server.com.
- IN MX 10 mail.menic_server.com.
- www IN A 192.168.2.2
- mail IN CNAME www.
- ftp IN CNAME www.
复制代码
7./var/named/下面的named.local
- $TTL 86400
- @ 1D IN SOA www.menicserver.com. root.menicserver.com.(
- 42 ;serial(d.adams)
- 3H ;refresh
- 15M ;retry
- 1W ;expriy
- 1D) ;minimum
- IN NS localhost.
- 2 IN PTR localhost.
复制代码
8./var/named/下面的2.168.192
- $TTL 86400
- @ 1D IN SOA www.menicserver.com. root.menicserver.com.(
- 42 ;serial(d.adams)
- 3H ;refresh
- 15M ;retry
- 1W ;expriy
- 1D) ;minimum
- IN NS www.menicserver.com.
- 2 IN PTR www.menicserver.com.
- 2 IN PTR mail.menicserver.com.
- 2 IN PTR ftp.menicserver.com.
复制代码
9.用nslookup出现如下信息:
- [root@www named]# nslookup
- > www.menicserver.com
- Server: 192.168.2.2
- Address: 192.168.2.2#53
- ** server can't find www.menicserver.com: SERVFAIL
复制代码
10. /var/log/message下面的named提示的启动信息
- [root@www named]# grep named /var/log/messages |tail -30
- Dec 29 15:31:47 www named[1381]: zone 2.168.192.in-addr.arpa/IN: has no NS records
- Dec 29 15:31:47 www named[1381]: zone menicserver.com/IN: has no NS records
- Dec 29 15:31:47 www named[1381]: zone localhost/IN: has no NS records
- Dec 29 15:31:48 www named[1381]: running
- Dec 29 16:40:36 www named[1792]: starting BIND 9.2.2-P3 -u named -t /var/named/chroot
- Dec 29 16:40:36 www named[1792]: using 1 CPU
- Dec 29 16:40:36 www named: named startup succeeded
- Dec 29 16:40:36 www named[1794]: loading configuration from '/etc/named.conf'
- Dec 29 16:40:36 www named[1794]: no IPv6 interfaces found
- Dec 29 16:40:36 www named[1794]: listening on IPv4 interface lo, 127.0.0.1#53
- Dec 29 16:40:36 www named[1794]: listening on IPv4 interface eth0, 192.168.2.2#53
- Dec 29 16:40:36 www named[1794]: command channel listening on 127.0.0.1#953
- Dec 29 16:40:36 www named[1794]: zone 0.0.127.in-addr.arpa/IN: has no NS records
- Dec 29 16:40:36 www named[1794]: zone 2.168.192.in-addr.arpa/IN: has no NS records
- Dec 29 16:40:36 www named[1794]: zone menicserver.com/IN: has no NS records
- Dec 29 16:40:36 www named[1794]: zone localhost/IN: has no NS records
- Dec 29 16:40:36 www named[1794]: running
- Dec 29 17:21:02 www named[1849]: starting BIND 9.2.2-P3 -u named -t /var/named/chroot
- Dec 29 17:21:02 www named[1849]: using 1 CPU
- Dec 29 17:21:02 www named: named startup succeeded
- Dec 29 17:21:02 www named[1851]: loading configuration from '/etc/named.conf'
- Dec 29 17:21:02 www named[1851]: no IPv6 interfaces found
- Dec 29 17:21:02 www named[1851]: listening on IPv4 interface lo, 127.0.0.1#53
- Dec 29 17:21:02 www named[1851]: listening on IPv4 interface eth0, 192.168.2.2#53
- Dec 29 17:21:02 www named[1851]: command channel listening on 127.0.0.1#953
- Dec 29 17:21:02 www named[1851]: zone 0.0.127.in-addr.arpa/IN: has no NS records
- Dec 29 17:21:02 www named[1851]: zone 2.168.192.in-addr.arpa/IN: has no NS records
- Dec 29 17:21:02 www named[1851]: zone menicserver.com/IN: has no NS records
- Dec 29 17:21:02 www named[1851]: zone localhost/IN: has no NS records
- Dec 29 17:21:02 www named[1851]: running
复制代码
问题应该是在IN: has no NS records,但真的想不明哪里出错了。我在网上找了很多相关资料,都没有找到。只好向你请教了。:)
[ Last edited by kormen on 2004-12-29 at 17:26 ] |