dhcpd不推送ddns更新来绑定

BIND和DHCPDconfiguration,但据我所知,DHCPD甚至不会尝试发送dynamicDNS更新到BIND。 我可以手动添加logging使用nsupdate与我已configurationDHCPD使用相同的密钥。

服务器:

eth0:10.0.0.1 static(BIND和DHCPD)eth1:DHCPd分配(外部,不同的子网)

客户:

eth0:分配了DHCP,与服务器eth0的子网相同

DHCPDconfiguration:

authoritative; option domain-name "ops.ss"; option domain-name-servers testvm1.ops.ss; ddns-updates on; ddns-update-style interim; default-lease-time 3600; max-lease-time 7200; log-facility local6; key DDNS_UPDATE { algorithm HMAC-MD5.SIG-ALG.REG.INT; secret "manysecrets"; } zone ops.ss. { primary 127.0.0.1; key DDNS_UPDATE; } zone 0.0.10.in-addr.arpa. { primary 127.0.0.1; key DDNS_UPDATE; } subnet 10.0.0.0 netmask 255.255.255.0 { range 10.0.0.50 10.0.0.99; option routers 10.0.0.1; } 

BINDconfiguration:

 include "/etc/named/ddns.key"; acl trusted { 10.0.0.0/24; 127.0.0.0/8; localnets; localhost; }; options { listen-on port 53 { trusted; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; allow-query { trusted; }; forwarders { 192.168.1.2; }; }; logging { channel default_debug { file "data/named.run"; severity dynamic; }; channel update_log { file "data/bind-updates.log"; severity debug; print-category yes; print-severity yes; print-time yes; }; category update { update_log; }; category update-security { update_log; }; }; zone "." IN { type hint; file "named.ca"; }; zone "ops.ss" IN { type master; file "dynamic/fwd_ops.ss"; allow-update { key DDNS_UPDATE; }; }; zone "0.0.10.in-addr.arpa." { type master; file "dynamic/rev_10.0.0.0_24"; allow-update { key DDNS_UPDATE; }; }; include "/etc/named.rfc1912.zones"; include "/etc/named.root.key"; 

这两个系统都是CentOS 6.4,绑定和@updates的dhcp

DHCPD不会将更新推送到BIND,因为它不知道要更新哪个DNS名称,因为没有定义DDNS主机名。

根据手册页ddns-hostname不需要设置。

  The ddns-hostname statement ddns-hostname name; The name parameter should be the hostname that will be used in set- ting up the client's A and PTR records. If no ddns-hostname is spec- ified in scope, then the server will derive the hostname automati- cally, using an algorithm that varies for each of the different update methods. 

确保dhcp客户端实际上正在发送主机名。 在Ubuntu中,dhclient.conf中的以下选项执行此操作:

 send host-name = gethostname(); 

你的命名configuration看起来很好,一见钟情。

这是我的DHCP服务器设置。 我使用RNDC密钥的:

 subnet 192.168.20.0 netmask 255.255.255.0 { range 192.168.20.100 192.168.20.200; option subnet-mask 255.255.255.0; option routers 192.168.20.1; option domain-name-servers 192.168.20.201; option domain-name "srv.internal.mycompany.be"; ddns-domainname "srv.internal.mycompany.be."; ddns-rev-domainname "in-addr.arpa."; } 

确保指定了ddns-domainname,以便知道要更新哪些区域logging。 不要忘记最后的额外“点”。