How to let the DHCP client eventually accept a OFFER when no OFFER satisfies client's requirement?

Vasiliy Molostov molostoff at gmail.com
Fri Jun 15 08:55:47 UTC 2012


Hi !

First , please, see `man dhclient` for `-1` option, which is as explained 
there 'Try to get a lease once. On failure exit with code 2.'

Regardind to the main question on how to do the same with one dhclient, I 
suppose that this already works for ntp-servers option or any other option 
which is bound to the hardware address (e.g. host statement) with class 
statement.

For example, I have done this for my server boot options, and this does not 
require dhclient modifications, client just receive all that server has 
offered.

So you do not `require` ndn option on client, but instruct server to offer 
one.

I have done this by declaring `class`, then binding option to that class and 
then spawn that class in host statement (e.g. bind the hardware address to 
class). As a short way you can bind ndn option directly to hwaddr in server 
config.

In human readable mode this should look like "hwaddr A belongs to class B, 
class B has option ndn"

full exaple of this can be found at http://www.daemon-systems.org/man/dhcp-
options.5.html
and here http://www.daemon-systems.org/man/dhcpd.conf.5.html

Sorry if here not all things are clear, since its a relaxed explanation, but 
hope this can help.

On Чт, 14 июн 12 16:30:14 Chengyu Fan wrote:

Hi~ Vasiliy,
I try to do the two-step discover as you suggested.
But when the first dhclient fails to find such OFFER, I don't know how to stop 
the first one and launch the second dhclient. At this moment, the first 
dhclient will run as a deamon and request IP latter. So if I launch the second 
dhclient, I think they will conflict with each other, aren't they?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 665 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20120615/e4fe3ca9/attachment.bin>


More information about the dhcp-users mailing list