Differences between revisions 20 and 21
Revision 20 as of 2009-04-21 12:09:01
Size: 7229
Editor: ?TanguyOrtolo
Comment: Using logical interface names to switch configuration
Revision 21 as of 2009-05-31 10:12:55
Size: 8084
Editor: GeoffSimmons
Comment: Amendments to anchors, InterWiki links. Revise and expand wicd.
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
Once your wireless device has an interface available (verifiable with [[http://manpages.debian.net/man/8/iwconfig|iwconfig]]), it is required to be configured to access a network. If you do not have a wireless interface present, please refer to [[WiFi]] for information on providing a driver for your device. Once your wireless device has an interface available (verifiable with [[DebianMan:8/iwconfig|iwconfig]]), it is required to be configured to access a network. If you do not have a wireless interface present, please refer to [[WiFi]] for information on providing a driver for your device.
Line 11: Line 11:
Wireless network interface configuration can be performed using a connection manager (such as [[#network-manager|NetworkManager]]) or through Debian's {{{/etc/network/interfaces}}} file with a special purpose utility (such as [[#wpa_supplicant|wpa_supplicant]]). Examples of !NetworkManager and wpa_supplicant configuration are described below. Wireless network interface configuration can be performed using a connection manager (such as [[#network-manager|NetworkManager]]) or through Debian's {{{/etc/network/interfaces}}} file with a special purpose utility (such as [[#wpasupplicant|wpa_supplicant]]). Examples of !NetworkManager and wpa_supplicant configuration are described below.
Line 16: Line 16:
== Network Manager == == NetworkManager ==
Line 18: Line 18:
NetworkManager is configured by graphical interfaces, which are available for [[Gnome|GNOME]] and [[KDE]]. Your wireless interface should ''not'' be referenced within Debian's /etc/network/interfaces file. NetworkManager is configured through graphical interfaces, which are available for [[Gnome|GNOME]] and [[KDE]]. Your wireless interface should ''not'' be referenced within Debian's {{{/etc/network/interfaces}}} file.
Line 20: Line 20:
!NetworkManager is also a front-end for [[#wpa_supplicant|wpa_supplicant]]. !NetworkManager is also a front-end for [[#wpasupplicant|wpa_supplicant]].
Line 22: Line 22:
 1. Install the DebPkg:network-manager-gnome package: {{{  1. Install the DebianPkg:network-manager-gnome package: {{{
Line 34: Line 34:
See also [[NetworkManager]] for frequently asked questions, documentation and support references. See the [[NetworkManager]] page for frequently asked questions, documentation and support references.
Line 37: Line 37:
 1. Install the DebPkg:network-manager-kde package: {{{  1. Install the DebianPkg:network-manager-kde package: {{{
Line 46: Line 46:
See also [[NetworkManager]] for frequently asked questions, documentation and support references. See the [[NetworkManager]] page for frequently asked questions, documentation and support references.
Line 51: Line 51:
=== wicd - for XFCE, LXDE, fluxbox ===
DebPkg:wicd is an alternative to network-manager. It is Gnome/KDE independent, thus it makes it a perfect replacement of network-manager for any desktop environment which is not KDE or Gnome (i.e. XFCE, LXDE, fluxbox etc.). As for network-manager, wicd is configured by graphical interfaces. Your wireless interface should ''not'' be referenced within Debian's {{{/etc/network/interfaces}}} file. (more information on [[http://wicd.net/|wicd.net]]
=== wicd - for Xfce, LXDE, Fluxbox ===
DebianPkg:wicd (Wireless Interface Connection Daemon) is an alternative to !NetworkManager. It is environment independent, making it a perfect replacement for other desktop environments (e.g. Xfce, LXDE, Fluxbox, etc.). Like !NetworkManager, wicd is configured via a graphical interface. Your wireless interface should ''not'' be referenced within Debian's {{{/etc/network/interfaces}}} file.
Line 54: Line 54:
DebPkg:wicd has not been shipped in Lenny but is available in backports. [[DebianLenny|Lenny]] users: wicd is not included in Lenny, but is available as a backported package. Configure {{{/etc/apt/sources.list}}} as explained in the [[Backports]] page before continuing.
Line 56: Line 56:
 1. Configure backports as explained in the page [[Backports]]
 2. Update the repositories: {{{
apt-get update}}}
 3. Install wicd {{{
apt-get install wicd}}}
 4. To run the wicd GUI run {{{
wicd-client -n}}}
## extended /usr/share/doc/wicd/README.Debian instructions follow
## - wicd conflicts with network-manager as of wicd 1.5.7-1 (Debian bug #509051)
## - wicd daemon may (IME) fail to start after package installation, start it prior to running wicd-client
 1. Update the list of available packages and install the DebianPkg:wicd package: {{{
$ su
# aptitude update
# aptitude install wicd}}}
 1. Amend {{{/etc/network/interfaces}}} to contain only the following: {{{
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
Line 64: Line 67:
 ToDo: Should network-manager be removed from the system? # The loopback network interface
auto lo
iface lo inet loopback}}}
 1. If not already performed, add your regular user account to the {{{netdev}}} group and reload DBus: {{{
# adduser yourusername netdev
# /etc/init.d/dbus reload}}}
 1. Start the wicd daemon: {{{
# /etc/init.d/wicd start}}}
 1. Start the wicd GUI with your regular user account: {{{
# exit
$ wicd-client -n}}}
Line 66: Line 79:
<<Anchor(wpa_supplicant)>> See also [[http://wicd.sourceforge.net/moinmoin/FAQ|wicd frequently asked questions]].

<<Anchor(wpasupplicant)>>
Line 70: Line 85:
The DebPkg:wpasupplicant package provides {{{wpa-*}}} [[http://manpages.debian.net/man/8/ifup|ifupdown]] options for {{{/etc/network/interfaces}}}. If these options are specified, wpa_supplicant is started in the background when your wireless interface is raised and stopped when brought down. The DebianPkg:wpasupplicant package provides {{{wpa-*}}} [[DebianMan:8/ifup|ifupdown]] options for {{{/etc/network/interfaces}}}. If these options are specified, wpa_supplicant is started in the background when your wireless interface is raised and stopped when brought down.
Line 74: Line 89:
Before continuing, install the DebPkg:wpasupplicant package: Before continuing, install the DebianPkg:wpasupplicant package:
Line 105: Line 120:
For general {{{/etc/network/interfaces}}} information, see the [[http://manpages.debian.net/man/5/interfaces|interfaces(5)]] man page. For general {{{/etc/network/interfaces}}} information, see the [[DebianMan:5/interfaces|interfaces(5)]] man page.
Line 118: Line 133:
More information can be found in the [[http://manpages.debian.net/man/5/wpa_supplicant.conf|wpa_supplicant.conf(5)]] man page. A fully-commented wpa_supplicant configuration file example is at {{{/usr/share/doc/wpasupplicant/README.wpa_supplicant.conf.gz}}}. More information can be found in the [[http://manpages.debian.net/cgi-bin/man.cgi?query=wpa_supplicant.conf|wpa_supplicant.conf(5)]] man page. A fully-commented wpa_supplicant configuration file example is at {{{/usr/share/doc/wpasupplicant/README.wpa_supplicant.conf.gz}}}.
Line 126: Line 141:
    wpa-ssid "MyHomeSpot"
    wpa-psk  "MyPassphrase"}}}
    wpa-ssid mynetworkname
    wpa-psk mysecretpassphrase}}}
Line 131: Line 146:
   * use DebPkg:ifscheme, see the [[http://www.alwayssunny.com/blog/?p=30|example configuration at alwayssunny.com]].    * use DebianPkg:ifscheme, see the [[http://www.alwayssunny.com/blog/?p=30|example configuration at alwayssunny.com]].
Line 135: Line 150:
 * [[http://manpages.debian.net/man/8/iwconfig|iwconfig]]  * [[DebianMan:8/iwconfig|iwconfig]]

Translation(s): none

(!) ?Discussion


How to use a WiFi interface

This page describes how to configure a WiFi interface on a Debian system, for use on a network.

Once your wireless device has an interface available (verifiable with iwconfig), it is required to be configured to access a network. If you do not have a wireless interface present, please refer to WiFi for information on providing a driver for your device.

Wireless network interface configuration can be performed using a connection manager (such as NetworkManager) or through Debian's /etc/network/interfaces file with a special purpose utility (such as wpa_supplicant). Examples of NetworkManager and wpa_supplicant configuration are described below.

<!> The WEP algorithm is insecure and deprecated by WPA. Use of WEP is not recommended and is not covered within this document.

NetworkManager

NetworkManager is configured through graphical interfaces, which are available for GNOME and KDE. Your wireless interface should not be referenced within Debian's /etc/network/interfaces file.

NetworkManager is also a front-end for wpa_supplicant.

GNOME

  1. Install the network-manager-gnome package:

    $ su
    # aptitude update
    # aptitude install network-manager-gnome
  2. Right-click on a GNOME panel and select "Add to Panel...".
  3. From the list presented, select "Network Monitor" and click "Add". A new systray applet will appear. Click "Close".
  4. Right-click on the applet and select "Properties".
  5. From the dialog presented, click "Configure". You will be asked for the administrative (root) password.
  6. A list of network interfaces will be displayed. Select your wireless interface, then click "Properties".
  7. Tick "Enable this connection" and enter details regarding your wireless network. Click "OK" when finished.

See the NetworkManager page for frequently asked questions, documentation and support references.

KDE

  1. Install the network-manager-kde package:

    $ su
    # aptitude update
    # aptitude install network-manager-kde
  2. From the K Menu, select "Run Command". Enter "knetworkmanager" and click "Run".
  3. A new systray applet will appear.

ToDo: Complete knetworkmanager procedure.

See the NetworkManager page for frequently asked questions, documentation and support references.

Other GUI

wicd - for Xfce, LXDE, Fluxbox

wicd (Wireless Interface Connection Daemon) is an alternative to NetworkManager. It is environment independent, making it a perfect replacement for other desktop environments (e.g. Xfce, LXDE, Fluxbox, etc.). Like NetworkManager, wicd is configured via a graphical interface. Your wireless interface should not be referenced within Debian's /etc/network/interfaces file.

Lenny users: wicd is not included in Lenny, but is available as a backported package. Configure /etc/apt/sources.list as explained in the Backports page before continuing.

  1. Update the list of available packages and install the wicd package:

    $ su
    # aptitude update
    # aptitude install wicd
  2. Amend /etc/network/interfaces to contain only the following:

    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
  3. If not already performed, add your regular user account to the netdev group and reload DBus:

    # adduser yourusername netdev
    # /etc/init.d/dbus reload
  4. Start the wicd daemon:

    # /etc/init.d/wicd start
  5. Start the wicd GUI with your regular user account: 

    # exit
    $ wicd-client -n

See also wicd frequently asked questions.

wpa_supplicant

wpa_supplicant is a WPA client and IEEE 802.1X supplicant.

The wpasupplicant package provides wpa-* ifupdown options for /etc/network/interfaces. If these options are specified, wpa_supplicant is started in the background when your wireless interface is raised and stopped when brought down.

  • {i} GNOME and KDE users shouldn't configure wpa_supplicant manually. Use NetworkManager as explained above.

Before continuing, install the wpasupplicant package:

  • $ su
    # aptitude update
    # aptitude install wpasupplicant

WPA-PSK and WPA2-PSK

{i} Also known as "WPA Personal" and "WPA2 Personal" respectively.

  1. Restrict the permissions of /etc/network/interfaces, to prevent pre-shared key (PSK) disclosure:

    # chmod 0600 /etc/network/interfaces
  2. Open /etc/network/interfaces in a text editor:

    # sensible-editor /etc/network/interfaces
  3. Define appropriate stanzas for your wireless interface, along with the SSID and PSK. For example:

    auto wlan0
    iface wlan0 inet dhcp
        wpa-ssid mynetworkname
        wpa-psk mysecretpassphrase
    The "auto" stanza will bring your interface up at system startup. If not desired, remove or comment this line.
  4. Save the file and exit the editor.
  5. Bring your interface up. This will start wpa_supplicant as a background process.

    # ifup wlan0

Additional wpa-* options are described within /usr/share/doc/wpasupplicant/README.modes.gz. This should also be read if connecting to a network not broadcasting its SSID.

For general /etc/network/interfaces information, see the interfaces(5) man page.

WPA-EAP

For networks using EAP-TLS, you are required to establish a wpa_supplicant configuration file and provide the client-side certificate. An example WPA2-EAP configuration file can be found at /usr/share/doc/wpasupplicant/examples/wpa2-eap-ccmp.conf.

Once available, reference your configuration file in /etc/network/interfaces. For example:

  • auto wlan0
    iface wlan0 inet dhcp
        wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

More information can be found in the wpa_supplicant.conf(5) man page. A fully-commented wpa_supplicant configuration file example is at /usr/share/doc/wpasupplicant/README.wpa_supplicant.conf.gz.

Switching Connections

To switch between multiple distinct configurations:

  • GNOME users should use "Menu System > Administration > Network".

  • Console users can

See Also


CategoryNetwork | CategoryWireless