LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (http://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   For laptop - different networks in /etc/network/interfaces, or use network-manager? (http://www.linuxquestions.org/questions/linux-wireless-networking-41/for-laptop-different-networks-in-etc-network-interfaces-or-use-network-manager-537939/)

dmravaet 03-16-2007 02:35 AM

For laptop - different networks in /etc/network/interfaces, or use network-manager?
 
Alright, I'm learning more and more, but still well within the "newbie" category, so forgive me if I'm overlooking something here. Also, just so you're forewarned, in trying to include all relevant information, this post has become quite long.

With my laptop running Ubuntu Edgy, I connect to my home WAP automatically through /etc/network/interfaces using the following:
Code:

auto eth1
iface eth1 inet dhcp
        pre-up wpa_supplicant -Bw -Dwext -c/etc/wpa_supplicant.conf -ieth1

where wpa_supplicant.conf was originally created by
Code:

sudo touch /etc/wpa_supplicant.conf
sudo wpa_passphrase MySSID MyPassphrase > /etc/wpa_supplicant.conf

Unfortunately, the pre-up line makes it so I cannot connect to the WAPs on campus. The quickest fix I've found so far is to have two copies of the different configurations saved as interfaces.1 and interfaces.2, where one has the pre-up command and the other doesn't, copy the applicable one to /etc/network/interfaces, reboot, and I can connect.

I find this to be quite tedious, and would rather just have something that will work automatically, without having to toy around with anything. Ideally, this would be through interfaces, unless using gnome-network-manager is the only real way to do so.

I saw something in "man interfaces" talking about mapping for different connections (home vs work was the example given), but am not quite sure how to get that to work.

Any help is greatly appreciated, and if I've left out any relevant information, please let me know and I'll take care of it. Thanks!

SactoBob 03-16-2007 01:15 PM

Is there a special reason that you want to avoid network-manager-gnome? I find it a pretty ideal solution for my laptop, since I also have to connect to multiple networks.

n-m-g stores all the connection settings, so it is just point and click. But I have only been using it for a couple months, so let me know if there is something about it that is not good.

Bob

dmravaet 03-17-2007 03:28 PM

Aside the fact that I want to learn everything I can without GUI shortcuts, n-m-g will not automatically connect to a WAP that is not broadcasting its SSID (a setting I'd prefer to keep for security reasons).

short101 03-17-2007 09:18 PM

check out /usr/share/doc/wpa_supplicant/README.modes.gz, have a look at the roaming section. works quite well for me, i have 5 networks in mine and it all works automagically. (mixture of wpa, wep and open)

2Gnu 03-17-2007 11:42 PM

Quote:

Originally Posted by dmravaet
Aside the fact that I want to learn everything I can without GUI shortcuts, n-m-g will not automatically connect to a WAP that is not broadcasting its SSID (a setting I'd prefer to keep for security reasons).

SSID broadcast disable is not a security setting, although it's been promoted by manufacturers as such. If you're using WPA with a strong password and broadcasting the SSID makes connectivity easier, you're giving up nothing and gaining convenience.


All times are GMT -5. The time now is 12:30 AM.