|A complete guide to enabling and configuring wireless networking.|
|Parabola provides netctl for network configuration. netctl supports wired connections on desktops and servers, as well as wireless setups and roaming for mobile users, facilitating easy management of network profiles. NetworkManager and Wicd are popular third-party alternatives.|
Configuring wireless is a two-part process; the first part is to identify and ensure the correct driver for your wireless device is installed (they are available on the installation media, so make sure you install them), and to configure the interface. The second is choosing a method of managing wireless connections. This article covers both parts, and provides additional links to wireless management tools.
About new Parabola GNU/Linux-Libre systems: The wireless drivers and tools are available during Parabola set-up in the base group. Be sure to install the proper driver for your card. Udev will usually load the appropriate module, thereby creating the wireless interface, in the initial live system of the installer, as well as the newly installed system on your hard drive. If you are configuring your wireless functionality after, and not during the installation, simply ensure the required packages are installed with pacman, (driver, wireless_tools, wpa_supplicant, etc.) and follow the guidelines below. Note that wireless_tools may be optional depending on how recent your wireless hardware is.
- 1 Part I: Identify Card/Install Driver
- 1.1 Identify and Discover if Supported
- 1.2 Install user space tools
- 1.3 Drivers
- 1.4 Test installation
- 2 Part II: Wireless management
- 3 See also
- 4 External links
1 Part I: Identify Card/Install Driver
1.1 Identify and Discover if Supported
First you will need to check and see if the Linux-Libre kernel has support for your card.
1.1.1 Identify your card
You can find your card type by command:
# lspci | grep -i net
Or, if you have a USB device, run:
1.1.2 Discover if the card is supported
- The Ubuntu Wiki has a good list of wireless cards and whether or not they are supported either in the Linux kernel or by a user-space driver (includes driver name).
- Linux Wireless Support and The Linux Questions' Hardware Compatibility List (HCL) also have a good database of kernel-friendly hardware.
- The kernel page additionally has a matrix of supported hardware.
1.1.3 If your card is not listed
If your wireless hardware is not listed above, likely it has no free driver or requires nonfree firmware. We recommend that you use h-node to find a replacement adapter in this case.
1.2 Install user space tools
1.2.1 If you have wired Internet access available
If you have wired Ethernet available and are simply adding wireless functionality to an existing system, and you did not include wireless_tools during initial installation, then install the package wireless_tools.
The drivers' corresponding package names are either highlighted in bold or via monospaced font on this page. The packages can be installed during initial package selection on the Parabola installation media and can also be installed later.
1.2.2 If you have only wireless Internet available
The wireless_tools package is now available as part of the base system and is also on the live installation media (CD/USB stick image) under the base-devel category.
You cannot initialize wireless hardware without these user-space tools, so ensure they are installed from the installer media, (during package selection), especially if you have no means of networking other than wireless. Otherwise, you will be stuck in a recursion when you reboot your newly installed Parabola GNU/Linux-Libre system: you will need wireless_tools and drivers, but in order to get them, you will need wireless_tools and drivers.
The default Parabola GNU/Linux-Libre kernel is modular, meaning many of the drivers for machine hardware reside on the hard drive and are available as modules. At boot, udev takes an inventory of your hardware. Udev will load appropriate modules (drivers) for your corresponding hardware, and the driver, in turn, will allow creation of a kernel interface.
The interface name for different drivers and chipsets will vary. Some examples are wlan0 and eth1.
Methods and procedures for installing kernel modules for various chipsets are covered below. Read Kernel modules for general informations on operations with modules.
Realtek rtl8180 PCI/Cardbus 802.11b is now fully supported in the kernel. It can be configured using the standard wpa_supplicant and iwconfig tools.
Realtek rtl8180 (USB) are now fully supported in the kernel. It can be configured using the standard wpa_supplicant and iwconfig tools.
Unified driver for Ralink chipsets (replaces rt2500, rt61, rt73, etc). This driver has been in the Linux kernel since 2.6.24, some devices won't work as they require non-free firmware. It can be configured using the standard wpa_supplicant and iwconfig tools.
ath5k is the preferred driver for AR5xxx chipsets and for some older chipsets.
If ath5k is conflicting with ath_pci on your system, blacklist (and unload using rmmod or reboot) the following drivers:
ath_hal ath_pci ath_rate_amrr ath_rate_onoe ath_rate_sample wlan wlan_acl wlan_ccmp wlan_scan_ap wlan_scan_sta wlan_tkip wlan_wep wlan_xauth
then modprobe ath5k manually or reboot. wlan0 (or wlanX) in sta mode should spawn and become ready to use.
ath9k is Atheros' officially supported driver for the newer 802.11n chipsets. All of the chips with 802.11n capabilities are supported, with a maximum throughput around 180 Mbps. To see a complete list of supported hardware, check this page.
Working modes: Station, AP and Adhoc.
ath9k has been part of the Linux kernel as of v2.6.27. Support seems acceptable as of kernel v2.6.32 (see details on linuxwireless.org). (In the unlikely event that you have stability issues that trouble you, you could try using the compat-wireless package. An ath9k mailing list exists for support and development related discussions.)
2012/04/14: The new kernel 3.3.1 includes a patch that prevent association with an atheros wifi card. See https://bbs.archlinux.org/viewtopic.php?id=139274 for more infos. The previous kernel (3.2.13) don't include this patch and the next one (3.1.2) shouldn't include it.
This driver support some Atheros (USB) chipsets. This driver requires a firmware, which was liberated by Atheros. This firmware can be found in the ath9k-htc-firmware package.
The driver is now fully supported in the kernel. It can be configured using the standard wpa_supplicant and iwconfig tools.
As explained in the Debian Wiki, this device requires free firmware (GPLv2 licensed). It has been included in the mainline Linux kernel since version 2.6.37, and carl9170 replaces the obsolete ar9170usb driver which was removed at Linux 3.0.
Acquire and install the device firmware:
$ wget 'https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/plain/carl9170-1.fw' -O carl9170-1.fw $ su # mkdir /usr/local/lib/firmware # mv carl9170-1.fw /usr/local/lib/firmware
Connect the device to your system. The carl9170 kernel module is automatically loaded for supported devices. Configure your wireless interface as explained below. If you have any issues, see the driver’s homepage for troubleshooting.
1.4 Test installation
After loading your driver, run ip link to ensure a wireless interface (e.g. wlanX, ethX, athX) is created.
If no such interface is visible, modprobing it might work. To start your driver, use the rmmod and modprobe commands. If rmmod fails, continue with modprobe. See Kernel modules for more info.
Example: If your driver is called "driverXXX", you would run the following commands:
# rmmod driverXXX # modprobe driverXXX
Bring the interface up with ip link set <interface> up. For example, assuming the interface is wlan0:
# ip link set wlan0 up
If you get this error message: SIOCSIFFLAGS: No such file or directory, it most certainly means your wireless chipset requires a firmware to function, so please see h-node for a replacement wireless adapter.
2 Part II: Wireless management
Assuming that your drivers are installed and working properly, you will need to choose a method for managing your wireless connections. The following subsections will help you decide the best way to do just that.
Procedure and tools required will depend on several factors:
- The desired nature of configuration management; from a completely manual command line setup procedure repeated at each boot to a software-managed, automated solution
- The encryption type (or lack thereof) which protects the wireless network
- The need for network profiles, if the computer will frequently change networks (such as a laptop)
2.1 Management methods
This table shows the different methods that can be used to activate and manage a wireless network connection, depending on the encryption and management types, and the various tools that are required. Although there may be other possibilities, these are the most frequently used:
|Management||No encryption/WEP||WPA/WPA2 PSK|
|Manual, need to repeat at each computer reboot||iproute2 + iwconfig + dhcpcd/iproute2||iproute2 + iwconfig + wpa_supplicant + dhcpcd/iproute2|
|Automatically managed, with network profiles support||netcfg, newlan (AUR), wicd, NetworkManager, etc.|
More choice guide:
|-||netcfg+Newlan(AUR)||Wicd||NetworkManager + network-manager-applet|
|auto connect at boot||with net-profiles daemon configured in /etc/rc.conf||yes||yes|
| auto connect if dropped
or changed location
|with net-auto-wireless daemon configured in /etc/rc.conf||yes||yes|
|support 3G Modem||yes|
| GUI (proposes to manage and connect/disconnect
profiles from a systray icon.
Automatic wireless detection is also available)
|console tools||with wifi-select||wicd-curses (part of wicd package)||nmcli|
Whatever your choice, you should try to connect using the manual method first. This will help you understand the different steps that are required and debug them in case a problem arose. Another tip: if possible (e.g. if you manage your Wi-Fi access point), try connecting with no encryption, to check everything works. Then try using encryption, either WEP (simpler to configure -- but crackable in a matter of seconds, so it is hardly more secure than an unencrypted connection), WPA, or WPA2.
When it comes to ease of use, NetworkManager (with GNOME's network-manager-applet) and wicd have good GUI's and can provide a list of available networks to connect, and they prompt for passwords, which is straightforward and highly recommended.
2.1.1 Manual setup
The programs provided by the package wireless_tools are the basic set of tools to set up a wireless network. Moreover, if you use WPA/WPA2 encryption, you will need the package wpa_supplicant. These powerful user-space console tools work extremely well and allow complete, manual control from the shell.
These examples assume your wireless device is wlan0. Replace wlan0 with the appropriate device name.
Step 0. (Optional, may be required) At this step you may need to set the proper operating mode of the wireless card. More specifically, if you are going to connect an ad-hoc network, you might need to set the operating mode to ad-hoc:
# iwconfig wlan0 mode ad-hoc
Step 1. (Also optional, may be required) Some cards require that the kernel interface be activated before you can use the wireless_tools:
# ip link set wlan0 up
Step 2. See what access points are available:
# iwlist wlan0 scan
Step 3. Depending on the encryption, you need to associate your wireless device with the access point to use and pass the encryption key.
Assuming you want to use the ESSID MyEssid:
- No encryption
# iwconfig wlan0 essid "MyEssid"
using a hexadecimal key:
# iwconfig wlan0 essid "MyEssid" key 1234567890
using an ASCII key:
# iwconfig wlan0 essid "MyEssid" key s:asciikey
You need to edit the /etc/wpa_supplicant.conf file as described in WPA_Supplicant. Then, issue this command:
# wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf
This is assuming your device uses the wext driver. If this does not work, you may need to adjust these options. If connected successfully, continue in a new terminal (or quit wpa_supplicant with and add the -B switch to the above command to run it in the background). WPA_Supplicant contains more information and troubleshooting.
Regardless of the method used, you can check if you have associated successfully as follows:
# iwconfig wlan0
Step 4. Finally, provide an IP address to the network interface. Simple examples are:
# dhcpcd wlan0
for DHCP, or
# ip addr add 192.168.0.2/24 dev wlan0 # ip route add default via 192.168.0.1
for static IP addressing.
# iwconfig wlan0 channel auto
Before changing the channel to auto, make sure your wireless interface (in this case 'wlan0') is down. After it has successfully changed it, you can again bring the interface up and continue from there.
2.1.2 Automatic setup
There are many solutions to choose from, but remember that all of them are mutually exclusive; you should not run two daemons simultaneously.
netcfg provides a versatile, robust and fast solution to networking on Parabola GNU Linux-libre.
netcfg uses a profile based setup and is capable of detection and connection to a wide range of network types. This is no harder than using graphical tools.
188.8.131.52 Netcfg Easy Wireless LAN (newlan)
newlan is a mono console application that starts a user-friendly wizard to create netcfg profiles; it also supports wired connections.
newlan must be run with root privileges:
# sudo newlan -n mynewprofile
Wicd is a network manager that can handle both wireless and wired connections. It is written in Python and Gtk with fewer dependencies than NetworkManager, making it an ideal solution for lightweight desktop users. Wicd is available in the official repositories.
NetworkManager is an advanced network management tool that is enabled by default in most popular GNU/Linux distributions. In addition to managing wired connections, NetworkManager provides worry-free wireless roaming with an easy-to-use GUI program for selecting your desired network.
184.108.40.206 WiFi Radar
WiFi Radar is a Python/PyGTK2 utility for managing wireless profiles (and only wireless). It enables you to scan for available networks and create profiles for your preferred networks.
See: Wifi Radar
wlassistant is a very intuitive and straight-forward GUI application for managing your wireless connections.
wlassistant must be run with root privileges:
# sudo wlassistant
One method of using wlassistant is to configure your wireless card within /etc/rc.conf, specifying the access point you use most often. On start-up, your card will automatically be configured for this ESSID, but if other wireless networks are needed/available, wlassistant can then be invoked to access them. Background the network daemon in /etc/rc.conf, by prefixing it with a @ to avoid boot-up delays.