免费注册 查看新帖 |

Chinaunix

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

[DNS] win2003设置bind9时cname解析问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-03-05 16:44 |只看该作者 |倒序浏览
我按照网上的win2003安装设置智能dns教程,安装并设置了bind9,其他的一切都正常运行,可以解析
可是加了cname后就出现错误,无法解析,请问各位高手如何解决啊?
参考教程 http://blog.chinaunix.net/u/12364/showart.php?id=444445
贴出我的配置

named.conf
acl "trust-lan" { 127.0.0.1/8; 10.0.0.0/24;};
options {
        directory "C:\WINDOWS\system32\dns\etc";
        recursion no;
        version "0.0.0";
        allow-transfer { "trust-lan";};
        allow-notify { "trust-lan"; };
        auth-nxdomain no;
        forwarders { 60.171.45.171;60.171.45.150;};   #此处为isp提供的dns服务器

};

#这一段内容拷贝来自rndc.conf
key "rndc-key" {
        algorithm hmac-md5;
        secret "g8xcOITd9RwFCui0Pj7oQg==";
};

controls {
        inet 127.0.0.1 port 953
                allow { 127.0.0.1; } keys { "rndc-key"; };
};
#注意在C:\WINDOWS\system32\dns\log\ 下建dns_warnings.txt dns_logs.txt
logging {
channel warning
{ file "C:\WINDOWS\system32\dns\log\dns_warnings.txt" versions 3 size 1240k;
severity warning;
print-category yes;
print-severity yes;
print-time yes;
};
channel general_dns
{ file "C:\WINDOWS\system32\dns\log\dns_logs.txt" versions 3 size 1240k;
severity info;
print-category yes;
print-severity yes;
print-time yes;
};
category default { warning; };
category queries { general_dns; };
};
#将网通的地址范围数据
include "acl.conf";
# 判断如果是网通的地址范围,则会执行此处,调用网通的解析
view "view_cnc" {
match-clients { CNC; };
zone "." {
type hint;
file "named.root";
};

zone "0.0.127.IN-ADDR.ARPA" {
type master;
file "localhost.rev";
};

include "cnc.def";
};

view "view_any" {
match-clients { any; };
zone "." {
type hint;
file "named.root";
};

zone "0.0.127.IN-ADDR.ARPA" {
type master;
file "localhost.rev";
};

include "tel.def";
};
---------------------------------------------------------
tel.def 文件

zone "dnsany.com" {
type master;
file "C:\WINDOWS\system32\dns\etc\telecom\dnsany.com.txt";
};
---------------------------------------------------------
dnsany.com.txt

$TTL 3600
$ORIGIN dnsany.com.
@ IN SOA ns.joysp.com. root.dnsany.com.(
2006111520 ;Serial
3600 ; Refresh ( seconds )
900 ; Retry ( seconds )
68400 ; Expire ( seconds )
15 );Minimum TTL for Zone ( seconds )
;
@ IN NS ns.joysp.com.
@ IN A 220.248.236.152
www IN A 220.248.236.152
web IN A 220.248.236.152
* IN A 220.248.236.152
www IN CNAME web
dnsany.com.  IN  MX 15 aspmx.l.google.com
;
;end
------------------------------------------------------

在dnsany.com.txt中如果没有 www IN CNAME web就不报错误,有的话就报错
general: error: dns_master_load: C:\WINDOWS\system32\dns\etc\telecom\dnsany.com.txt:15: www.dnsany.com: CNAME and other data
general: error: zone dnsany.com/IN/view_any: loading from master file C:\WINDOWS\system32\dns\etc\telecom\dnsany.com.txt failed: CNAME and other data

论坛徽章:
0
2 [报告]
发表于 2009-03-05 17:22 |只看该作者
web IN A 220.248.236.152
www IN CNAME web
这样就可以了吧。

论坛徽章:
0
3 [报告]
发表于 2009-03-07 08:04 |只看该作者
还是不行啊,按照你的方法还是报错

论坛徽章:
0
4 [报告]
发表于 2009-03-07 22:15 |只看该作者
www IN A 220.248.236.152
web IN A 220.248.236.152
* IN A 220.248.236.152
www IN CNAME web

A记录和CNAME重复,删除 www 的A记录就可以了。

论坛徽章:
0
5 [报告]
发表于 2009-03-13 08:05 |只看该作者
谢谢16hotcom 的提示,按照你的提示配置成功了,呵呵
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP