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 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>A summary of available driver backends is below. Support for each
242 of the driver backends is chosen at wpa_supplicant compile time. For a
243 list of supported driver backends that may be used with the -D option on
244 your system, refer to the help output of wpa_supplicant
245 (<emphasis>wpa_supplicant -h</emphasis>).</para>
251 <para>Linux wireless extensions (generic).</para>
258 <para>wpa_supplicant wired Ethernet driver</para>
263 <term>roboswitch</term>
265 <para>wpa_supplicant Broadcom switch driver</para>
272 <para>BSD 802.11 support (Atheros, etc.).</para>
279 <para>Windows NDIS driver.</para>
286 <title>Command Line Options</title>
287 <para>Most command line options have global scope. Some are given per
288 interface, and are only valid if at least one <option>-i</option> option
289 is specified, otherwise they're ignored. Option groups for different
290 interfaces must be separated by <option>-N</option> option.</para>
293 <term>-b br_ifname</term>
295 <para>Optional bridge interface name. (Per interface)</para>
302 <para>Run daemon in the background.</para>
307 <term>-c filename</term>
309 <para>Path to configuration file. (Per interface)</para>
314 <term>-C ctrl_interface</term>
316 <para>Path to ctrl_interface socket (Per interface. Only used if
317 <option>-c</option> is not).</para>
322 <term>-i ifname</term>
324 <para>Interface to listen on. Multiple instances of this option can
325 be present, one per interface, separated by <option>-N</option>
326 option (see below).</para>
333 <para>Increase debugging verbosity (<option>-dd</option> even
339 <term>-D driver</term>
341 <para>Driver to use (can be multiple drivers: nl80211,wext).
342 (Per interface, see the available options below.)</para>
347 <term>-f output file</term>
349 <para>Log output to specified file instead of stdout.</para>
354 <term>-g global ctrl_interface</term>
356 <para>Path to global ctrl_interface socket. If specified, interface
357 definitions may be omitted.</para>
364 <para>Include keys (passwords, etc.) in debug output.</para>
371 <para>Include timestamp in debug messages.</para>
378 <para>Help. Show a usage message.</para>
385 <para>Show license (BSD).</para>
392 <para>Driver parameters. (Per interface)</para>
397 <term>-P PID_file</term>
399 <para>Path to PID file.</para>
406 <para>Decrease debugging verbosity (<option>-qq</option> even
414 <para>Enabled DBus control interface. If enabled, interface
415 definitions may be omitted.</para>
422 <para>Show version.</para>
429 <para>Wait for a control interface monitor before starting.</para>
436 <para>Start describing new interface.</para>
443 <title>Examples</title>
445 <para>In most common cases, <command>wpa_supplicant</command> is
448 <blockquote><programlisting>
449 wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0
450 </programlisting></blockquote>
452 <para>This makes the process fork into background.</para>
454 <para>The easiest way to debug problems, and to get debug log for
455 bug reports, is to start <command>wpa_supplicant</command> on
456 foreground with debugging enabled:</para>
458 <blockquote><programlisting>
459 wpa_supplicant -c/etc/wpa_supplicant.conf -iwlan0 -d
460 </programlisting></blockquote>
462 <para>If the specific driver wrapper is not known beforehand, it is
463 possible to specify multiple comma separated driver wrappers on the command
464 line. <command>wpa_supplicant</command> will use the first driver
465 wrapper that is able to initialize the interface.</para>
467 <blockquote><programlisting>
468 wpa_supplicant -Dnl80211,wext -c/etc/wpa_supplicant.conf -iwlan0
469 </programlisting></blockquote>
471 <para><command>wpa_supplicant</command> can control multiple
472 interfaces (radios) either by running one process for each
473 interface separately or by running just one process and list of
474 options at command line. Each interface is separated with -N
475 argument. As an example, following command would start
476 wpa_supplicant for two interfaces:</para>
478 <blockquote><programlisting>
480 -c wpa1.conf -i wlan0 -D nl80211 -N \
481 -c wpa2.conf -i ath0 -D wext
482 </programlisting></blockquote>
486 <title>OS Requirements</title>
487 <para>Current hardware/software requirements:</para>
491 <para>Linux kernel 2.4.x or 2.6.x with Linux Wireless
492 Extensions v15 or newer</para>
497 <para>FreeBSD 6-CURRENT</para>
501 <para>Microsoft Windows with WinPcap (at least WinXP, may work
502 with other versions)</para>
508 <title>Supported Drivers</title>
511 <term>Linux wireless extensions</term>
513 <para>In theory, any driver that supports Linux wireless
514 extensions can be used with IEEE 802.1X (i.e., not WPA) when
515 using ap_scan=0 option in configuration file.</para>
520 <term>Wired Ethernet drivers</term>
522 <para>Use ap_scan=0.</para>
527 <term>BSD net80211 layer (e.g., Atheros driver)</term>
529 <para>At the moment, this is for FreeBSD 6-CURRENT branch.</para>
534 <term>Windows NDIS</term>
536 <para>The current Windows port requires WinPcap
537 (http://winpcap.polito.it/). See README-Windows.txt for more
544 <para>wpa_supplicant was designed to be portable for different
545 drivers and operating systems. Hopefully, support for more wlan
546 cards and OSes will be added in the future. See developer.txt for
547 more information about the design of wpa_supplicant and porting to
548 other drivers. One main goal is to add full WPA/WPA2 support to
549 Linux wireless extensions to allow new drivers to be supported
550 without having to implement new driver-specific interface code in
551 wpa_supplicant.</para>
555 <title>Architecture</title> <para>The
556 <command>wpa_supplicant</command> system consists of the following
561 <term><filename>wpa_supplicant.conf</filename> </term>
563 <para>the configuration file describing all networks that the
564 user wants the computer to connect to. </para>
568 <term><command>wpa_supplicant</command></term>
569 <listitem><para>the program that directly interacts with the
570 network interface. </para></listitem>
573 <term><command>wpa_cli</command></term> <listitem><para> the
574 client program that provides a high-level interface to the
575 functionality of the daemon. </para></listitem>
578 <term><command>wpa_passphrase</command></term>
579 <listitem><para>a utility needed to construct
580 <filename>wpa_supplicant.conf</filename> files that include
581 encrypted passwords.</para></listitem>
587 <title>Quick Start</title>
589 <para>First, make a configuration file, e.g.
590 <filename>/etc/wpa_supplicant.conf</filename>, that describes the networks
591 you are interested in. See <citerefentry>
592 <refentrytitle>wpa_supplicant.conf</refentrytitle>
593 <manvolnum>5</manvolnum>
597 <para>Once the configuration is ready, you can test whether the
598 configuration works by running <command>wpa_supplicant</command>
599 with following command to start it on foreground with debugging
602 <blockquote><programlisting>
603 wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -d
604 </programlisting></blockquote>
606 <para>Assuming everything goes fine, you can start using following
607 command to start <command>wpa_supplicant</command> on background
608 without debugging:</para>
610 <blockquote><programlisting>
611 wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -B
612 </programlisting></blockquote>
614 <para>Please note that if you included more than one driver
615 interface in the build time configuration (.config), you may need
616 to specify which interface to use by including -D<driver
617 name> option on the command line.</para>
619 <!-- XXX at this point, the page could include a little script
620 based on wpa_cli to wait for a connection and then run
626 <title>Interface to pcmcia-cs/cardmrg</title>
628 <para>For example, following small changes to pcmcia-cs scripts
629 can be used to enable WPA support:</para>
631 <para>Add MODE="Managed" and WPA="y" to the network scheme in
632 <filename>/etc/pcmcia/wireless.opts</filename>.</para>
634 <para>Add the following block to the end of <emphasis>start</emphasis>
635 action handler in <filename>/etc/pcmcia/wireless</filename>:</para>
637 <blockquote><programlisting>
638 if [ "$WPA" = "y" -a -x /usr/local/bin/wpa_supplicant ]; then
639 /usr/local/bin/wpa_supplicant -B -c/etc/wpa_supplicant.conf -i$DEVICE
641 </programlisting></blockquote>
644 <para>Add the following block to the end of <emphasis>stop</emphasis>
645 action handler (may need to be separated from other actions) in
646 <filename>/etc/pcmcia/wireless</filename>:</para>
648 <blockquote><programlisting>
649 if [ "$WPA" = "y" -a -x /usr/local/bin/wpa_supplicant ]; then
650 killall wpa_supplicant
652 </programlisting></blockquote>
654 <para>This will make <command>cardmgr</command> start
655 <command>wpa_supplicant</command> when the card is plugged
660 <title>See Also</title>
663 <refentrytitle>wpa_background</refentrytitle>
664 <manvolnum>8</manvolnum>
667 <refentrytitle>wpa_supplicant.conf</refentrytitle>
668 <manvolnum>5</manvolnum>
671 <refentrytitle>wpa_cli</refentrytitle>
672 <manvolnum>8</manvolnum>
675 <refentrytitle>wpa_passphrase</refentrytitle>
676 <manvolnum>8</manvolnum>
682 <para>wpa_supplicant is copyright (c) 2003-2012,
683 Jouni Malinen <email>j@w1.fi</email> and
685 All Rights Reserved.</para>
687 <para>This program is licensed under the BSD license (the one with
688 advertisement clause removed).</para>