免费注册 查看新帖 |

Chinaunix

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

[DNS] 我怎么配置域名为test.edu.cn 的DNS服务器??? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-08-06 17:48 |只看该作者 |倒序浏览
大家好,我测试DNS时,用nslookup 172.16.18.18 报错信息为:
[root@test etc]# nslookup 172.16.18.18
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:         172.16.18.18
Address:        172.16.18.18#53
** server can't find 18.18.16.172.in-addr.arpa.: SERVFAIL


我的named.conf配置如下:
## named.conf - configuration for bind
#
# Generated automatically by bindconf, alchemist et al.
controls {
        inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};

include "/etc/rndc.key";

options {
        directory "/var/named/";
};

zone  "." {
        type hint;
        file  "named.ca";
};

zone "test.edu.cn"{
        type master;
        file "test.edu.cn";
};

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


zone    "18.16.172.in-addr.arpa"{
        type master;
        file "named.test.arpa";
};

而hosts配置为:
127.0.0.1       localhost
172.16.18.18    test.edu.cn     test
#############################################################


论坛徽章:
0
2 [报告]
发表于 2003-08-07 10:38 |只看该作者

我怎么配置域名为test.edu.cn 的DNS服务器???

看样子,你的DNS是启动了,大概是named.test.arpa文件有误.能不能把你的named.test.arpa文件帖出来看看啊.

论坛徽章:
0
3 [报告]
发表于 2003-08-07 11:39 |只看该作者

我怎么配置域名为test.edu.cn 的DNS服务器???

将named.conf中zone "18.16.172.in-addr.arpa"屏蔽,然后试试

论坛徽章:
0
4 [报告]
发表于 2003-09-02 21:16 |只看该作者

我怎么配置域名为test.edu.cn 的DNS服务器???

谢谢老兄们,我搞定了!!!
我的named.conf:文件如下:

options {
        directory "/var/named";
#        listen-on { 172.16.18.18; 127.0.0.1; };
#forwarders { 172.16.18.18;
#};
};

zone "." {
        type hint;
        file "named.ca";
};

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

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


zone "18.16.172.in-addr.arpa"{
        type master;
        file "ip2name.conf";
};

zone "dashan.edu" IN {
        type master;
        file "name2ip.conf";
};

include "/etc/rndc.key";

正解name2ip.conf 文件:
$TTL    86400
@       IN      SOA     www.dashan.edu. root.www.dashan.edu. (
1997022700      ;       serial
28800   ;       refresh
14400   ;       retry
3600000 ;       expire
86400   ;       minuum
        )
@       IN      NS      dashan.edu.
@       IN      MX      10      dashan.edu.
localhost       IN      A       127.0.0.1

www     IN      A       172.16.18.18
mail    IN      A       172.16.18.18

mix     IN      A       172.16.18.16
it03    IN      CNAME   mix

反解ip2name.conf文件:
$TTL    86400
@       IN      SOA     www.dashan.edu. root.www.dashan.edu.    (
1997022770      ;       serial
28800   ;       refresh
14400   ;       retry
3600000 ;       expire
86400   ;       minimum
        )
@       IN      NS      dashan.edu.

18      IN      PTR     dashan.edu.
16      IN      PTR     mix.dashan.edu.
~

现在问题是:我想用172.16.18.18 作为master DNS,而用172.16.18.16作为反解,应该怎样配置置?请各为老兄指点!!!

论坛徽章:
0
5 [报告]
发表于 2003-09-03 09:14 |只看该作者

我怎么配置域名为test.edu.cn 的DNS服务器???

[quote]原帖由 "dashanqq"]现在问题是:我想用172.16.18.18 作为master DNS,而用172.16.18.16作为反解,应该怎样配置置?请各为老兄指点!!![/quote 发表:
   
正向解析和反向解析属于不同的域(反向解析属于arpa域),两者之间没有什么必然的联系。
172.16.18.18的named.conf可以如下:
options {
directory "/var/named";
# listen-on { 172.16.18.18; 127.0.0.1; };
#forwarders { 172.16.18.18;
#};
};
zone "dashan.edu" IN {
type master;
file "name2ip.conf";
};
172.16.18.16的named.conf可以如下:
options {
directory "/var/named";
# listen-on { 172.16.18.18; 127.0.0.1; };
#forwarders { 172.16.18.18;
#};
};
zone "18.16.172.in-addr.arpa"{
type master;
file "ip2name.conf";
};
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP