免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2603 | 回复: 9
打印 上一主题 下一主题

[DNS] 那位帮忙给看看哪有什么问题!! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-08-14 13:19 |只看该作者 |倒序浏览
我使用dig命令察看163时显示
[root@mail ~]# dig 163.com

; <<>> DiG 9.2.4 <<>> 163.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2078
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;163.com.                       IN      A

;; ANSWER SECTION:
163.com.                455     IN      A       220.181.29.154


;;;; AUTHORITY SECTION:
163.com.                17477   IN      NS      ns3.nease.net.
163.com.                17477   IN      NS      ns.nease.net.

;; ADDITIONAL SECTION:
ns.nease.net.           2975    IN      A       202.106.185.75
ns3.nease.net.          10191   IN      A       220.181.28.3


;; Query time: 60 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Aug 14 13:01:34 2006
;; MSG SIZE  rcvd: 117



而察看我自己的域名时却显示

[root@mail ~]# dig xxx.com.cn

; <<>> DiG 9.2.4 <<>> xxx.com.cn
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19886
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;xxx.com.cn.                  IN      A

;; AUTHORITY SECTION:
xxx.com.cn.           500     IN      SOA     xxx.com.cn. root.localhost.xxx.com.cn. 2 600 500 500 500


;; Query time: 49 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Aug 14 12:52:23 2006
;; MSG SIZE  rcvd: 81

这是我的ect/named.conf

//
// named.conf for Red Hat caching-nameserver
//
acl "trust-lan" { 127.0.0.1/8; xxx.xxx.xxx.xxx/24; xxx.xxx.xxx.xxx/24; };
options {
        version "xxx.com.cn";
        directory "/var/named";
        dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        recursion yes;
        allow-recursion { trust-lan; };
        allow-transfer { trust-lan; };
        notify yes;
        forward first;
        forwarders{xxx.xxx.xxx.xxx;xxx.xxx.xxx.xxx;};
        listen-on-v6  { none; };
        /*
         * 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 "localdomain" IN {
        type master;
        file "localdomain.zone";
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "named.local";
};

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
        type master;
        file "named.ip6.local";
};
zone "255.in-addr.arpa" IN {
        type master;
        file "named.broadcast";
};

zone "0.in-addr.arpa" IN {
        type master;
        file "named.zero";
};

zone  "xxx.com.cn" {
        type master;
        file  "xxx.com.cn.zone";
        notify yes;
};
zone  "xxx.com.cn" {
        type master;
        file  "aidc.com.cn.zone";
        notify yes;
};
zone  "xxx.xxx.xxx.in-addr.arpa" {
        type master;
        file  "xxx.xxx.xxx.in-addr.arpa.zone";
};
include "/etc/rndc.key";


这是我的/var/named/chroot/var/named/xxx.com.cn.zone

$TTL 500
@       IN      SOA     @  root.localhost (
                        2 ; serial
                        600 ; refresh
                        500 ; retry
                        500 ; expire
                        500 ; ttl
                        )
        IN      NS      ns
        IN      MX      10      mail

ns      IN      A       xxx.xxx.xxx.xxx
www     IN      A    xxx.xxx.xxx.xxx
mail    IN      A       xxx.xxx.xxx.xxx
bbs     IN      A      xxx.xxx.xxx.xxx
zcl     IN      A       xxx.xxx.xxx.xxx
~


为什么我的结果会是这样,不规则还显示了内容。并且缺少了橙色的两行为什么呢???

谁能帮忙看看哪有什么问题谢谢了!!!

[ 本帖最后由 yjc2688 于 2006-8-22 17:35 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2006-08-15 17:42 |只看该作者
没人帮忙么?

论坛徽章:
0
3 [报告]
发表于 2006-08-15 19:41 |只看该作者
缺少橙色两行说明你得正向区域文件没有生效
你重启dns,看看log中有没有载入正向区域文件gicom.com.cn.zone
估计是路径问题

论坛徽章:
0
4 [报告]
发表于 2006-08-15 20:34 |只看该作者
/var/named/chroot/var/named/gicom.com.cn.zone

改为
@ IN SOA  ns.gicom.com.cn.   root.mail.gicom.com.cn.  试试

论坛徽章:
0
5 [报告]
发表于 2006-08-15 22:06 |只看该作者
Aug 15 21:55:02 localhost named: named 启动 succeeded
Aug 15 21:55:02 localhost named[23032]: using 1 CPU
Aug 15 21:55:02 localhost named[23032]: loading configuration from '/etc/named.conf'
Aug 15 21:55:02 localhost named[23032]: listening on IPv4 interface lo, 127.0.0.1#53
Aug 15 21:55:02 localhost named[23032]: listening on IPv4 interface eth0, 220.231.17.98#53
Aug 15 21:55:02 localhost named[23032]: command channel listening on 127.0.0.1#953
Aug 15 21:55:02 localhost named[23032]: zone 0.in-addr.arpa/IN: loaded serial 42
Aug 15 21:55:02 localhost named[23032]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
Aug 15 21:55:02 localhost named[23032]: zone 17.231.220.in-addr.arpa/IN: loaded serial 2
Aug 15 21:55:02 localhost named[23032]: zone 255.in-addr.arpa/IN: loaded serial 42
Aug 15 21:55:02 localhost named[23032]: zone 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 1997022700
Aug 15 21:55:02 localhost named[23032]: zone aidc.com.cn/IN: loaded serial 2
Aug 15 21:55:02 localhost named[23032]: zone gicom.com.cn/IN: loaded serial 2
Aug 15 21:55:02 localhost named[23032]: zone localdomain/IN: loaded serial 42
Aug 15 21:55:02 localhost named[23032]: zone localhost/IN: loaded serial 42
Aug 15 21:55:02 localhost named[23032]: running
Aug 15 21:55:02 localhost named[23032]: zone 17.231.220.in-addr.arpa/IN: sending notifies (serial 2)
Aug 15 21:55:02 localhost named[23032]: zone aidc.com.cn/IN: sending notifies (serial 2)
Aug 15 21:55:02 localhost named[23032]: zone gicom.com.cn/IN: sending notifies (serial 2)
Aug 15 21:55:02 localhost named[23032]: received notify for zone 'gicom.com.cn'


这是我的启动日志

论坛徽章:
0
6 [报告]
发表于 2006-08-15 22:19 |只看该作者
原帖由 skyy23 于 2006-8-15 20:34 发表
/var/named/chroot/var/named/gicom.com.cn.zone

改为
@ IN SOA  ns.gicom.com.cn.   root.mail.gicom.com.cn.  试试

改过了结果如下:

; <<>> DiG 9.2.4 <<>> gicom.com.cn
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30768
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;gicom.com.cn.                  IN      A

;; AUTHORITY SECTION:
gicom.com.cn.           500     IN      SOA     ns.gicom.com.cn. root.mail.gicom.com.cn. 2 600 500 500 500

;; Query time: 27 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Aug 15 22:15:43 2006
;; MSG SIZE  rcvd: 79

论坛徽章:
0
7 [报告]
发表于 2006-08-16 07:09 |只看该作者
gicom.com.cn 没有指定地址

+一条A记录

gicom.com.cn.  IN  A XXX

还有你的文件有些地方不规范,最好再重新看看有关说明

TTL值太低了

[ 本帖最后由 skyy23 于 2006-8-16 07:10 编辑 ]

论坛徽章:
0
8 [报告]
发表于 2006-08-16 08:57 |只看该作者
@       IN      SOA     @  root.localhost (

感觉是这句有问题。

在没有明确指定ORIGIN的情况下,@指的是什么?

论坛徽章:
0
9 [报告]
发表于 2006-11-16 21:06 |只看该作者
瞎忙了半天 现在把服务转给hichina了

论坛徽章:
0
10 [报告]
发表于 2006-11-17 06:56 |只看该作者
ORIGIN好多参数不规范

$ORIGIN .
$TTL 86400      ; 1 day
xxx.com.cn             IN SOA  ns.xxx.com.cn. root.ns.xxx.com.cn. (
                                2006111504 ; serial
                                60         ; refresh (1 minute)
                                60         ; retry (1 minute)
                                36000      ; expire (10 hours)
                                86400      ; minimum (1 day)
                                )
                        NS      ns.xxx.com.cn.
                        A       xxx.xxx.xxx
                        MX      10 mail.xxx.com.cn.
$ORIGIN xxx.com.cn.
www                     A       xxx.xxx.xxx.xxx
mail                       A       xxx.xxx.xxx.xxx
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP