What DHCP Option Tells the DHCP Server the Client's Host name?
martin at dc.cis.okstate.edu
Sun Jan 20 14:40:11 UTC 2008
I have been looking for the host-name related data that a
booting computer sends to the DHCP server in the process of
obtaining a lease. My question may have been misinterpreted due
to the fact that I was confused, also. It appears that host-name
(Option 12), is used to send a host name back to the booting
client. The documentation also says that most clients ignore
this string. I am looking for a way to read what name the client
is sending to the DHCP server that may or may not be put in to
part of a dynamic DNS update by the DHCP server if the rules for
that subnet allow.
A search of archives turned up a valuable discussion of
using logging statements as follows:
log (debug,pick-first-value(host-name, dhcp-client-identifier, "nada"));
This works like an echo or printf statement to log what the
server sees in those strings and in this case,I had it print "nada"
if all tested strings are null. My log is full of nada right now
as both strings are always empty but the booting and DDNS update
Another thing I don't understand is what causes the computer
names of many Windows clients to actually show up in the DHCP
log but my test system never does. The test system is another
FreeBSD device in which I set the fqdn.fqdn value in dhclient.
an example pulled randomly from our production server:
DHCPDISCOVER from 00:a0:d1:92:e7:03 (3feathers-PC) via 10.192.127.254
Huge numbers of systems print their names in this way, but the host-name
string remains empty. Both the test and production servers are
the same dhcpdv3.0.5 version.
The goal, here, is to tell clients to make a certain
suffix part of their host name and we will automatically place
them in a class that gives them the right domain name and other
options to join a Microsoft Active Directory domain.
After evaluating the names, the rest of the problem
should be straight-forward.
Nothing seems broken. I just don't understand all I
thought I knew.
Many thanks in advance.
Martin McCormick WB5AGZ Stillwater, OK
OSU Information Technology Department Network Operations Group
More information about the dhcp-users