Hi list,<div><br></div><div>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.</div>
<div><br></div><div>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. </div>
<div><br></div><div>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.</div>
<div><br></div><div>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?</div>
<div><br></div><div>cheers,</div><div>Jon</div>