免费注册 查看新帖 |

Chinaunix

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

[DNS] DNS的一个问题,请求帮忙 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-08-31 13:50 |只看该作者 |倒序浏览
我在 FREEBSD 上安装了 bind 9.3.1,由于本人刚接触BSD及BIND,所以配置过程都是以网上的一些资料配置,配置完后, named启动了,可以反向解析,但不能正向解析,以下是 通过/usr/local/sbin/named -g 命令启动bind 的信息
31-Aug-2005 11:32:10.189 starting BIND 9.3.0 -g
31-Aug-2005 11:32:10.190 found 1 CPU, using 1 worker thread
31-Aug-2005 11:32:10.202 loading configuration from '/etc/namedb/named.conf'
31-Aug-2005 11:32:10.204 listening on IPv4 interface lnc0, 192.168.1.209#53
31-Aug-2005 11:32:10.205 could not listen on UDP socket: address in use
31-Aug-2005 11:32:10.205 creating IPv4 interface lnc0 failed; interface ignored
31-Aug-2005 11:32:10.205 listening on IPv4 interface lo0, 127.0.0.1#53
31-Aug-2005 11:32:10.213 could not listen on UDP socket: address in use
31-Aug-2005 11:32:10.214 creating IPv4 interface lo0 failed; interface ignored
31-Aug-2005 11:32:10.214 not listening on any interfaces
31-Aug-2005 11:32:10.235 none:0: open: /etc/namedb/rndc.key: file not found
31-Aug-2005 11:32:10.235 couldn't add command channel 127.0.0.1#953: file not found
31-Aug-2005 11:32:10.235 none:0: open: /etc/namedb/rndc.key: file not found
31-Aug-2005 11:32:10.235 couldn't add command channel ::1#953: file not found
31-Aug-2005 11:32:10.241 ignoring config file logging statement due to -g option
31-Aug-2005 11:32:10.253 additionally listening on IPv4 interface lnc0, 192.168.1.209#53
31-Aug-2005 11:32:10.253 could not listen on UDP socket: address in use
31-Aug-2005 11:32:10.253 creating IPv4 interface lnc0 failed; interface ignored
31-Aug-2005 11:32:10.253 additionally listening on IPv4 interface lo0, 127.0.0.1#53
31-Aug-2005 11:32:10.253 could not listen on UDP socket: address in use
31-Aug-2005 11:32:10.253 creating IPv4 interface lo0 failed; interface ignored
31-Aug-2005 11:32:10.259 zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
31-Aug-2005 11:32:10.261 dns_rdata_fromtext: test.com.local:7: near '@': extra input text
31-Aug-2005 11:32:10.262 zone 19.202.220.in-addr.arpa/IN: loading master file test.com.local: extra input text
31-Aug-2005 11:32:10.262 zone test.com/IN: loading master file test.com.zone: file not found
31-Aug-2005 11:32:10.262 zone localhost/IN: loading master file localhost.zone: file not found
31-Aug-2005 11:32:10.263 running
31-Aug-2005 12:32:10.239 listening on IPv4 interface lnc0, 192.168.1.209#53
31-Aug-2005 12:32:10.257 could not listen on UDP socket: address in use
31-Aug-2005 12:32:10.257 creating IPv4 interface lnc0 failed; interface ignored
31-Aug-2005 12:32:10.257 listening on IPv4 interface lo0, 127.0.0.1#53
31-Aug-2005 12:32:10.257 could not listen on UDP socket: address in use
31-Aug-2005 12:32:10.257 creating IPv4 interface lo0 failed; interface ignored
31-Aug-2005 12:32:10.257 not listening on any interfaces
31-Aug-2005 13:32:10.252 listening on IPv4 interface lnc0, 192.168.1.209#53
31-Aug-2005 13:32:10.253 could not listen on UDP socket: address in use
31-Aug-2005 13:32:10.253 creating IPv4 interface lnc0 failed; interface ignored
31-Aug-2005 13:32:10.253 listening on IPv4 interface lo0, 127.0.0.1#53
31-Aug-2005 13:32:10.253 could not listen on UDP socket: address in use
31-Aug-2005 13:32:10.253 creating IPv4 interface lo0 failed; interface ignored
31-Aug-2005 13:32:10.253 not listening on any interfaces
哪位高手帮忙看看,问题出现在哪里?还有就是 could not listen on UDP socket: address in use这句话不知道是什么意思?
谢谢,烦请详细解释一下!!!

论坛徽章:
0
2 [报告]
发表于 2005-08-31 17:56 |只看该作者

DNS的一个问题,请求帮忙

把你的named.conf和几个区域文件发上来看看先!

论坛徽章:
0
3 [报告]
发表于 2005-08-31 18:11 |只看该作者

DNS的一个问题,请求帮忙

named.conf 内容:
options {
directory "/var/named"; #named区文件目录
pid-file "named.pid"; #进程id文件名
};
#controls {
#       inet 127.0.0.1 allow { localhost; } keys { rndckey; };
#};
zone "." IN {
        type hint;
        file "named.root";
};

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

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "localhost.rev";
        allow-update { none; };
};

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


zone "19.202.220.in-addr.arpa" IN {
        type master;
        file "test.com.local";
        allow-update { none; };
};
test.com.zoon 内容
$ttl    1D
@               IN SOA  test.com.  root.test.com. (

                                       1053891162
                                        3H
                                        15M
                                        1W
                                        1D )

                        IN NS          test.com.
                        IN MX    5    test.com.
www                IN A          192.168.1.210

test.com.local的内容:
$TTL 86400
@ IN SOA test.com. root.test.com.(
20031001;
7200;
3600;
43200;
86400;
@ IN NS test.com.
209 IN PTR dns.test.com.

其余的文件named.root ,localhost.rev,localhost.zoon是用的在网上下栽的默认的设置内容.这里就贴一些,我自己所设置的ZOON,LOCAL,正反解析 部分内容.难道是我的设置有什么问题么?谢谢!期待........

论坛徽章:
0
4 [报告]
发表于 2005-08-31 19:30 |只看该作者

DNS的一个问题,请求帮忙

test.com.zoon 内容 (不知道是你写错了还是你本身就是有错误test.com.zone)
$ttl    1D
@               IN SOA  test.com.  root.test.com. (

                                      1053891162
                                       3H
                                       15M
                                       1W
                                       1D )

                       IN NS          test.com.
                       IN MX    5    test.com.
www                IN A          192.168.1.210

31-Aug-2005 11:32:10.262 zone test.com/IN: loading master file test.com.zone: file not found
31-Aug-2005 11:32:10.262 zone localhost/IN: loading master file localhost.zone: file not found
看到上面这些错误了文件可都没有发现啊怎么可能解析呢?

看到你上面的log发现你的错误信息太多自己对着它改改先(你不贴上来我也不好帮你)
31-Aug-2005 11:32:10.235 none:0: open: /etc/namedb/rndc.key: file not found看到这一句了嘛

inet 127.0.0.1 allow { localhost; } keys { rndckey; }; 这里就是定义keys文件的哪你这个rndc.key文件有没有存在呢?

论坛徽章:
0
5 [报告]
发表于 2005-09-01 09:08 |只看该作者

DNS的一个问题,请求帮忙

谢谢 小虎牙兄:
我是在我的虚拟机VM上安装的一个FREEBSD,以上的错误,除了我的漏(或错误)操作以外,其他的错误如:
could not listen on UDP socket: address in use
creating IPv4 interface lnc0 failed; interface ignored 等会不会跟我是在虚拟机上运行并配置有关系了.因为我没有另外一台机器做测试,所以只有利用VM 来做.

论坛徽章:
0
6 [报告]
发表于 2005-09-01 10:24 |只看该作者

DNS的一个问题,请求帮忙

这是我新做的一个测试.运行后所得到的LOG信息:
01-Sep-2005 10:14:33.898 starting BIND 9.3.1 -g
01-Sep-2005 10:14:33.903 loading configuration from '/usr/named/etc/named.conf'
01-Sep-2005 10:14:33.916 listening on IPv4 interface lnc0, 192.168.1.209#53
01-Sep-2005 10:14:33.917 could not listen on UDP socket: address in use
01-Sep-2005 10:14:33.917 creating IPv4 interface lnc0 failed; interface ignored
01-Sep-2005 10:14:33.917 listening on IPv4 interface lo0, 127.0.0.1#53
01-Sep-2005 10:14:33.917 could not listen on UDP socket: address in use
01-Sep-2005 10:14:33.917 creating IPv4 interface lo0 failed; interface ignored
01-Sep-2005 10:14:33.917 not listening on any interfaces
01-Sep-2005 10:14:33.921 /usr/named/etc/named.conf:7: couldn't add command channel 127.0.0.1#953: address in use

01-Sep-2005 10:14:33.921 /usr/named/etc/named.conf:17: couldn't add command channel 127.0.0.1#953: address in use
01-Sep-2005 10:14:33.922 ignoring config file logging statement due to -g option
01-Sep-2005 10:14:33.925 additionally listening on IPv4 interface lnc0, 192.168.1.209#53
01-Sep-2005 10:14:33.925 could not listen on UDP socket: address in use
01-Sep-2005 10:14:33.925 creating IPv4 interface lnc0 failed; interface ignored
01-Sep-2005 10:14:33.927 additionally listening on IPv4 interface lo0, 127.0.0.1#53
01-Sep-2005 10:14:33.927 could not listen on UDP socket: address in use
01-Sep-2005 10:14:33.927 creating IPv4 interface lo0 failed; interface ignored
01-Sep-2005 10:14:33.929 zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
01-Sep-2005 10:14:33.932 zone 1.168.192.in-addr.arpa/IN: loaded serial 20031001
01-Sep-2005 10:14:33.935 zone test.com/IN: loaded serial 1053891162
01-Sep-2005 10:14:33.937 zone localhost/IN: loaded serial 42
01-Sep-2005 10:14:33.938 running
不知道这些错误是什么原因造成的?我做了几次的测试这些错误就没有少过,我是在虚拟机上做的.这跟在VM上做有关系吗?哪位帮忙一下,我的头都弄大了....

/usr/named/etc/named.conf:7: couldn't add command channel 127.0.0.1#953: address in use
01-Sep-2005 10:14:33.921 [color=red]/usr/named/etc/named.conf:17: couldn't add command channel 127.0.0.1#953: address in use[
我的named.conf配置如下:
key "rndc-key" {
        algorithm hmac-md5;
        secret "Q3ta7SETEyKuGW8F14Ehbw==";
};

controls {
       inet 127.0.0.1 port 953//提示这里有问题
                allow { 127.0.0.1; } keys { "rndc-key"; };
};


options {
directory "/var/named";
pid-file "named.pid";
};
controls {
       inet 127.0.0.1 allow { localhost; } keys { rndc-key; }; //提示这里有问题
};
zone "." IN {
        type hint;
        file "named.root";
};

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

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "localhost.rev";
        allow-update { none; };
};

zone "test.com" IN {
        type master;
        file "test.com.zoon";
        allow-update { none; };
};

论坛徽章:
0
7 [报告]
发表于 2005-09-01 13:43 |只看该作者

DNS的一个问题,请求帮忙

就没有哪位XDJM帮忙了吗

论坛徽章:
0
8 [报告]
发表于 2005-09-01 16:51 |只看该作者

DNS的一个问题,请求帮忙

01-Sep-2005 10:14:33.922 ignoring config file logging statement due to -g option


兄弟我也有这个提示  我想问一下 你的日志文件能看的到吗?

论坛徽章:
0
9 [报告]
发表于 2005-09-01 17:24 |只看该作者

DNS的一个问题,请求帮忙

可以看到的 (freebsd环境下)
启动named时输入:#/usr/local/etc/named  -g (也许你的安装目录与此不同)就可以看到启动信息了
还有 就是在 #less /var/log/messages 也可以看到....
期待.....发表于: 2005-09-01 10:24    发表主题:的帮忙结果..

论坛徽章:
0
10 [报告]
发表于 2005-09-02 10:49 |只看该作者

DNS的一个问题,请求帮忙

我以进入我的盲点了不知道怎么解决这个问题,继续期待.......
哪位好心人帮忙我解决一下如上问题呢 ??
问题是-> 发表于: 2005-09-01 10:24    发表主题:
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP