Subject: Re: dhclient.conf and use of client-id
To: None <current-users@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: current-users
Date: 03/18/2005 17:38:41
On Fri, 18 Mar 2005, Greg Troxel wrote:
> It seems dhclient should have an option to construct a client
> identifier from the mac address automatically,
It sort of does. See the dhcp-options(5) man page, search for "SETTING
OPTION VALUES USING EXPRESSIONS", then see the dhcp-eval(5) man page,
then guess that something like one of the following might work:
option dhcp-client-identifier = substring(hardware,1,6);
option dhcp-client-identifier = binary-to-ascii(16, 8, ":",
substring(hardware,1,6);
(The next step, fixing whatever dumb mistakes I have made above, is left
as an exercise for the reader. I personally use a constant string as my
dhcp-client-identifier.)
--apb (Alan Barrett)