Subject: Re: laptops, wireless, and dhcp
To: Steve Bellovin <email@example.com>
From: mouss <firstname.lastname@example.org>
Date: 06/25/2004 02:53:20
Steve Bellovin wrote:
> I'm currently configuring a laptop for someone; given the likely usage
> environment, setting up dhclient is going to be painful. I tend to
> think that the model we're using is wrong. Windows XP, at least as
> configured by IBM, seems to do it properly.
sure there are still things to do in the mobility area.
> The machine will be used in both wireless (built-in am0 interface) and
> wired mode. For fairly obvious reasons, it's generally better to use
> the wired interface if it's available.
> Right now, dhclient cycles through various media options for devices
> listed in dhclient.conf. This is especially important for 802.11
> devices, where there might be several combinations of keys. In a
> fairly strong sense, dhclient shouldn't bother trying the DHCP protocol
> unless it sees RF carrier on a wireless interface; similarly, it
> shouldn't try DHCP on a wired interface if the cable is disconnected.
This is also true for modems vs ethernet cards. or even if you have 2
nics with different capabilities/configs/...
I like the idea of "interface instance priority" and of conditional
Another idea is that if a program tries to connect to a remote system
(or if another host that is using us as a gateway tries to route through
us) and the "right" interfaces are not configured, then signal dhclient
to acquire an address (probably only once during a boot session, to
avoid useless failure repetition). This is better than waiting for the
next dhclient try.
Up so far, the only option I got was to connect to the gateway and
manually do it. Unfortunately, this would require hooks in the IP stack
(unless I'm mistaken).