我在 OSX 主机上的 VirtualBox 里面有一组虚拟机。
我的 Gateway-VM 是带有 4 个 NIC 的 Ubuntu 13.04。在这台机器上,ISC-DHCP-Server 和 Bind9 正在运行,并且当提供的 IP 来自相应 NIC 定义的地址池时,DDNS 更新可以正常工作。
如果我确实为客户端机器分配了一个静态地址,那么该条目将在绑定中创建,但是当我关闭该虚拟机并发出 DHCPRELEASE 时,DNS 条目不会被删除。
VM 启动时 /var/log/syslog 的内容:
Aug 11 21:04:55 raring-gw dhcpd: DHCPDISCOVER from 08:00:27:1f:20:81 via eth2
Aug 11 21:04:55 raring-gw dhcpd: DHCPOFFER on 192.168.102.35 to 08:00:27:1f:20:81 via eth2
Aug 11 21:04:55 raring-gw dhcpd: DHCPREQUEST for 192.168.102.35 (192.168.102.1) from 08:00:27:1f:20:81 via eth2
Aug 11 21:04:55 raring-gw dhcpd: DHCPACK on 192.168.102.35 to 08:00:27:1f:20:81 via eth2
Aug 11 21:04:55 raring-gw named[1242]: client 192.168.103.1#46752/key rndc-key: updating zone 'adnet/IN': update unsuccessful: precmysql.services.adnet: 'name not in use' prerequisite not satisfied (YXDOMAIN)
Aug 11 21:04:55 raring-gw named[1242]: client 192.168.103.1#46752/key rndc-key: signer "rndc-key" approved
Aug 11 21:04:55 raring-gw named[1242]: client 192.168.103.1#46752/key rndc-key: updating zone 'adnet/IN': deleting rrset at 'precmysql.services.adnet' A
Aug 11 21:04:55 raring-gw named[1242]: client 192.168.103.1#46752/key rndc-key: updating zone 'adnet/IN': adding an RR at 'precmysql.services.adnet' A
Aug 11 21:04:55 raring-gw dhcpd: Added new forward map from precmysql.services.adnet. to 192.168.102.35
Aug 11 21:04:55 raring-gw named[1242]: client 192.168.103.1#46752/key rndc-key: signer "rndc-key" approved
Aug 11 21:04:55 raring-gw named[1242]: client 192.168.103.1#46752/key rndc-key: updating zone '168.192.in-addr.arpa/IN': deleting rrset at '35.102.168.192.in-addr.arpa' PTR
Aug 11 21:04:55 raring-gw named[1242]: client 192.168.103.1#46752/key rndc-key: updating zone '168.192.in-addr.arpa/IN': adding an RR at '35.102.168.192.in-addr.arpa' PTR
Aug 11 21:04:55 raring-gw dhcpd: Added reverse map from 35.102.168.192.in-addr.arpa. to precmysql.services.adnet.
当虚拟机关闭时,日志条目中的内容如下:
Aug 11 21:08:18 raring-gw dhcpd: DHCPRELEASE of 192.168.102.35 from 08:00:27:1f:20:81 via eth2 (not found)
forward-zone-file 包含虚拟机的以下条目:
precmysql A 192.168.102.35
TXT "000d0dbca2b85df43a3464744da73ab515"
反向区域文件包含:
35 PTR precmysql.services.adnet.
在 /etc/dhcp/dhcpd.conf 中主机定义如下:
host precmysql {
hardware ethernet 08:00:27:1F:20:81;
fixed-address 192.168.102.35;
option host-name "precmysql";
ddns-hostname "precmysql";
}
这是 DHCP 服务器的 DDNS 配置:
ddns-update-style interim;
ddns-updates on;
ignore client-updates;
update-static-leases on;
我查看了 /var/lib/dhcp/dhcpd.leases,其中没有记录任何静态声明。它仅包含来自已定义地址池的分配条目。
有人遇到过同样的问题吗?也许有解决方案吗?谢谢!