1 <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
5 <refentrytitle>wpa_supplicant</refentrytitle>
6 <manvolnum>8</manvolnum>
9 <refname>wpa_supplicant</refname>
10 <refpurpose>Wi-Fi Protected Access client and IEEE 802.1X supplicant</refpurpose>
14 <command>wpa_supplicant</command>
15 <arg>-BddfhKLqqtuvW</arg>
16 <arg>-i<replaceable>ifname</replaceable></arg>
17 <arg>-c<replaceable>config file</replaceable></arg>
18 <arg>-D<replaceable>driver</replaceable></arg>
19 <arg>-P<replaceable>PID_file</replaceable></arg>
20 <arg>-f<replaceable>output file</replaceable></arg>
24 <title>Overview</title>
27 Wireless networks do not require physical access to the network equipment
28 in the same way as wired networks. This makes it easier for unauthorized
29 users to passively monitor a network and capture all transmitted frames.
30 In addition, unauthorized use of the network is much easier. In many cases,
31 this can happen even without user's explicit knowledge since the wireless
32 LAN adapter may have been configured to automatically join any available
37 Link-layer encryption can be used to provide a layer of security for
38 wireless networks. The original wireless LAN standard, IEEE 802.11,
39 included a simple encryption mechanism, WEP. However, that proved to
40 be flawed in many areas and network protected with WEP cannot be consider
41 secure. IEEE 802.1X authentication and frequently changed dynamic WEP keys
42 can be used to improve the network security, but even that has inherited
43 security issues due to the use of WEP for encryption. Wi-Fi Protected
44 Access and IEEE 802.11i amendment to the wireless LAN standard introduce
45 a much improvement mechanism for securing wireless networks. IEEE 802.11i
46 enabled networks that are using CCMP (encryption mechanism based on strong
47 cryptographic algorithm AES) can finally be called secure used for
48 applications which require efficient protection against unauthorized
52 <para><command>wpa_supplicant</command> is an implementation of
53 the WPA Supplicant component, i.e., the part that runs in the
54 client stations. It implements WPA key negotiation with a WPA
55 Authenticator and EAP authentication with Authentication
56 Server. In addition, it controls the roaming and IEEE 802.11
57 authentication/association of the wireless LAN driver.</para>
59 <para><command>wpa_supplicant</command> is designed to be a
60 "daemon" program that runs in the background and acts as the
61 backend component controlling the wireless
62 connection. <command>wpa_supplicant</command> supports separate
63 frontend programs and an example text-based frontend,
64 <command>wpa_cli</command>, is included with
65 wpa_supplicant.</para>
67 <para>Before wpa_supplicant can do its work, the network interface
68 must be available. That means that the physical device must be
69 present and enabled, and the driver for the device must have be
70 loaded. The daemon will exit immediately if the device is not already
73 <para>After <command>wpa_supplicant</command> has configured the
74 network device, higher level configuration such as DHCP may
75 proceed. There are a variety of ways to integrate wpa_supplicant
76 into a machine's networking scripts, a few of which are described
77 in sections below.</para>
79 <para>The following steps are used when associating with an AP
84 <para><command>wpa_supplicant</command> requests the kernel
85 driver to scan neighboring BSSes</para>
89 <para><command>wpa_supplicant</command> selects a BSS based on
90 its configuration</para>
94 <para><command>wpa_supplicant</command> requests the kernel
95 driver to associate with the chosen BSS</para>
99 <para>If WPA-EAP: integrated IEEE 802.1X Supplicant
100 completes EAP authentication with the
101 authentication server (proxied by the Authenticator in the
106 <para>If WPA-EAP: master key is received from the IEEE 802.1X
111 <para>If WPA-PSK: <command>wpa_supplicant</command> uses PSK
112 as the master session key</para>
116 <para><command>wpa_supplicant</command> completes WPA 4-Way
117 Handshake and Group Key Handshake with the Authenticator
122 <para><command>wpa_supplicant</command> configures encryption
123 keys for unicast and broadcast</para>
127 <para>normal data packets can be transmitted and received</para>
133 <title>Supported Features</title>
134 <para>Supported WPA/IEEE 802.11i features:</para>
137 <para>WPA-PSK ("WPA-Personal")</para>
141 <para>WPA with EAP (e.g., with RADIUS authentication server)
142 ("WPA-Enterprise") Following authentication methods are
143 supported with an integrate IEEE 802.1X Supplicant:</para>
153 <para>EAP-PEAP/MSCHAPv2 (both PEAPv0 and PEAPv1)</para>
158 <para>EAP-PEAP/TLS (both PEAPv0 and PEAPv1)</para>
162 <para>EAP-PEAP/GTC (both PEAPv0 and PEAPv1)</para>
166 <para>EAP-PEAP/OTP (both PEAPv0 and PEAPv1)</para>
170 <para>EAP-PEAP/MD5-Challenge (both PEAPv0 and PEAPv1)</para>
174 <para>EAP-TTLS/EAP-MD5-Challenge</para>
178 <para>EAP-TTLS/EAP-GTC</para>
181 <listitem><para>EAP-TTLS/EAP-OTP</para></listitem>
183 <listitem><para>EAP-TTLS/EAP-MSCHAPv2</para></listitem>
185 <listitem><para>EAP-TTLS/EAP-TLS</para></listitem>
187 <listitem><para>EAP-TTLS/MSCHAPv2</para></listitem>
189 <listitem><para>EAP-TTLS/MSCHAP</para></listitem>
191 <listitem><para>EAP-TTLS/PAP</para></listitem>
193 <listitem><para>EAP-TTLS/CHAP</para></listitem>
195 <listitem><para>EAP-SIM</para></listitem>
197 <listitem><para>EAP-AKA</para></listitem>
199 <listitem><para>EAP-PSK</para></listitem>
201 <listitem><para>EAP-PAX</para></listitem>
203 <listitem><para>LEAP (note: requires special support from
204 the driver for IEEE 802.11 authentication)</para></listitem>
206 <listitem><para>(following methods are supported, but since
207 they do not generate keying material, they cannot be used
208 with WPA or IEEE 802.1X WEP keying)</para></listitem>
210 <listitem><para>EAP-MD5-Challenge </para></listitem>
212 <listitem><para>EAP-MSCHAPv2</para></listitem>
214 <listitem><para>EAP-GTC</para></listitem>
216 <listitem><para>EAP-OTP</para></listitem>
221 <para>key management for CCMP, TKIP, WEP104, WEP40</para>
225 <para>RSN/WPA2 (IEEE 802.11i)</para>
228 <para>pre-authentication</para>
232 <para>PMKSA caching</para>
240 <title>Available Drivers</title>
241 <para>The available drivers to specify with the -D option are:</para>
247 <para>(default) Host AP driver (Intersil Prism2/2.5/3).
248 (this can also be used with Linuxant DriverLoader).</para>
255 <para>Agere Systems Inc. driver (Hermes-I/Hermes-II).</para>
262 <para>MADWIFI 802.11 support (Atheros, etc.).</para>
269 <para>ATMEL AT76C5XXx (USB, PCMCIA).</para>
276 <para>Linux wireless extensions (generic).</para>
281 <term>ndiswrapper</term>
283 <para>Linux ndiswrapper.</para>
288 <term>broadcom</term>
290 <para>Broadcom wl.o driver.</para>
297 <para>Intel ipw2100/2200 driver.</para>
304 <para>wpa_supplicant wired Ethernet driver</para>
311 <para>BSD 802.11 support (Atheros, etc.).</para>
318 <para>Windows NDIS driver.</para>
325 <title>Command Line Options</title>
328 <term>-b br_ifname</term>
330 <para>Optional bridge interface name.</para>
337 <para>Run daemon in the background.</para>
342 <term>-c filename</term>
344 <para>Path to configuration file.</para>
349 <term>-C ctrl_interface</term>
351 <para>Path to ctrl_interface socket (only used if -c is not).</para>
356 <term>-i ifname</term>
358 <para>Interface to listen on.</para>
365 <para>Increase debugging verbosity (-dd even more).</para>
370 <term>-D driver</term>
372 <para>Driver to use. See the available options below.</para>
377 <term>-f output file</term>
379 <para>Log output to specified file instead of stdout.</para>
384 <term>-g global ctrl_interface</term>
386 <para>Path to global ctrl_interface socket.</para>
393 <para>Include keys (passwords, etc.) in debug output.</para>
400 <para>Include timestamp in debug messages.</para>
407 <para>Help. Show a usage message.</para>
414 <para>Show license (GPL and BSD).</para>
421 <para>Driver parameters.</para>
426 <term>-P PID_file</term>
428 <para>Path to PID file.</para>
435 <para>Decrease debugging verbosity (-qq even less).</para>
442 <para>Enabled DBus control interface.</para>
449 <para>Show version.</para>
456 <para>Wait for a control interface monitor before starting.</para>
463 <para>Start describing new interface.</para>
470 <title>Examples</title>
472 <para>In most common cases, <command>wpa_supplicant</command> is
475 <blockquote><programlisting>
476 wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0
477 </programlisting></blockquote>
479 <para>This makes the process fork into background.</para>
481 <para>The easiest way to debug problems, and to get debug log for
482 bug reports, is to start <command>wpa_supplicant</command> on
483 foreground with debugging enabled:</para>
485 <blockquote><programlisting>
486 wpa_supplicant -c/etc/wpa_supplicant.conf -iwlan0 -d
487 </programlisting></blockquote>
489 <para><command>wpa_supplicant</command> can control multiple
490 interfaces (radios) either by running one process for each
491 interface separately or by running just one process and list of
492 options at command line. Each interface is separated with -N
493 argument. As an example, following command would start
494 wpa_supplicant for two interfaces:</para>
496 <blockquote><programlisting>
498 -c wpa1.conf -i wlan0 -D hostap -N \
499 -c wpa2.conf -i ath0 -D madwifi
500 </programlisting></blockquote>
504 <title>OS Requirements</title>
505 <para>Current hardware/software requirements:</para>
509 <para>Linux kernel 2.4.x or 2.6.x with Linux Wireless
510 Extensions v15 or newer</para>
515 <para>FreeBSD 6-CURRENT</para>
519 <para>Microsoft Windows with WinPcap (at least WinXP, may work
520 with other versions)</para>
526 <title>Supported Drivers</title>
529 <term>Host AP driver for Prism2/2.5/3 (development
530 snapshot/v0.2.x)</term>
532 <para> (http://hostap.epitest.fi/) Driver needs to be set in
533 Managed mode ('iwconfig wlan0 mode managed'). Please note
534 that station firmware version needs to be 1.7.0 or newer to
535 work in WPA mode.</para>
540 <term>Linuxant DriverLoader</term>
542 <para>(http://www.linuxant.com/driverloader/)
543 with Windows NDIS driver for your wlan card supporting WPA.</para>
548 <term>Agere Systems Inc. Linux Driver</term>
550 <para> (http://www.agere.com/support/drivers/) Please note
551 that the driver interface file (driver_hermes.c) and hardware
552 specific include files are not included in the wpa_supplicant
553 distribution. You will need to copy these from the source
554 package of the Agere driver.</para>
559 <term>madwifi driver for cards based on Atheros chip set (ar521x)</term>
561 <para> (http://sourceforge.net/projects/madwifi/) Please
562 note that you will need to modify the wpa_supplicant .config
563 file to use the correct path for the madwifi driver root
564 directory (CFLAGS += -I../madwifi/wpa line in example
570 <term>ATMEL AT76C5XXx driver for USB and PCMCIA cards</term>
572 <para> (http://atmelwlandriver.sourceforge.net/).</para>
577 <term>Linux ndiswrapper</term>
579 <para> (http://ndiswrapper.sourceforge.net/) with Windows
585 <term>Broadcom wl.o driver</term>
587 <para> This is a generic Linux driver for Broadcom IEEE
588 802.11a/g cards. However, it is proprietary driver that is
589 not publicly available except for couple of exceptions, mainly
590 Broadcom-based APs/wireless routers that use Linux. The driver
591 binary can be downloaded, e.g., from Linksys support site
592 (http://www.linksys.com/support/gpl.asp) for Linksys
593 WRT54G. The GPL tarball includes cross-compiler and the needed
594 header file, wlioctl.h, for compiling wpa_supplicant. This
595 driver support in wpa_supplicant is expected to work also with
596 other devices based on Broadcom driver (assuming the driver
597 includes client mode support).</para>
602 <term> Intel ipw2100 driver</term>
604 <para> (http://sourceforge.net/projects/ipw2100/)</para>
609 <term>Intel ipw2200 driver</term>
611 <para> (http://sourceforge.net/projects/ipw2200/)</para>
616 <term>Linux wireless extensions</term>
618 <para>In theory, any driver that supports Linux wireless
619 extensions can be used with IEEE 802.1X (i.e., not WPA) when
620 using ap_scan=0 option in configuration file.</para>
625 <term>Wired Ethernet drivers</term>
627 <para>Use ap_scan=0.</para>
632 <term>BSD net80211 layer (e.g., Atheros driver)</term>
634 <para>At the moment, this is for FreeBSD 6-CURRENT branch.</para>
639 <term>Windows NDIS</term>
641 <para>The current Windows port requires WinPcap
642 (http://winpcap.polito.it/). See README-Windows.txt for more
649 <para>wpa_supplicant was designed to be portable for different
650 drivers and operating systems. Hopefully, support for more wlan
651 cards and OSes will be added in the future. See developer.txt for
652 more information about the design of wpa_supplicant and porting to
653 other drivers. One main goal is to add full WPA/WPA2 support to
654 Linux wireless extensions to allow new drivers to be supported
655 without having to implement new driver-specific interface code in
656 wpa_supplicant.</para>
660 <title>Architecture</title> <para>The
661 <command>wpa_supplicant</command> system consists of the following
666 <term><filename>wpa_supplicant.conf</filename> </term>
668 <para>the configuration file describing all networks that the
669 user wants the computer to connect to. </para>
673 <term><command>wpa_supplicant</command></term>
674 <listitem><para>the program that directly interacts with the
675 network interface. </para></listitem>
678 <term><command>wpa_cli</command></term> <listitem><para> the
679 client program that provides a high-level interface to the
680 functionality of the daemon. </para></listitem>
683 <term><command>wpa_passphrase</command></term>
684 <listitem><para>a utility needed to construct
685 <filename>wpa_supplicant.conf</filename> files that include
686 encrypted passwords.</para></listitem>
692 <title>Quick Start</title>
694 <para>First, make a configuration file, e.g.
695 <filename>/etc/wpa_supplicant.conf</filename>, that describes the networks
696 you are interested in. See <citerefentry>
697 <refentrytitle>wpa_supplicant.conf</refentrytitle>
698 <manvolnum>5</manvolnum>
702 <para>Once the configuration is ready, you can test whether the
703 configuration works by running <command>wpa_supplicant</command>
704 with following command to start it on foreground with debugging
707 <blockquote><programlisting>
708 wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -d
709 </programlisting></blockquote>
711 <para>Assuming everything goes fine, you can start using following
712 command to start <command>wpa_supplicant</command> on background
713 without debugging:</para>
715 <blockquote><programlisting>
716 wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -B
717 </programlisting></blockquote>
719 <para>Please note that if you included more than one driver
720 interface in the build time configuration (.config), you may need
721 to specify which interface to use by including -D<driver
722 name> option on the command line.</para>
724 <!-- XXX at this point, the page could include a little script
725 based on wpa_cli to wait for a connection and then run
731 <title>Interface to pcmcia-cs/cardmrg</title>
733 <para>For example, following small changes to pcmcia-cs scripts
734 can be used to enable WPA support:</para>
736 <para>Add MODE="Managed" and WPA="y" to the network scheme in
737 <filename>/etc/pcmcia/wireless.opts</filename>.</para>
739 <para>Add the following block to the end of 'start' action handler
740 in <filename>/etc/pcmcia/wireless</filename>:</para>
742 <blockquote><programlisting>
743 if [ "$WPA" = "y" -a -x /usr/local/bin/wpa_supplicant ]; then
744 /usr/local/bin/wpa_supplicant -B -c/etc/wpa_supplicant.conf -i$DEVICE
746 </programlisting></blockquote>
749 <para>Add the following block to the end of 'stop' action handler
750 (may need to be separated from other actions) in
751 <filename>/etc/pcmcia/wireless</filename>:</para>
753 <blockquote><programlisting>
754 if [ "$WPA" = "y" -a -x /usr/local/bin/wpa_supplicant ]; then
755 killall wpa_supplicant
757 </programlisting></blockquote>
759 <para>This will make <command>cardmgr</command> start
760 <command>wpa_supplicant</command> when the card is plugged
765 <title>See Also</title>
768 <refentrytitle>wpa_background</refentrytitle>
769 <manvolnum>8</manvolnum>
772 <refentrytitle>wpa_supplicant.conf</refentrytitle>
773 <manvolnum>5</manvolnum>
776 <refentrytitle>wpa_cli</refentrytitle>
777 <manvolnum>8</manvolnum>
780 <refentrytitle>wpa_passphrase</refentrytitle>
781 <manvolnum>8</manvolnum>
787 <para>wpa_supplicant is copyright (c) 2003-2007,
788 Jouni Malinen <email>j@w1.fi</email> and
790 All Rights Reserved.</para>
792 <para>This program is dual-licensed under both the GPL version 2
793 and BSD license. Either license may be used at your option.</para>