[NTLUG:Discuss] Dynamic DNS via DHCP snippet (assigning names when none requested)
Chris Cox
cjcox at acm.org
Sat Oct 20 22:22:14 CDT 2001
Here's a snippet from a dhcpd.conf file (I'll try to post an entire presentation
soon)... but here's something I left out of my file I had today (I really
meant to have this... sorry). There's some really rough documentation
in the dhcp-eval man page that comes with dhcp 3.0... but a lot more
documentation is needed IMHO.
#
# Assign a DNS name for clients who don't provide a
# host-name... the generated name is an ascii representation
# of their MAC address.
#
if exists host-name {
log (debug, concat ("Supplied a hostname [", option host-name, "]"));
ddns-hostname = option host-name;
} else {
ddns-hostname = binary-to-ascii (16,
8,
"-",
substring (hardware, 1, 6));
log (debug, concat ("Generating hostname [", ddns-hostname, "]"));
}
More information about the Discuss
mailing list