ifscheme – configuring multiple wireless interfaces on debian sarge May 25, 2006
Posted by maxmil in : Debian,Networking , trackbackI 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
- install with apt
- edit /etc/network/interfaces
- set current scheme with $> ifscheme <scheme name>. In my case at home this is $> ifscheme home
- bring up and down interface as normal $>ifup wlan0 for example
/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»
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.
I assume the wlan0-home and name attribute for the Work interface are copy-past errors?
Yes. Copy paste error. Have corrected that. Amazed to see that such an old post still gets visits!
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!