我的isc-dhcpd-4.3.1配置如下:
ignore client-updates;
ddns-update-style interim;
subnet 192.168.128.0 netmask 255.255.255.0 {
use-host-decl-names on;
update-static-leases on;
key "rndc-key" {
algorithm hmac-md5;
secret "redacted";
};
zone example.com. {
primary 127.0.0.1;
key rndc-key;
}
zone 128.168.192.in-addr.arpa. {
primary 127.0.0.1;
key rndc-key;
}
authoritative;
range 192.168.128.32 192.168.128.63;
next-server 192.168.128.1;
option domain-name "example.com";
option domain-name-servers 192.168.128.1;
group {
host test {
hardware ethernet 00:00:00:00:00:00;
}
}}所发生的是,尽管有ignore client-updates,创建的ddns条目在dhcp查询时默认为服务器的主机名,即:localhost.example.com。服务器在其初始dhcp查询正确地将其主机名设置为test.example.com之后,service networking restart将创建正确的DDNS条目。
我完全不明白dhcpd为什么要听客户端发送localhost主机名,尽管设置告诉它不要这么做。
在这方面提供一些帮助将是很好的。
发布于 2016-12-28 00:36:41
我也遇到了同样的问题,并想出了将ddns-hostname添加到主机配置的解决方案。use-host-decl-names既不改变dhcpd的任何行为,也不改变ignore client-updates的任何行为。
下面的函数终于起作用了,即使是这些客户端仍然试图用它们的主机名更新dns:
host client.foo.bar {
hardware ethernet 00:00:00:00:00:AA;
fixed-address 192.168.42.2;
ddns-hostname "foo";
}如果您找到了更好的解决方案,请告诉我!
https://serverfault.com/questions/757466
复制相似问题