Discussion:
IPv6 DDNS with dhcp-4.2.1
Jonathan Barber
2011-03-16 17:56:02 UTC
Permalink
I'm trying (and failing) to get dhcpd to update my DNS server with the
hostname defined by the name of the host declarations for IPv6
clients.

I'm using the 4.2.1 release of the ISC DHCP as the DHCP server,
compiled on Red Hat 5.4 x86_64. My test client is the stock "dhcp6c"
programs on RHEL5.4 x86_64.

My dhpcd configuration is as follows:
ddns-update-style interim;
option dhcp6.name-servers fe80:0:0:0:250:56ff:fe99:123;
option domain-name bork;

key dhcpupdate {
algorithm hmac-md5;
secret KEOh21UeVROIuQFECY8hNA==;
}

zone bork. {
primary 10.112.29.250;
key dhcpupdate;
}

host ies-dev-gluster3 {
log(error, concat("IPV6: ", host-decl-name));
fixed-address6 fc00::2;
host-identifier option dhcp6.client-id
00:01:00:01:15:12:53:b9:48:5a:8a:2f:e0:2a;
ddns-hostname = host-decl-name;
}

subnet6 fc00::/7 {
}

I start the server with:
dhcpd -6 -cf /etc/dhcpdv6.conf -lf /var/lib/dhcpv6/server6.leases

Running the client I get the new IPv6 address, and it updates the
nameserver configuration in /etc/resolv.conf - but the dhcpd doesn't
update the DNS - in fact it looks like the daemon doesn't even try to
contact the DNS server.

I see the following messages in the log:
Mar 16 17:17:27 ns0 dhcpd: Solicit message from
fe80::250:56ff:fe99:138 port 546, transaction ID 0xEB300B00
Mar 16 17:17:27 ns0 dhcpd: data: host_decl_name: not available
Mar 16 17:17:27 ns0 dhcpd: data: host_decl_name: not available
Mar 16 17:17:27 ns0 dhcpd: Sending Advertise to fe80::250:56ff:fe99:138 port 546
Mar 16 17:17:28 ns0 dhcpd: Request message from
fe80::250:56ff:fe99:138 port 546, transaction ID 0x7D2D5400
Mar 16 17:17:28 ns0 dhcpd: data: host_decl_name: not available
Mar 16 17:17:28 ns0 dhcpd: data: host_decl_name: not available
Mar 16 17:17:28 ns0 dhcpd: Sending Reply to fe80::250:56ff:fe99:138 port 546

I've tried setting the "ddns-hostname" parameter to a constant value
and nothing happens. Ditto if I remove the parameter completely.

I've used almost exactly the same configuration of IPv4, and it works,
so I don't think I'm doing anything stupid.

Should it work? Can anyone see if I'm missing something obvious?

Cheers
--
Jonathan Barber <***@gmail.com>
s***@nryc.fr
2011-03-16 18:37:33 UTC
Permalink
Post by Jonathan Barber
I'm trying (and failing) to get dhcpd to update my DNS server with the
hostname defined by the name of the host declarations for IPv6
clients.
I'm using the 4.2.1 release of the ISC DHCP as the DHCP server,
compiled on Red Hat 5.4 x86_64. My test client is the stock "dhcp6c"
programs on RHEL5.4 x86_64.
ddns-update-style interim;
option dhcp6.name-servers fe80:0:0:0:250:56ff:fe99:123;
option domain-name bork;
key dhcpupdate {
algorithm hmac-md5;
secret KEOh21UeVROIuQFECY8hNA==;
}
zone bork. {
primary 10.112.29.250;
key dhcpupdate;
}
host ies-dev-gluster3 {
log(error, concat("IPV6: ", host-decl-name));
fixed-address6 fc00::2;
host-identifier option dhcp6.client-id
00:01:00:01:15:12:53:b9:48:5a:8a:2f:e0:2a;
ddns-hostname = host-decl-name;
}
subnet6 fc00::/7 {
}
dhcpd -6 -cf /etc/dhcpdv6.conf -lf /var/lib/dhcpv6/server6.leases
Running the client I get the new IPv6 address, and it updates the
nameserver configuration in /etc/resolv.conf - but the dhcpd doesn't
update the DNS - in fact it looks like the daemon doesn't even try to
contact the DNS server.
Mar 16 17:17:27 ns0 dhcpd: Solicit message from
fe80::250:56ff:fe99:138 port 546, transaction ID 0xEB300B00
Mar 16 17:17:27 ns0 dhcpd: data: host_decl_name: not available
Mar 16 17:17:27 ns0 dhcpd: data: host_decl_name: not available
Mar 16 17:17:27 ns0 dhcpd: Sending Advertise to fe80::250:56ff:fe99:138 port 546
Mar 16 17:17:28 ns0 dhcpd: Request message from
fe80::250:56ff:fe99:138 port 546, transaction ID 0x7D2D5400
Mar 16 17:17:28 ns0 dhcpd: data: host_decl_name: not available
Mar 16 17:17:28 ns0 dhcpd: data: host_decl_name: not available
Mar 16 17:17:28 ns0 dhcpd: Sending Reply to fe80::250:56ff:fe99:138 port 546
I've tried setting the "ddns-hostname" parameter to a constant value
and nothing happens. Ditto if I remove the parameter completely.
I've used almost exactly the same configuration of IPv4, and it works,
so I don't think I'm doing anything stupid.
Should it work? Can anyone see if I'm missing something obvious?
Maybe the "ddns-domainname" statement?

I'm new to DHCP(v6) and DDNS but I think "host" statements are global so
you have to tell on which DNS zone the DHCP should make the update.

In my case it's on the global configuration section and also in my
"subnet6" section. You don't use IPv6 ranges so maybe you need to put it
in you "host" section.

Nicolas
Jonathan Barber
2011-03-17 09:45:33 UTC
Permalink
Post by s***@nryc.fr
Post by Jonathan Barber
I'm trying (and failing) to get dhcpd to update my DNS server with the
hostname defined by the name of the host declarations for IPv6
clients.
[snip]
Post by s***@nryc.fr
Post by Jonathan Barber
Should it work? Can anyone see if I'm missing something obvious?
Maybe the "ddns-domainname" statement?
I'm new to DHCP(v6) and DDNS but I think "host" statements are global so you
have to tell on which DNS zone the DHCP should make the update.
In my case it's on the global configuration section and also in my "subnet6"
section. You don't use IPv6 ranges so maybe you need to put it in you "host"
section.
I tried adding the ddns-domainname parameter in multiple places in my
config, all to no avail.

But I changed the host and subnet6 declarations to:
host ies-dev-gluster3 {
host-identifier option dhcp6.client-id
00:01:00:01:15:12:53:b9:48:5a:8a:2f:e0:2a;
ddns-hostname "foo";
}

subnet6 fc00::/7 {
range6 fc00::2 fc00::20;
}

And it's now registering AAAA record in DNS. Adding the fixed-address6
statement back to the host declaration breaks the DDNS.

Setting "ddns-hostname = host-decl-name;" doesn't work and gives the
error message:
data: host_decl_name: not available

I've also tried the "use-host-decl-names on" statement in a global,
but it doesn't do anything.

I guess these are bugs, so I'll raise them on the bug list.

Thanks for your help.
Post by s***@nryc.fr
Nicolas
--
Jonathan Barber <***@gmail.com>
Simon Hobson
2011-03-17 10:28:17 UTC
Permalink
Post by Jonathan Barber
And it's now registering AAAA record in DNS. Adding the fixed-address6
statement back to the host declaration breaks the DDNS.
DDNS isn't done for fixed-address clients. Nor is a lease file entry
created for them - basically there is no lease recorded and no lease
lifetime processing is done.

If you want a client with a fixed address but lease processing, then
consider creating a reserved lease.

Either create a skeleton lease with the reserved flag set, or add
reserved to an existing lease. This can be done by stopping the
server and editing the leases file, or I think it's been said that it
can be done via OMAPI.
--
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
Jonathan Barber
2011-03-17 11:14:01 UTC
Permalink
Post by Jonathan Barber
And it's now registering AAAA record in DNS. Adding the fixed-address6
statement back to the host declaration breaks the DDNS.
DDNS isn't done for fixed-address clients. Nor is a lease file entry created
for them - basically there is no lease recorded and no lease lifetime
processing is done.
If you want a client with a fixed address but lease processing, then
consider creating a reserved lease.
Either create a skeleton lease with the reserved flag set, or add reserved
to an existing lease. This can be done by stopping the server and editing
the leases file, or I think it's been said that it can be done via OMAPI.
Ok, that's documented under the RESERVED LEASES section of the
dhcpd.conf man page.

But the "ddns-hostname = host-decl-name" should work with a range right?
--
Simon Hobson
--
Jonathan Barber <***@gmail.com>
Loading...