LinuxSir.cn,穿越时空的Linuxsir!

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

DNS高手过来,我有急事

[复制链接]
发表于 2003-6-5 13:42:28 | 显示全部楼层 |阅读模式
请看一下 我看DNS配置,我认为没问题 ,可DNS却不能解析
name.conf

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
//
zone "." in {
        type hint;
        file "named.ca";
};

zone "0.0.127.in-addr.arpa" in {
        type master;
        file "named.local";
};
//
zone "njjx.com" in  {
type master ;
file "named.pre" ;
};

zone "0.168.192.in-addr.arpa" in  {
type  master ;
file "named.rec" ;
};



//
named.local
@TTL 86400
@       IN      SOA     caihexin.njjx.com. root.caihexin.njjx.com.  (
                                      1997022700 ; Serial
                                      28800      ; Refresh
                                      14400      ; Retry
                                      3600000    ; Expire
                                      86400 )    ; Minimum
              IN      NS      caihexin.njjx.com.

1       IN      PTR     localhost.
//
named.pre
@TTL 86400
@ IN  SOA  njjx.com. root.njjx.com. (
2002060602
28800
14400
3600000
86400
)
IN         NS   njjx.com.
njjx.com     IN   A  192.168.0.1
www          IN   CNAME caihexin
ftp          IN   CNAME caihexin
///
named.rec
@TTL 86400
@  IN  SOA  njjx.com. root.caihexin. (
2002060602
28800
14400
3600000
86400
)
IN NS  njjx.com.
1 IN  PTR  njjx.com.
发表于 2003-6-5 17:08:46 | 显示全部楼层
njjx.com IN A 192.168.0.1
->
njjx.com. IN A 192.168.0.1

你怎么测试的解析?
重起NAMED,"#tail /var/log/syslog",把错误代码贴出来~
发表于 2003-6-5 17:15:08 | 显示全部楼层
你的named.conf里面怎么没有这一块?是不是可以去掉的啊???

zone "localhost" IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
};

我自己的是这样!!你看看,,

// 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 "snoopy.gov" IN {
        type master;
        file"snoopy.gov";
};
zone "113.168.192.in-addr.arpa"IN {
        type master;
        file "snoopy.ptr";
};

include "/etc/rndc.key";

/var/named/snoopy.gov
$ttl 86400
@ IN SOA snoopy.gov. root.localhost. (
2003052601;
28800;
14400;
3600000;
86400);
    IN NS ns.snoopy.gov.
ns  IN A 192.168.113.88
www IN CNAME ns

/var/named/snoopy.ptr
$ttl 86400
@ IN SOA snoopy.gov. root.localhost. (
2003052602;
28800;
14400;
3600000;
86400);
   IN NS ns.snoopy.gov.
88 IN PTR ns.snoopy.gov.
 楼主| 发表于 2003-6-6 15:02:08 | 显示全部楼层

我的Messagej是

Jun  6 14:40:10 caihexin named[761]: dns_master_load: named.local:2: unexpected end of line
Jun  6 14:40:10 caihexin named[761]: dns_master_load: named.local:2: unexpected end of input
Jun  6 14:40:10 caihexin named[761]: dns_zone_load: zone 0.0.127.in-addr.arpa/IN: loading master file named.local: unexpected end of input
Jun  6 14:40:10 caihexin named[761]: dns_master_load: named.rec:2: unexpected end of line
Jun  6 14:40:10 caihexin named[761]: dns_master_load: named.rec:2: unexpected end of input
Jun  6 14:40:10 caihexin named[761]: dns_zone_load: zone 0.168.192.in-addr.arpa/IN: loading master file named.rec: unexpected end of input
Jun  6 14:40:10 caihexin named[761]: dns_master_load: named.pre:2: unexpected end of line
Jun  6 14:40:10 caihexin named[761]: dns_master_load: named.pre:2: unexpected end of input
Jun  6 14:40:10 caihexin named[761]: dns_zone_load: zone njjx.com/IN: loading master file named.pre: unexpected end of input
 楼主| 发表于 2003-6-6 15:10:27 | 显示全部楼层

pinksnoopy

请同localhost.zone 文件配置为会么
还有,你的配置与我一样,怎么我就解析不了
 楼主| 发表于 2003-6-6 15:27:11 | 显示全部楼层
[root@caihexin root]# nslookup
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.
> 192.168.0.1
Server:         192.168.0.1
Address:        192.168.0.1#53

** server can't find 1.0.168.192.in-addr.arpa.: SERVFAIL
>

ping www.njjx.com 不通
 楼主| 发表于 2003-6-6 15:35:51 | 显示全部楼层

报告stanlogin版主

按你的改过来,还是不行,请你看一下我的MESSAGES
发表于 2003-6-6 16:04:31 | 显示全部楼层
看Messages应该是语法错误,你再仔细检查一下,比如象“named.local”这样的注释前面加没加注释符号
发表于 2003-6-6 16:07:50 | 显示全部楼层
 楼主| 发表于 2003-6-6 17:15:42 | 显示全部楼层

谢谢stanlogin版主,请再指教。

经你提醒,我看了一下,可是没发现有语法错误。
@ttl 86400 应为$TLL 86400吗?可我改过,没有效果,MESSAGES里
报错一样.
这问题困扰我好几天了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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