[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Passing "nowait" command line option to "dhclient"



Hi,

thanks for your quick and helpful reply!

On Thu, Oct 17, 2013 at 11:09 PM, Bob Proulx <bob@proulx.com> wrote:
> Steffen Dettmer wrote:
> Your indention is terrible!

Sorry, I'll improve.

>> I think I have to pass the option "-nw" to dhclient, but how do I do
>> that correctly?
>
> If you want dhclient not to wait then change the "auto" to
> "allow-hotplug". Using "auto" means bring the interface up at system
> boot time. It runs the /etc/init.d/* scripts.  This is a synchronous
> operation.  "allow-hotplug" means bring the interface up when the
> interface is detected.  That is the new dynamic event driven way and
> runs asynchronously.

This is interesting. I like to have the interface bought up at
system boot time, so "auto" seemed correct. "allow-hotplug" is
supposed to bring the interface up when the interface is
detected (also told by the Debian Reference), but apparently that
is not true, my Ethernet interfaces are detected very early, I
think already during initramfs when there is no
/etc/network/interfaces, but interestingly "allow-hotplug" is
working (maybe by emulating some "cold-plug"),
EXCEPT a VLAN tag is used.

If a VLAN tag is used, the interface "ethX.ttt" is not
automatically started ("ifup ethX.ttt" is needed).

>> I noticed that DHCP leases are kept as long as the lease is valid when
>> moving from one LAN to another, not sure if this behavior is correct.
>
> It is required.  It is possible for clients to actively release the
> lease.  But if a client crashes then the dhcp server never gets an
> indication and therefore must keep the lease active for the full time
> to live.

Yes, of course, but I meant a different case.
When unplugging a device from one switch (one LAN) and plugging
it to another switch (different LAN), or moving it from one
switch port to another when both forward by applying different
VLAN tags, the client uses a lease that is not valid for its
"new" LAN, so a new DHCP request could be suited. Laptops usually
work this way (restarting DHCP when link gets up). But I was told
this is no important case.

>> How to configure DHCP correctly without causing boot delays?
>
> Use "allow-hotplug".

Thanks for this tip, this helps for non-VLAN interface, a big
step forward, thank you!

About the VLAN issue, does anyone knows how to configure DHCP on
VLAN tagged interfaces correctly without causing boot delays?

Steffen


Reply to: