ddns using client's hostname

dhcp dhcp at watkins-home.com
Sat May 15 23:20:19 UTC 2010


Hi,

            I have dhcpd working with ddns to my bind9 server.  However, I
want usable hostnames and some system don't send a hostname.  I want is to
use the clients hostname if one exist (from the client) or make one up if
none exists.  I just can't figure out how to do this.

 

            I can make one up using this:

ddns-hostname = concat("dhcp-", binary-to-ascii(10, 8, "-",
leased-address));

 

            But as I said, if the client supplies a hostname I want to use
that.

 

            I know the client's hostname is in the DHCP DHCPDISCOVER
message, here is an example where the hostname is H36372437:

May 15 19:18:16 linux dhcpd: DHCPDISCOVER from 00:12:f0:ec:e7:c4 via eth0

May 15 19:18:17 linux dhcpd: DHCPOFFER on 192.168.0.203 to 00:12:f0:ec:e7:c4
(H36372437) via eth0

May 15 19:18:17 linux dhcpd: Added new forward map from
dhcp-192-168-0-203.watkins-home.com to 192.168.0.203

May 15 19:18:17 linux dhcpd: added reverse map from
203.0.168.192.in-addr.arpa. to dhcp-192-168-0-203.watkins-home.com

May 15 19:18:17 linux dhcpd: DHCPREQUEST for 192.168.0.203 (192.168.0.2)
from 00:12:f0:ec:e7:c4 (H36372437) via eth0

May 15 19:18:17 linux dhcpd: DHCPACK on 192.168.0.203 to 00:12:f0:ec:e7:c4
(H36372437) via eth0

 

Thanks for any help.

 

Guy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20100515/cb94738e/attachment.html>


More information about the dhcp-users mailing list