What DHCP Option Tells the DHCP Server the Client's Host name?

Glenn Satchell Glenn.Satchell at uniq.com.au
Sun Jan 20 13:16:07 UTC 2008


>To: dhcp-users at isc.org
>Subject: What DHCP Option Tells the DHCP Server the Client's Host name?
>Date: Fri, 18 Jan 2008 15:17:22 -0600
>From: Martin McCormick <martin at dc.cis.okstate.edu>
>
>	This question falls under the category of things I
>thought I knew but found out I didn't.
>
>	I thought it was the dhcp-client-identifier but I am not
>sure because I haven't made anything work that one might expect
>to work.
>
>	The question is whether it isn't working because I am
>looking at the wrong option for a value that will never appear
>there or is it not working because the logic of the conditional
>expression is wrong.
>
>	Is there a statement that will make dhcpd essentially
>"echo" the contents of a variable when running so one can see if
>the option being worked with even contains the desired
>information?

You can use syntax sych as:

set myclientid = option dhcp-client-identifier;

and it will add this variable to the lease structure in dhcpd.leases.

The client identifier is set by MS windows dhcp clients as a '1'
followed by the mac address. Most other dhcp clients do not set it at
all.

Have a look at the dhcp-options man page for a list of the names of the
various options. dhcp-eval man page has the bits for manipulating
them.

The value you want to read is 'option hostname'.

regards,
-glenn


More information about the dhcp-users mailing list