免费注册 查看新帖 |

Chinaunix

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

[DNS] 帮我看看dns问题! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-12-15 14:43 |只看该作者 |倒序浏览
使用nslookup查询出现下面的问题。
>;foo# nslookup
>; lserver 192.168.0.111
Default server: 192.168.0.111
Address: 192.168.0.111#53
>; foo.bar.com
;; connection timed out; no servers could be reached
>; lserver localhost
Default server: localhost
Address: ::1#53
>; foo.bar.com
Server:         localhost
Address:        ::1#53

** server can't find foo.bar.com: NXDOMAIN
>;  

/var/log/messages日志里出现的信息。
Dec 15 14:06:13 foo named[574]: starting BIND 9.3.0
Dec 15 14:06:13 foo named[574]: could not listen on UDP socket: address in use
Dec 15 14:06:13 foo named[574]: creating IPv4 interface lo0 failed; interface ignored
Dec 15 14:06:13 foo named[574]: could not listen on UDP socket: address in use
Dec 15 14:06:13 foo named[574]: creating IPv6 interface lo0 failed; interface ignored
Dec 15 14:06:13 foo named[574]: not listening on any interfaces
Dec 15 14:06:13 foo named[574]: couldn't add command channel 127.0.0.1#953: address in use
Dec 15 14:06:13 foo named[574]: couldn't add command channel ::1#953: address in use
Dec 15 14:06:13 foo named[574]: could not listen on UDP socket: address in use
Dec 15 14:06:13 foo named[574]: creating IPv4 interface lo0 failed; interface ignored
Dec 15 14:06:13 foo named[574]: could not listen on UDP socket: address in use
Dec 15 14:06:13 foo named[574]: creating IPv6 interface lo0 failed; interface ignored

named.conf文件内容:
foo# less named.conf
options {
        directory       "/etc/namedb";
        pid-file        "/var/run/named/pid";
        dump-file       "/var/dump/named_dump.db";
        statistics-file "/var/stats/named.stats";
        listen-on       { 127.0.0.1; };
        listen-on-v6    { ::1; };
};

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

zone "bar.com" {
        type master;
        file "master/bar.com";
        allow-query {any;};
};

zone "0.168.192.IN-ADDR.ARPA" {
        type master;
        file "master/0.168.192";
};

zone "1.0.0.0.0.0.0.0.0.0.0.0.0.c.e.f.IP6.ARPA" {
        type master;
        file "master/fec0:0:0:1";
};

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

zone "1.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" {
        type master;
        file "master/localhost-v6.rev";
};

zone "1.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.INT" {
        type master;
        file "master/localhost-v6.rev";
};
foo# less bar.com
;       From: @(#)localhost.rev 5.1 (Berkeley) 6/30/90
; $FreeBSD: src/etc/namedb/PROTO.localhost.rev,v 1.6 2000/01/10 15:31:40 peter Exp $
;
; This file is automatically edited by the `make-localhost' script in
; the /etc/namedb directory.
;

$TTL    3600

@               IN      SOA     foo.bar.com. root.bar.com.  (
                                20041215; Serial
                                3600    ; Refresh
                                900     ; Retry
                                3600000 ; Expire
                                3600 )  ; Minimum
;
;Name server (The name '@' is implied)
;
                IN NS           foo.bar.com.

;
;Addresses for the canonical names
;
localhost       IN A            127.0.0.1
localhost       IN AAAA         ::1

foo             IN A            192.168.0.111
foo             IN AAAA         fec0:0:0:1::1

www             IN A            192.168.0.111
www             IN AAAA         fec0:0:0:1::1

ftp             IN A            192.168.0.111
ftp             IN AAAA         fec0:0:0:1::1

帮忙看看是怎么回事。

论坛徽章:
0
2 [报告]
发表于 2004-12-15 19:34 |只看该作者

帮我看看dns问题!

现在好像又能使用了,但是使用命令:ping6 foo.bar.com时,为什么会出现ping6: hostname nor servname provided, or not known这样的错误呢?在nslookup里面是可以正常进行解析的。
使用dns进行解析的时候,怎样来控制它使它能正确的解析成我们所想要的ipv4 or ipv6地址呢?是不是使用在dns启动的时候选择:-6 or -4 参数呀?

论坛徽章:
0
3 [报告]
发表于 2004-12-16 12:22 |只看该作者

帮我看看dns问题!

是否在/etc/resolv.conf中要添加一个这样的条目:
nameserver       fec0:0:0:1::1
(fec0:0:0:1::1是我机器上的ipv6地址)这样在进行查询的时候会转发到bind进行对其进行ipv6的解析?
BIND在什么情况下会把域名解析成IPv4?什么情况下才解析成IPv6呢?

论坛徽章:
0
4 [报告]
发表于 2004-12-22 09:42 |只看该作者

帮我看看dns问题!

没有人研究这方面的东西吗?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP