免费注册 查看新帖 |

Chinaunix

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

RHEL5 BIND 辅助DNS的一个怪问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-06-30 16:16 |只看该作者 |倒序浏览
本帖最后由 xu8807286 于 2010-06-30 16:18 编辑

 用RHEL5带的bind9.3.6 配置好DNS (192.168.1.1)后配置了另一台辅助DNS(192.168.1.2)

现在遇到一个怪问题:
   检查辅助DNS上已接收到主DNS的相关域信息.客户端不管用主DNS还是辅助DNS都没有问题.
但在辅助DNS上却不能解析,主DNS上可以.
不知哪弄的不对.感觉怪怪处,其它机器通过辅助DNS都可正常解析,为何它自己去不能用自己解析.

配置文件如下:

辅助DNS:
named.caching-nameserver.conf
  1. //
  2. // named.caching-nameserver.conf
  3. //
  4. // Provided by Red Hat caching-nameserver package to configure the
  5. // ISC BIND named(8) DNS server as a caching only nameserver
  6. // (as a localhost DNS resolver only).
  7. //
  8. // See /usr/share/doc/bind*/sample/ for example named configuration files.
  9. //
  10. // DO NOT EDIT THIS FILE - use system-config-bind or an editor
  11. // to create named.conf - edits to this file will be lost on
  12. // caching-nameserver package upgrade.
  13. //
  14. options {
  15.         listen-on port 53 { any; };
  16. //     listen-on-v6 port 53 { ::1; };
  17.         directory       "/var/named";
  18.         dump-file       "/var/named/data/cache_dump.db";
  19.         statistics-file "/var/named/data/named_stats.txt";
  20.         memstatistics-file "/var/named/data/named_mem_stats.txt";

  21.         // Those options should be used carefully because they disable port
  22.         // randomization
  23.         // query-source    port 53;
  24.         // query-source-v6 port 53;

  25. //      allow-query     { localhost; };
  26.         allow-query     { any; };
  27. //      allow-query-cache { localhost; };
  28. };
  29. logging {
  30.         channel default_debug {
  31.                 file "data/named.run";
  32.                 severity dynamic;
  33.         };
  34. };
  35. view localhost_resolver {
  36.         match-clients      { localhost; };
  37.         match-destinations { localhost; };
  38.         recursion yes;
  39.         include "/etc/named.rfc1912.zones";
  40. };
  41. view test.com {
  42.         match-clients      { any; };
  43.         match-destinations { any; };
  44.         recursion yes;
  45.         include "/etc/test.com.db";
  46. };


复制代码
辅助DNS:
test.com.db

  1. zone "test.com" IN {
  2.       type slave;
  3.       file "slaves/test.com.zone";
  4.       masters { 192.168.1.1;};
  5. };

  6. zone "1.168.192.in-addr.arpa" IN {
  7.       type slave;
  8.       file "slaves/test.com.local";
  9.       masters { 192.168.1.1;};
  10. };

复制代码
name.run中有这样的信息,感觉DNS想到外网上去解析一样(我这两台机器都不能上外网):

network unreachable resolving 'www.test.com/A/IN': 2001:503:c27::2:30#53
network unreachable resolving './NS/IN': 2001:503:c27::2:30#53

论坛徽章:
0
2 [报告]
发表于 2010-07-01 21:40 |只看该作者
本帖最后由 xu8807286 于 2010-07-01 21:41 编辑

自己顶一下,最后那个报错信息是IPV6相关的,在/etc/sysconfig/named里把默认的whatever改为-4就好了。
至于那个问题还是没找到原因。不过暂时把named.caching-nameserver.conf中的
  1. view localhost_resolver {
  2.         match-clients      { localhost; };
  3.         match-destinations { localhost; };
  4.         recursion yes;
  5.         include "/etc/named.rfc1912.zones";
复制代码
给去掉后正常了。

论坛徽章:
0
3 [报告]
发表于 2010-07-02 14:55 |只看该作者
看看辅助DNS(192.168.1.2)的
/etc/resolv.conf

论坛徽章:
0
4 [报告]
发表于 2010-07-02 21:52 |只看该作者
设为了自己192.168.2,ping ,host都不能解析,
用nslookup指定了server为192.168.1.2或为127.0.0.1都不行。

论坛徽章:
0
5 [报告]
发表于 2010-07-04 22:32 |只看该作者
同意3楼
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP