On Wed, Aug 31, 2005 at 05:43:32PM -0400, Peter Jones wrote: > On Wed, 2005-08-31 at 10:52 -0700, Jean Tourrilhes wrote: > > > Peter Jones <[EMAIL PROTECTED]> wrote : > > > > > > I don't think that's really right either. For one thing, things like > > > DHCP's timeout start counting at about the same time as "ifconfig up", > > > and association can take some time. > > > > That's a bug in DHCP, and DHCP should be fixed. > > A nice analogy is Ethernet. The Ethernet layer doesn't enforce > > that the user has plug the Ethernet cable in the right port at bootup, > > or any port at all, for that matter. Actually, I would like my > > Ethernet connection to work even if I plug the Ethernet cable a few > > minutes after having booted the box. DHCP should not time out so > > easily. > > Ethernet is a great analogy, but your argument only works if you ignore > how people actually use ethernet. Nobody runs dhclient and expects it > to work without the network being plugged in -- they run dhclient when > the network becomes available, often via something like ifplugd or > NetworkManager, which watch for a connection.
The begining of my e-mail was explaining that you can't always watch reliably for connection, for some technologies this does not have any meaning. But, it does not matter. If the scripts were truly waiting for the connection to be up before starting DHCP, then it's just a matter of implementing carrier_watch in wireless drivers, and to to advertise the cable plugged only when the association is complete. That should fix the issue, isn't it ? It seems that ifplugd can even check wireless association directly from wireless drivers, which seems like the perfect solution. In other words, you should not start DHCP before the wireless driver advertise the link up and expect it to work, which is exactly what you are complaining doesn't work. I think you are contradicting yourself. > They get that connection when you plug the cable in -- and that's where > the analogy relates to the issue we're discussing. When the cable is > plugged in, you've already chosen which network to "associate" with. > You did that when you chose which port on the wall to plug it into. > Before you ever have the opportunity to do things like "ifconfig up", > you've already consciously performed that step. Actually, it should work both ways IMHO. But, it does not matter. The choice of association is done before the "ifconfig up" (wireless config always happen before IP config). My e-mail was actually advocating against configuring wireless after "ifconfig up". It's just that when you perform "ifconfig up", it will take a bit more time before the carrier-watch will report the link active (or that wireless association will be reported). That's only a performance issue, but actually other things may make the Ethernet slow to set up, such as bridging and 802.1x... > > Even better, I should be able to plug my laptop in any > > Ethernet port when I want and move from one port to another without > > having to reboot the laptop or to mess with the network stuff. > > Also, maybe I'm connected to my switch, but Oops, I forgot to > > connect the switch to the network. It would be nice if it would work > > when I eventually connect my switch to the network. > > Again, currently distributions handle this by monitoring the status, and > telling dhclient (or similar) to ask for a lease at the appropriate > time. That works, and it's not what's being discussed. Actually, they would fail the last example, but I admit it's a contrived example. > Peter Have fun... Jean - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html