Configure dhclient to check value of DHCP options

Jon Smaller jesterx at gmail.com
Mon Jul 20 08:44:27 UTC 2009


Hi list,
I am trying to figure out a way to get dhclient (via hooks or some other
means) to check the value of a certain returned option in order to decide
whether it should accept the lease offer or not.

We are about to deploy a few boxes into various networks that are not
controlled by us, in order to gather some statistics about these networks.
We want all these boxes to be plug and play basically, so ideally you'd just
be able to plug the network in, and the box should get an IP address and off
it goes. However we only want these boxes to respond to OUR dhcp server and
not others that might be present in the network.

I was going to use a certain option, say 43, so that the client can
differentiate our DHCP servers from others that might be present. I can see
that it's easy enough to use the 'require' directive to only accept leases
if a certain option is present in the request, but i can't find a way to
actually accept or reject the lease based on the value contained in this
particular option. Other DHCP servers might also be configured to send that
option, hence my dilemma.

I am not sure whether it's possible to achieve this using enter hooks. I've
looked into it, but am not very good at shell scripting. As far as i can
see, there is no way to reject the offer based on a value without first
binding the interface to an address (but i could be wrong). Can anyone shed
some light on this issue or even flaws to my approach?

cheers,
Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20090720/54e0531e/attachment.html>


More information about the dhcp-users mailing list