LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1484|回复: 18

HELP!我的DNS问题出在什么地方?

[复制链接]
发表于 2004-7-29 22:32:25 | 显示全部楼层 |阅读模式
大家好!请教大家一个问题!我的DNS不能启动,请帮我找找错误!
首先强调一下,我已经重新启动了named服务了。我的IP地址如下:
eth0      Link encap:Ethernet  HWaddr 00:E0:4C:4E8:B3
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1969 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2375 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:727471 (710.4 Kb)  TX bytes:226267 (220.9 Kb)
          Interrupt:11 Base address:0xe000
                                                                                                                             
lo        Link encapocal Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:3830 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3830 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1912984 (1.8 Mb)  TX bytes:1912984 (1.8 Mb
证明我的IP没有问题。
我的/etc/resolv.conf如下:
; generated by /sbin/dhclient-script
nameserver 192.168.0.1
我已经配置了主DNS。
下面是我的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 "cjjj.com" IN {
        type master;
        file "cjjj.com.zone";
        allow-update { none; };
};
zone "0.168.192.in-addr.arpa" IN {
        type master;
        file "cjjj.com.local";
        allow-update { none; };
};
                                                                                
//include "/etc/rndc.key";
这个是我的named.conf应该也没有问题我是按照上面的东西抄的肯定不能有错字。下面是我的cjjj.com.zone
$TTL    86400
$ORIGIN cjjj.com.
@       IN SOA  w1.cjjj.com.  root.w1.cjjj.com. (
        200407029
        28800
        14400
        3600000
        86400 )
        NS        w1.cjjj.com.
w1      IN      A         192.168.0.1
mail    IN      A         192.168.0.1
ftp     IN      A         192.168.0.1
www     IN      A         192.168.0.1
web     CNAME   www
由于我是单机测试,我打算让我的个机器同时可以进行mail,web,ftp服务故将IP写的都是一样的(就是我删掉了别的就只留下www也不好使)
下面是我的cjjj.com.local
$TTL    86400
@       IN      SOA     w1.cjjj.com.    root.w1.cjjj.com. (
        20040729
        28800
        14400
        3600000
        86400 )
                NS      w1.cjjj.com.
1               IN      PTR     w1.cjjj.com.
1               IN      PTR     www.cjjj.com.
1               IN      PTR     mail.cjjj.com.
1               IN      PTR     ftp.cjjj.com.
结果不好用!请大家帮忙找找毛病!
 楼主| 发表于 2004-7-29 22:37:22 | 显示全部楼层

对了!我忘记告诉大家了我用的是fedora 2.4的内核

请大家务必帮忙!谢谢了!
发表于 2004-7-29 22:40:13 | 显示全部楼层
NS w1.cjjj.com.
w1 IN A 192.168.0.1
===================================
建议一个相应的w1的A记录

另外你的配置文件中有很多多余的内容
先试一试吧
记得先#killall named
service named start
hoat -a xxx.xxx
 楼主| 发表于 2004-7-29 22:57:59 | 显示全部楼层

不行阿 !不知道为什么?!应该对了 阿!

Trying "cjjj.com"
;; connection timed out; no servers could be reached
[root@w1 etc]# host -a w1.cjjj.com
Trying "w1.cjjj.com"
;; connection timed out; no servers could be reached
[root@w1 etc]# host -a 192.168.0.1
Trying "1.0.168.192.in-addr.arpa"
;; connection timed out; no servers could be reached
[root@w1 etc]#
 楼主| 发表于 2004-7-30 09:13:07 | 显示全部楼层

我以前在redhat9中怎么配置怎么好使阿?!

fedora是不是有些特殊的东西阿 ?!我记得别人说redhat9以上的就不怎么好配置了!
还有那个随即的参数--rndc.key如何得到新的随即数阿?我看是用MD5加密的!
还有个比较奇怪的问题就是,我把我自己写的全部都删掉。测试localhost都不好用!!真是郁闷死了!我昨天配置了4个小时!望各位大侠!多多帮助小弟!小弟这厢有礼了!
发表于 2004-7-30 09:42:13 | 显示全部楼层

keke

把你的SSH开开吧
让我上去看一下
发表于 2004-7-30 09:42:17 | 显示全部楼层

keke

把你的SSH开开吧
让我上去看一下
发表于 2004-7-30 09:55:04 | 显示全部楼层
在你的cjjj.com.zone和cjjj.com.local的最开始部分加入下面一行:
$ORIGIN  cjjj.com.
你可以把/var/log/messages中的信息贴出来吗?
谢谢!!
 楼主| 发表于 2004-7-30 10:46:59 | 显示全部楼层

好的!我已经打开了SSH

密码是digno001
 楼主| 发表于 2004-7-30 10:47:45 | 显示全部楼层

IP是10.6.0.23

IP是10.6.0.23
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表