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!

5. Dalton - February 12, 2012

Curious if this is still being checked on. I LOVE ifscheme. Finding this post has made things much easier.

I have run into an issue that I cannot pin down though. I have a home server that is connected to one wifi network part of the day, and a separate network the rest of the day. With dhcp they work perfectly, but if I set them both to have a static IP, I can only get one of the networks to connect at a time. That is, “ping-c 3 http://www.google.com” works with one, but if I switch to the other that command returns unreachable host. It’s not a specific one that is working either. Usually after a reboot I can make the other work, but not the first one.

6. Joe - October 30, 2013

How does this interact when eth0 or CAT5 is being used at the same time?