Bind9 多域DDNS不更新???[緩存原因,已搞定!]
我配置了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 編輯 ]
《解決方案》
自己頂一下.
# 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記錄),我把這個緩存清空一下,再重新獲取,就對了.
# 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 編輯 ]
《解決方案》
回復 #1 sulin515 的帖子
每個ip對應一個解析記錄的文件
《解決方案》
學習