[Tfug] update: laptop network roaming

John Gruenenfelder johng at as.arizona.edu
Sat Aug 26 21:15:01 MST 2006


Hello again,

Here is the update for my quest to get slightly less manual network roaming on
my laptop.  If you recall, my goal was to get this done the "Debian way".

With Debian, they've tried to get all the network bits integrated and playing
nice with the ifupdown script framework.  This way you can manually say:
  ifup <inteface>

And it should take all necessary steps to bring up the interface.  This should
include discovering what network profile to use, setting WEP/WPA keys if
needed, and any other bits.

Actually *detecting* when to do this then becomes a separate task.  This would
be scanning for available APs or for a cable to be inserted/removed.


So... I've made progress.  Once I found out how to get it working, it really
wasn't that difficult.  Finding that information was a different story...

Anyway, all I needed was the "guessnet" package along with the standard Debian
network packages like "ifupdown".  Then I just needed to set up
/etc/network/interfaces:

##############
# Use guessnet
mapping eth0
        script guessnet-ifupdown
        map default: dhcp

mapping eth2
        script guessnet-ifupdown
        map default: dhcp
        map timeout: 5
        map verbose: true

iface dhcp inet dhcp

iface home-wifi inet dhcp
        wireless_essid bebop
        wireless_key string_of_hex_digits
        test wireless essid bebop

iface campus-wifi inet dhcp
        wireless_essid UMASS
        test wireless essid UMASS
##############

The mapping stanzas describe how to handle each of the devices.  On my laptop,
eth2 is the wireless NIC.  The "iface" lines are essentially the profiles.
The "test" lines in each profile describe the test(s) that must pass for that
profile to be chosen.

And that was it.  Now when I do "ifup eth2" it automatically figures out the
network to use.

This solution does not do anything about WPA encryption since I don't
presently need it.  However, the following link seems to do a good job of
explaining the the new Debian way of using wpa_supplicant:
  http://svn.debian.org/wsvn/pkg-wpa/trunk/wpasupplicant/debian/README.modes?op=file&rev=0&sc=0

The other remaining piece to the puzzle is to have link detection so that when
network connectivity is available the appropriate interface will be brought
up.  This turned out to be very simple for the wired interface.  The package
"ifplugd" is all I needed.  During installation it asks which interfaces to
monitor and that was the extent of configuration.

Now when I plug in a cable it is detected and eth0 comes up.  It does not yet
work for my wireless interface, though.  I'm not yet sure if this is because
the driver does not support link detection (it's the ipw3945 driver) or
beacause I don't have ifplugd/ifupdown set up properly.

Some links...
This is the page that finally got me on the right path:
  http://wiki.clug.org.za/wiki/Wireless_Roaming
This page has more information about Debian+WPA:
  http://wiki.debian.org/WPA

Anyway, I hope this helps other TFUGgers faced with a similar Debian-centric
problem.  And maybe it well help others who happen across it via Google.


-- 
--John Gruenenfelder    Research Assistant, UMass Amherst student
                        Systems Manager, MKS Imaging Technology, LLC.
Try Weasel Reader for PalmOS  --  http://gutenpalm.sf.net
"This is the most fun I've had without being drenched in the blood
of my enemies!"
        --Sam of Sam & Max




More information about the tfug mailing list