[pkg-wpa-devel] Maybe wpasupplicant just shouldn't roam at all..

Joachim Breitner nomeata at debian.org
Sun Apr 2 19:51:02 UTC 2006

Hi again,

while thinking about the roaming issue, I came to a different
conclusion: wpasupplicant should not roam at all, strictly following the
unix paradigm of small tools doing their stuff good. The work on mode1
enables that. But let's start at the beginning.

Let's have a look at the wired world first.

Setup 1) ifupdown
The simple static setup. There is "auto eth0" in /e/n/i, and exactly one
network defined for eth0. Works fine since the beginning of dawn
(ifupdown's dawn at least)

Setup 2) ifupdown + ifplugd
We switch to a laptop, that get's unplugged and plugged again. We want,
I hope you agree, the interface only up when the cable is plugged in,
and we need to ifup on plugging in anyways, as we might need a new IP
via. dhcp. So we add ifplugd and remove "auto eth0". With zero more
configuration, we get what we want, and everything is fine.

Setup 3) ifupdown + ifplugd + guessnet
No we suddently have differnet networks that need different
configuration in /e/n/i. No problem, thanks to guess net. Putting
several virtual interfaces with a test (e.g. against the ethernet MAC of
some router) and a simple mapping line solves this problem, and we can
continue to not worry about network after that -- it just works.

IIRC, wpasupplicant is also important for 802.1X. So if some network
needs that, we use wpasupplicant in mode1. This is orthogonal to these
Setups, and wpasupplicant can stick to it's main task.

Let's transfer this to the wireless world:

Setup 1) ifupdown
If we are always in the range of the wireless, we can just make that
auto. Unlikely, but it is the basic case.

Setup 2) ifupdown + wifiroamd
Usually, you walk in and out of the range of your (currently only)
network. So we need something that detects the reaching and leaving of
the AP's range. Currently, I'm using wpasupplicant for that, I used to
use waproamd, but both are actually overkill - we just need the "is
there an AP with an essid that appears in /e/n/i, then ifup wifi0"
functionality and the "oh, signal level is zero, or low enough to
warrant a re-scan, so run ifdown wifi0 and start scanning again". Maybe
that part of the code can be put in a separate daemon, here dubbed

Setup 3) ifupdown + wifiroamd + guessnet
You can guess what happens: We need different configuration, so we use
virtual devices and guessnet to select them (this time probably based on
the essid)

Where does wpasupplicant come it? Again just for the main task: Handling
the encryption. If one of these configured networks, virtual or not,
needs WAP or WPA, you add the appropriate stancas to /e/n/i, run
wpasupplicant in mode1. wpasupplicant will be started when the network
is brought up, i.e. when the ap is in range, might even fail (like a
failed dhcp client) when something goes wrong instead of starting to
scan by itself, and will be ended when the interface is brought down.

IMHO, this is a very clean implementation, very analogous to the wired
setup, allows great flexibility and sufficient reliability and "only"
needs the split of the "roam and associate" and the "encryption" code in
wpasupplicant into two separate daemons.

Thanks for your attention, if really read it all :-)


Joachim "nomeata" Breitner
Debian Developer
  nomeata at debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: joachimbreitner at amessage.de | http://people.debian.org/~nomeata

More information about the Pkg-wpa-devel mailing list