jump to navigation

ifscheme – configuring multiple wireless interfaces on debian sarge May 25, 2006

Posted by maxmil in : Debian,Networking , trackback

I was having the annoying problem that my wlan0 configuration in /etc/network/interfaces was different at home and at work. This is quite normal really, the essid and the key are expected to be different. The problem was that every time i changed location i had to redit my /etc/network/interfaces file and ifdown wlano, ifup wlan0 in order to connect to the new network.

I now have a solution: ifscheme

I configured it with apt. The versión that i got at the time of writing was 1.3-3.

How to use it 

/etc/network/interfaces

First add a mapping to allow ifscheme to control the interfaces

# Wireless interfaces controlled by ifscheme
mapping wlan0
        script ifscheme-mapping

Then define the interfaces as…

# Home wireless inteface
iface wlan0-home inet dhcp
        wireless-essid ESSIDID
        wireless-mode Managed
        wireless-keymode open
        wireless-key1 xxxx-xxx…
        wireless-defaultkey 1
        name Home wireless 

 # Work wireless inteface
iface wlan0-work inet dhcp
        wireless-essid WORKESSIDID
        wireless-mode Managed
        wireless-keymode open
        wireless-key1 xxxx-xxx…
        wireless-defaultkey 1
        name Home wireless

Thats it! 

Comments»

1. Winston Weinert - June 3, 2009

Great Alternative to those heavy weight network manager GUIs like wicd and network-manager (i have an ibook g3 300 MHz 288 MB of ram.) When I run the wicd daemon it alone eats too much cpu.

Will use this for sure.

2. pods - October 19, 2011

I assume the wlan0-home and name attribute for the Work interface are copy-past errors?

3. maxmil - October 19, 2011

Yes. Copy paste error. Have corrected that. Amazed to see that such an old post still gets visits!

4. Emilio - October 31, 2011

You can switch between networks with ifup command
sudo ifup wlan0-home=wlan0
sudo ifup wlan0-work=wlan0

Being wlan0 the real wireless card

Regards!