免费注册 查看新帖 |

Chinaunix

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

[DNS] Bind9 多域DDNS不更新???[缓存原因,已搞定!] [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-06-04 13:17 |只看该作者 |倒序浏览
我配置了DDNS,使用第一个默认域ccde.cnpc就可以动态更新,但如果使用另一个域jg.com就不能,这两个域都是能正常解析(nslookup都有结果)的,


  --------                                 --------
   | DNS|                                 | DHCP |
  --------                                 --------
      |                                           |
      |                                           |
      ----------           ---------------
                   |           |
          --------------------
          |   L3 Switch         |
          ---------------------
                        |
                        |
                     -------
                    |  PC  |
                    --------

DNS: 10.132.0.118
DHCP: 10.132.0.116
L3 SW: 10.132.0.1
            10.132.144.1

DNS服务器配置:
    named.conf
key "rndckey" {
        algorithm hmac-md5;
        secret "SIUENXwRbZdmxtKRuhMvGw==";
};

controls {
        inet 127.0.0.1 port 953
        allow { 127.0.0.1; } keys { "rndckey"; };
};

options {
        directory "/oursoft/program/bind9/etc";
        forwarders {10.8.1.1; 10.33.48.18; 10.33.48.19; };
        pid-file "named.pid"; #pid
};

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 "named.local";
        allow-update{ none; };
};

zone "ccde.cnpc" IN {
        type master;
        file "ccde.cnpc.zone";
        notify yes;
        allow-update { none; };
        allow-query { any; };
};

zone "0.132.10.in-addr.arpa" IN {
        type master;
        file "0.132.10.local";
        allow-update{ none; };
        allow-query { any; };
};

zone "jg.com" IN {
        type master;
        file "jg.zone";
        notify yes;
        allow-update { key rndckey; };
        allow-query { any; };
};

zone "144.132.10.in-addr.arpa" IN {
        type master;
        file "144.132.10.local";
        allow-update{ key rndckey; };
        allow-query { any; };
};


jg.zone
$ttl    1D
@               IN SOA  jg.com.  root.jg.com. (

                                      1053891170
                                       3H
                                       15M
                                       1W
                                       1D )

                       IN NS          jg.com.
                       IN MX    5    jg.com.
dns     IN      A       10.132.144.118


144.132.10.local
$TTL 86400
@ IN SOA jg.com. root.jg.com.(
20031010;
7200;
3600;
43200;
86400);
@ IN NS jg.com.
118 IN PTR dns.jg.com.





DHCP配置

server-identifier 10.132.0.119;
authoritative;
ddns-update-style interim;
ignore client-updates;
omapi-port 7911;


key "rndckey" {
        algorithm hmac-md5;
        secret "SIUENXwRbZdmxtKRuhMvGw==";
};

zone jg.com. {
        primary 10.132.0.119;
        key "rndckey";
}

zone 144.132.10.in-addr.arpa. {
        primary 10.132.0.119;
        key "rndckey";
}

        option nis-domain               "jg.com";
        option domain-name              "jg.com";
        option domain-name-servers      10.132.0.119;

        default-lease-time 21600;
        max-lease-time 43200;
        allow booting;
        allow bootp;
## vlan 31 公司领导 ##
subnet 10.132.144.0 netmask 255.255.255.0 {
        range 10.132.144.66 10.132.144.123;
        option subnet-mask 255.255.255.0;
        option routers 10.132.144.1;
}



F:\Documents and Settings\berean>nslookup
Default Server:  dns2.ccde.cnpc
Address:  10.132.0.119

> dns.jg.com
Server:  dns2.ccde.cnpc
Address:  10.132.0.119

Name:    dns.jg.com
Address:  10.132.144.118

> 10.132.144.118
Server:  dns2.ccde.cnpc
Address:  10.132.0.119

Name:    dns.jg.com
Address:  10.132.144.118

解析都没问题.

现在如果是用jg.com这个域,就不能DDNS,如果把update改到ccde.cnpc这个域,就是可以的.不知道是哪里有没设置对?

[ 本帖最后由 sulin515 于 2009-6-4 15:52 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2009-06-04 14:55 |只看该作者
自己顶一下.


[root@DHCP1 ~]# more dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page.
# This lease file was written by isc-dhcp-4.1.0

lease 10.132.144.66 {
  starts 4 2009/06/04 07:06:22;
  ends 4 2009/06/04 13:06:22;
  tstp 4 2009/06/04 13:06:22;
  cltt 4 2009/06/04 07:06:22;
  binding state active;
  next binding state free;
  hardware ethernet 00:e0:4c:50:0b:68;
  uid "\001\000\340LP\013h";
  set ddns-fwd-name = "sulin.ccde.cnpc";
  set ddns-txt = "31d6c244aef4ced018dac2bef05e276166";
  set ddns-rev-name = "66.144.132.10.in-addr.arpa.";
  option agent.circuit-id 0:4:0:1f:1:c;
  option agent.remote-id 0:6:0:23:34:c0:55:0;
  client-hostname "sulin";
}
lease 10.132.144.2 {
  starts 3 2009/06/03 09:44:02;
  ends 3 2009/06/03 15:44:02;
  tstp 3 2009/06/03 15:44:02;
  cltt 3 2009/06/03 09:44:02;
  binding state free;
  hardware ethernet 00:e0:4c:50:0b:68;
  uid "\001\000\340LP\013h";
  set ddns-rev-name = "2.144.132.10.in-addr.arpa.";
  set ddns-txt = "31d6c244aef4ced018dac2bef05e276166";
  set ddns-fwd-name = "sulin.ccde.cnpc";
}
server-duid "\000\001\000\001\021e\335\340\000!^(%\320";

lease 10.132.144.66 {
  starts 4 2009/06/04 07:34:47;
  ends 4 2009/06/04 13:34:47;
  cltt 4 2009/06/04 07:34:47;
  binding state active;
  next binding state free;
  hardware ethernet 00:e0:4c:50:0b:68;
  uid "\001\000\340LP\013h";
  set ddns-fwd-name = "sulin.ccde.cnpc";
  set ddns-txt = "31d6c244aef4ced018dac2bef05e276166";
  set ddns-rev-name = "66.144.132.10.in-addr.arpa.";
  option agent.circuit-id 0:4:0:1f:1:c;
  option agent.remote-id 0:6:0:23:34:c0:55:0;
  client-hostname "sulin";
}



哈哈,原来这个缓存是在/var/db/dhcpd.leases里,我一直没成功,就是因为缓存(以前那个域已经缓存了DDNS记录),我把这个缓存清空一下,再重新获取,就对了.



[root@DHCP1 ~]# more /var/db/dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page.
# This lease file was written by isc-dhcp-4.1.0

server-duid "\000\001\000\001\021\2727\225\000!^(%\320";

lease 10.132.144.66 {
  starts 4 2009/06/04 07:43:48;
  ends 4 2009/06/04 13:43:48;
  cltt 4 2009/06/04 07:43:48;
  binding state active;
  next binding state free;
  hardware ethernet 00:e0:4c:50:0b:68;
  uid "\001\000\340LP\013h";
  set ddns-rev-name = "66.144.132.10.in-addr.arpa.";
  set ddns-txt = "31d6c244aef4ced018dac2bef05e276166";
  set ddns-fwd-name = "sulin.jg.com";
  option agent.circuit-id 0:4:0:1f:1:c;
  option agent.remote-id 0:6:0:23:34:c0:55:0;
  client-hostname "sulin";
}

[ 本帖最后由 sulin515 于 2009-6-4 15:52 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2009-06-09 17:23 |只看该作者

回复 #1 sulin515 的帖子

每个ip对应一个解析记录的文件

论坛徽章:
7
天蝎座
日期:2013-08-16 23:19:32丑牛
日期:2014-01-08 09:20:14寅虎
日期:2014-01-11 11:03:44午马
日期:2014-04-28 11:02:40天秤座
日期:2014-05-16 23:24:24摩羯座
日期:2014-07-20 10:46:04卯兔
日期:2014-08-08 15:21:41
4 [报告]
发表于 2009-06-17 11:25 |只看该作者
学习
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP