WPA roaming

Sometimes I go to visit my parents, and it crops out some troubles with the wireless and everything gets messed up on my laptop. If you are moving around constantly, for example among work,home and university you should be using roaming in order to connect the suitable network automatically.

network={
    ssid="MyParentsNet"
    key_mgmt=WPA-PSK
    proto=WPA
    pairwise=TKIP
    group=TKIP
    psk="passowrd_parents"
    id_str="mom"                    # Tha'ts an ID.
}

network={
    ssid="Home"
    key_mgmt=WPA-PSK
    proto=WPA2
    pairwise=TKIP
    group=TKIP
    psk="password_home"
    id_str="home"                 # And that's another ID
}

Now is time to set up the network /etc/network/interfaces

auto wlan0
iface wlan0 inet manual
    wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface home inet dhcp
iface work inet dhcp

It’s important to set the interface to manual, don’t forget to give an “id_str” for each network, you can add a static configuration instead of dhcp :

iface work inet static
     address 10.10.20.2
     gateway 10.10.20.1
     netmask 255.255.255.0

If you get some troubles, please take a look in /usr/share/doc/, it’s really useful.