I had our dynamic dns working a few weeks ago, but I'm not sure when it
stopped and can't figure out what is failing.
I have a subnet X.Y.A.0/22 (X.Y.A.0/255.255.252.0) with static DNS
entries for each address I have available within MYDOMAIN.COM (about
1000 total).
I realized today that if I inadvertently set a dhcp cilent's host name
to a name that already exists as a static DNS entry
(hosta-1.MYDOMAIN.COM), the dynamic update will delete the entry when
the lease expires (duhrrr!). So to get around the problem, I created a
new subzone called 'dhcp.MYDOMAIN.COM', and want to use that for all
hosts getting dynamic addresses. However, nothing is getting updated in
my new subdomain. It may have stopped working before I monkeyed with
it. DHCP is working and handing out addresses, but the dynamic update
doesn't happen.
Can anyone offer any advice as to how to debug the problem? I added
the '-d' option to the $NSUPDATE line inside /etc/dhcp-dns.conf. No
errors are displayed when running ddns.cron.pl manually from the
command-line and there doesn't appear to be any relevant messages in
/var/log/syslog. There are a number of lines generated in the file
/var/lib/dhcp-dns/nsupdate.data and it all appears to be good and
correct.
Here are my config files:
//**********Start: /etc/dhcp-dns.conf
# edit these for your own system
# this conf file is 'required()' into perl scripts so
# perl syntax applies.
$DDNSHOME="/var/lib/dhcp-dns";
$DHCPD="/var/dhcp/dhcpd.leases";
$DOMAIN="dhcp.MYDOMAIN.COM";
$NSUPDATE="/usr/sbin/nsupdate -d";
//***********End: /etc/dhcp-dns.conf
//**********Start: /etc/dhcpd.conf
option domain-name "dhcp.MYDOMAIN.COM";
option domain-name-servers service1.MYDOMAIN.COM,
service2.MYDOMAIN.COM;
option routers X.Y.D.254;
option ntp-servers X.Y.D.252 , X.Y.D.253;
option subnet-mask 255.255.252.0;
default-lease-time 600;
max-lease-time 7200;
subnet X.Y.A.0 netmask 255.255.252.0 {
range X.Y.A.201 X.Y.A.254;
range X.Y.B.201 X.Y.B.227;
option broadcast-address X.Y.D.255;
}
//**********End: /etc/dhcpd.conf
//**********Start: /etc/bind/named.conf
zone "MYDOMAIN.COM" {
type master;
file "/var/cache/bind/MYDOMAIN.COM.hosts";
notify yes;
allow-transfer {
X.Y.D.253;
};
allow-update {
X.Y.D.252;
X.Y.D.253;
127.0.0.1;
};
also-notify {
X.Y.D.253;
};
};
zone "A.Y.X.in-addr.arpa" {
type master;
file "/var/cache/bind/X.Y.A.rev";
allow-transfer {
X.Y.D.253;
};
notify yes;
also-notify {
X.Y.D.253;
};
allow-update {
X.Y.D.252;
X.Y.D.253;
127.0.0.1;
};
};
zone "B.Y.X.in-addr.arpa" {
type master;
file "/var/cache/bind/X.Y.B.rev";
allow-transfer {
X.Y.D.253;
};
notify yes;
also-notify {
X.Y.D.253;
};
allow-update {
X.Y.D.252;
X.Y.D.253;
127.0.0.1;
};
};
zone "C.Y.X.in-addr.arpa" {
type master;
file "/var/cache/bind/X.Y.C.rev";
allow-transfer {
X.Y.D.253;
};
notify yes;
also-notify {
X.Y.D.253;
};
allow-update {
X.Y.D.252;
X.Y.D.253;
127.0.0.1;
};
};
zone "D.Y.X.in-addr.arpa" {
type master;
file "/var/cache/bind/X.Y.D.rev";
allow-transfer {
X.Y.D.253;
};
notify yes;
also-notify {
X.Y.D.253;
};
allow-update {
X.Y.D.252;
X.Y.D.253;
127.0.0.1;
};
};
zone "dhcp.MYDOMAIN.COM" {
type master;
file "/var/cache/bind/dhcp.MYDOMAIN.COM.hosts";
allow-update {
X.Y.D.252;
X.Y.D.253;
127.0.0.1;
};
also-notify {
X.Y.D.253;
};
allow-transfer {
X.Y.D.253;
};
notify yes;
};
//**********End: /etc/bind/named.conf
The nsupdate.data file is now at 9k and growing. I'm not sure if it
should shrink each time an update is successful or not.
Thanks in advance.
Jeff