I had tough time configuring Wi-Fi for different locations and switching between them, say home and office. I use Ubuntu jaunty, and I use to change /etc/network/interfaces file and restart eth0, eth1 accordingly. I have noticed my network monitor showing no connectivity always.
Also my current setup doesn’t discover Wi-Fi available networks. After searching through the internet I landed into this fine piece of information, which helped out of the hassles in switching between networks.
sudo apt-get update
sudo apt-get install wpasupplicant
sudo apt-get install network-manager-gnome network-manager
sudo vim /etc/network/interfaces
Comment out everything other than “lo”, ie “lookback address” entries in that file and save the file
sudo vim /etc/default/wpasupplicant
Add entry ENABLED=0
and save the file
Reboot your system.
Now your system automatically switch between networks.