Sync wpa_supplicant man page with README changes
[mech_eap.git] / wpa_supplicant / doc / docbook / wpa_supplicant.sgml
1 <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
2
3 <refentry>
4   <refmeta>
5     <refentrytitle>wpa_supplicant</refentrytitle>
6     <manvolnum>8</manvolnum>
7   </refmeta>
8   <refnamediv>
9     <refname>wpa_supplicant</refname>
10     <refpurpose>Wi-Fi Protected Access client and IEEE 802.1X supplicant</refpurpose>
11   </refnamediv>
12   <refsynopsisdiv>
13     <cmdsynopsis>
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>
21     </cmdsynopsis>
22   </refsynopsisdiv>
23   <refsect1>
24     <title>Overview</title>
25
26     <para>
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
33     network.
34     </para>
35
36     <para>
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
49     access.
50     </para>
51
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>
58
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>
66
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
71     available.</para>
72
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>
78
79     <para>The following steps are used when associating with an AP
80     using WPA:</para>
81
82     <itemizedlist>
83       <listitem>
84         <para><command>wpa_supplicant</command> requests the kernel
85         driver to scan neighboring BSSes</para>
86       </listitem>
87
88       <listitem>
89         <para><command>wpa_supplicant</command> selects a BSS based on
90         its configuration</para>
91       </listitem>
92
93       <listitem>
94         <para><command>wpa_supplicant</command> requests the kernel
95         driver to associate with the chosen BSS</para>
96       </listitem>
97
98       <listitem>
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
102         AP)</para>
103       </listitem>
104
105       <listitem>
106         <para>If WPA-EAP: master key is received from the IEEE 802.1X
107         Supplicant</para>
108       </listitem>
109
110       <listitem>
111         <para>If WPA-PSK: <command>wpa_supplicant</command> uses PSK
112         as the master session key</para>
113       </listitem>
114
115       <listitem>
116         <para><command>wpa_supplicant</command> completes WPA 4-Way
117         Handshake and Group Key Handshake with the Authenticator
118         (AP)</para>
119       </listitem>
120
121       <listitem>
122         <para><command>wpa_supplicant</command> configures encryption
123         keys for unicast and broadcast</para>
124       </listitem>
125
126       <listitem>
127         <para>normal data packets can be transmitted and received</para>
128       </listitem>
129     </itemizedlist>
130   </refsect1>
131
132   <refsect1>
133     <title>Supported Features</title>
134     <para>Supported WPA/IEEE 802.11i features:</para>
135     <itemizedlist>
136       <listitem>
137         <para>WPA-PSK ("WPA-Personal")</para>
138       </listitem>
139
140       <listitem>
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>
144
145         <itemizedlist>
146           <listitem>
147             <para>EAP-TLS</para>
148           </listitem>
149         </itemizedlist>
150
151         <itemizedlist>
152           <listitem>
153             <para>EAP-PEAP/MSCHAPv2 (both PEAPv0 and PEAPv1)</para>
154           </listitem>
155
156
157           <listitem>
158             <para>EAP-PEAP/TLS (both PEAPv0 and PEAPv1)</para>
159           </listitem>
160
161           <listitem>
162             <para>EAP-PEAP/GTC (both PEAPv0 and PEAPv1)</para>
163           </listitem>
164
165           <listitem>
166             <para>EAP-PEAP/OTP (both PEAPv0 and PEAPv1)</para>
167           </listitem>
168
169           <listitem>
170             <para>EAP-PEAP/MD5-Challenge (both PEAPv0 and PEAPv1)</para>
171           </listitem>
172
173           <listitem>
174             <para>EAP-TTLS/EAP-MD5-Challenge</para>
175           </listitem>
176
177           <listitem>
178             <para>EAP-TTLS/EAP-GTC</para>
179           </listitem>
180
181           <listitem><para>EAP-TTLS/EAP-OTP</para></listitem>
182
183           <listitem><para>EAP-TTLS/EAP-MSCHAPv2</para></listitem>
184
185           <listitem><para>EAP-TTLS/EAP-TLS</para></listitem>
186
187           <listitem><para>EAP-TTLS/MSCHAPv2</para></listitem>
188
189           <listitem><para>EAP-TTLS/MSCHAP</para></listitem>
190
191           <listitem><para>EAP-TTLS/PAP</para></listitem>
192
193           <listitem><para>EAP-TTLS/CHAP</para></listitem>
194
195           <listitem><para>EAP-SIM</para></listitem>
196
197           <listitem><para>EAP-AKA</para></listitem>
198
199           <listitem><para>EAP-PSK</para></listitem>
200
201           <listitem><para>EAP-PAX</para></listitem>
202
203           <listitem><para>LEAP (note: requires special support from
204           the driver for IEEE 802.11 authentication)</para></listitem>
205
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>
209
210           <listitem><para>EAP-MD5-Challenge </para></listitem>
211
212           <listitem><para>EAP-MSCHAPv2</para></listitem>
213
214           <listitem><para>EAP-GTC</para></listitem>
215
216           <listitem><para>EAP-OTP</para></listitem>
217         </itemizedlist>
218       </listitem>
219
220       <listitem>
221         <para>key management for CCMP, TKIP, WEP104, WEP40</para>
222       </listitem>
223
224       <listitem>
225         <para>RSN/WPA2 (IEEE 802.11i)</para>
226         <itemizedlist>
227           <listitem>
228             <para>pre-authentication</para>
229           </listitem>
230
231           <listitem>
232             <para>PMKSA caching</para>
233           </listitem>
234         </itemizedlist>
235       </listitem>
236     </itemizedlist>
237   </refsect1>
238
239   <refsect1>
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>
246
247     <variablelist>
248       <varlistentry>
249         <term>wext</term>
250         <listitem>
251           <para>Linux wireless extensions (generic).</para>
252         </listitem>
253       </varlistentry>
254
255       <varlistentry>
256         <term>wired</term>
257         <listitem>
258           <para>wpa_supplicant wired Ethernet driver</para>
259         </listitem>
260       </varlistentry>
261
262       <varlistentry>
263         <term>roboswitch</term>
264         <listitem>
265           <para>wpa_supplicant Broadcom switch driver</para>
266         </listitem>
267       </varlistentry>
268
269       <varlistentry>
270         <term>bsd</term>
271         <listitem>
272           <para>BSD 802.11 support (Atheros, etc.).</para>
273         </listitem>
274       </varlistentry>
275
276       <varlistentry>
277         <term>ndis</term>
278         <listitem>
279           <para>Windows NDIS driver.</para>
280         </listitem>
281       </varlistentry>
282     </variablelist>
283   </refsect1>
284
285   <refsect1>
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>
291     <variablelist>
292       <varlistentry>
293         <term>-b br_ifname</term>
294         <listitem>
295           <para>Optional bridge interface name. (Per interface)</para>
296         </listitem>
297       </varlistentry>
298
299       <varlistentry>
300         <term>-B</term>
301         <listitem>
302           <para>Run daemon in the background.</para>
303         </listitem>
304       </varlistentry>
305
306       <varlistentry>
307         <term>-c filename</term>
308         <listitem>
309           <para>Path to configuration file. (Per interface)</para>
310         </listitem>
311       </varlistentry>
312
313       <varlistentry>
314         <term>-C ctrl_interface</term>
315         <listitem>
316           <para>Path to ctrl_interface socket (Per interface. Only used if
317                   <option>-c</option> is not).</para>
318         </listitem>
319       </varlistentry>
320
321       <varlistentry>
322         <term>-i ifname</term>
323         <listitem>
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>
327         </listitem>
328       </varlistentry>
329
330       <varlistentry>
331         <term>-d</term>
332         <listitem>
333           <para>Increase debugging verbosity (<option>-dd</option> even
334                   more).</para>
335         </listitem>
336       </varlistentry>
337
338       <varlistentry>
339         <term>-D driver</term>
340         <listitem>
341           <para>Driver to use (can be multiple drivers: nl80211,wext).
342                   (Per interface, see the available options below.)</para>
343         </listitem>
344       </varlistentry>
345
346       <varlistentry>
347         <term>-f output file</term>
348         <listitem>
349           <para>Log output to specified file instead of stdout.</para>
350         </listitem>
351       </varlistentry>
352
353       <varlistentry>
354         <term>-g global ctrl_interface</term>
355         <listitem>
356           <para>Path to global ctrl_interface socket. If specified, interface
357           definitions may be omitted.</para>
358         </listitem>
359       </varlistentry>
360
361       <varlistentry>
362         <term>-K</term>
363         <listitem>
364           <para>Include keys (passwords, etc.) in debug output.</para>
365         </listitem>
366       </varlistentry>
367
368       <varlistentry>
369         <term>-t</term>
370         <listitem>
371           <para>Include timestamp in debug messages.</para>
372         </listitem>
373       </varlistentry>
374
375       <varlistentry>
376         <term>-h</term>
377         <listitem>
378           <para>Help.  Show a usage message.</para>
379         </listitem>
380       </varlistentry>
381
382       <varlistentry>
383         <term>-L</term>
384         <listitem>
385           <para>Show license (BSD).</para>
386         </listitem>
387       </varlistentry>
388
389       <varlistentry>
390         <term>-p</term>
391         <listitem>
392           <para>Driver parameters. (Per interface)</para>
393         </listitem>
394       </varlistentry>
395
396       <varlistentry>
397         <term>-P PID_file</term>
398         <listitem>
399           <para>Path to PID file.</para>
400         </listitem>
401       </varlistentry>
402
403       <varlistentry>
404         <term>-q</term>
405         <listitem>
406           <para>Decrease debugging verbosity (<option>-qq</option> even
407                   less).</para>
408         </listitem>
409       </varlistentry>
410
411       <varlistentry>
412         <term>-u</term>
413         <listitem>
414           <para>Enabled DBus control interface. If enabled, interface
415           definitions may be omitted.</para>
416         </listitem>
417       </varlistentry>
418
419       <varlistentry>
420         <term>-v</term>
421         <listitem>
422           <para>Show version.</para>
423         </listitem>
424       </varlistentry>
425
426       <varlistentry>
427         <term>-W</term>
428         <listitem>
429           <para>Wait for a control interface monitor before starting.</para>
430         </listitem>
431       </varlistentry>
432
433       <varlistentry>
434         <term>-N</term>
435         <listitem>
436           <para>Start describing new interface.</para>
437         </listitem>
438       </varlistentry>
439     </variablelist>
440   </refsect1>
441
442   <refsect1>
443     <title>Examples</title>
444
445     <para>In most common cases, <command>wpa_supplicant</command> is
446     started with:</para>
447
448 <blockquote><programlisting>
449 wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0
450 </programlisting></blockquote>
451
452     <para>This makes the process fork into background.</para>
453
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>
457
458 <blockquote><programlisting>
459 wpa_supplicant -c/etc/wpa_supplicant.conf -iwlan0 -d
460 </programlisting></blockquote>
461
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>
466
467 <blockquote><programlisting>
468 wpa_supplicant -Dnl80211,wext -c/etc/wpa_supplicant.conf -iwlan0
469 </programlisting></blockquote>
470
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>
477
478 <blockquote><programlisting>
479 wpa_supplicant \
480         -c wpa1.conf -i wlan0 -D nl80211 -N \
481         -c wpa2.conf -i ath0 -D wext
482 </programlisting></blockquote>
483   </refsect1>
484
485   <refsect1>
486     <title>OS Requirements</title>
487     <para>Current hardware/software requirements:</para>
488
489     <itemizedlist>
490       <listitem>
491         <para>Linux kernel 2.4.x or 2.6.x with Linux Wireless
492         Extensions v15 or newer</para>
493       </listitem>
494
495
496       <listitem>
497         <para>FreeBSD 6-CURRENT</para>
498       </listitem>
499
500       <listitem>
501         <para>Microsoft Windows with WinPcap (at least WinXP, may work
502         with other versions)</para>
503       </listitem>
504     </itemizedlist>
505   </refsect1>
506
507   <refsect1>
508     <title>Supported Drivers</title>
509     <variablelist>
510       <varlistentry>
511         <term>Linux wireless extensions</term>
512         <listitem>
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>
516         </listitem>
517       </varlistentry>
518       
519       <varlistentry>
520         <term>Wired Ethernet drivers</term>
521         <listitem>
522           <para>Use ap_scan=0.</para>
523         </listitem>
524       </varlistentry>
525
526       <varlistentry>
527         <term>BSD net80211 layer (e.g., Atheros driver)</term>
528         <listitem>
529           <para>At the moment, this is for FreeBSD 6-CURRENT branch.</para>
530         </listitem>
531       </varlistentry>
532
533       <varlistentry>
534         <term>Windows NDIS</term>
535         <listitem>
536           <para>The current Windows port requires WinPcap
537         (http://winpcap.polito.it/).  See README-Windows.txt for more
538         information.</para>
539         </listitem>
540       </varlistentry>
541     </variablelist>
542
543         
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>
552   </refsect1>
553
554   <refsect1>
555     <title>Architecture</title> <para>The
556     <command>wpa_supplicant</command> system consists of the following
557     components:</para>
558
559     <variablelist>
560       <varlistentry>
561         <term><filename>wpa_supplicant.conf</filename> </term>
562         <listitem>
563         <para>the configuration file describing all networks that the
564         user wants the computer to connect to.  </para>
565         </listitem>
566       </varlistentry>
567       <varlistentry>
568         <term><command>wpa_supplicant</command></term>
569         <listitem><para>the program that directly interacts with the
570         network interface.  </para></listitem>
571       </varlistentry>
572       <varlistentry>
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>
576       </varlistentry>
577       <varlistentry>
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>
582       </varlistentry>
583     </variablelist>
584   </refsect1>
585
586   <refsect1>
587     <title>Quick Start</title>
588
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>
594       </citerefentry>
595     for details.</para>
596
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
600     enabled:</para>
601
602     <blockquote><programlisting>
603 wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -d
604     </programlisting></blockquote>
605
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>
609
610     <blockquote><programlisting>
611 wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -B
612     </programlisting></blockquote>
613
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&lt;driver
617     name&gt; option on the command line.</para>
618
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
621          dhclient -->
622
623   </refsect1>
624
625   <refsect1>
626     <title>Interface to pcmcia-cs/cardmrg</title>
627
628     <para>For example, following small changes to pcmcia-cs scripts
629     can be used to enable WPA support:</para>
630
631     <para>Add MODE="Managed" and WPA="y" to the network scheme in
632     <filename>/etc/pcmcia/wireless.opts</filename>.</para>
633
634     <para>Add the following block to the end of <emphasis>start</emphasis>
635     action handler in <filename>/etc/pcmcia/wireless</filename>:</para>
636
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
640 fi
641     </programlisting></blockquote>
642
643
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>
647
648     <blockquote><programlisting>
649 if [ "$WPA" = "y" -a -x /usr/local/bin/wpa_supplicant ]; then
650     killall wpa_supplicant
651 fi
652     </programlisting></blockquote>
653
654     <para>This will make <command>cardmgr</command> start
655     <command>wpa_supplicant</command> when the card is plugged
656     in.</para>
657   </refsect1>
658
659   <refsect1>
660     <title>See Also</title>
661     <para>
662       <citerefentry>
663         <refentrytitle>wpa_background</refentrytitle>
664         <manvolnum>8</manvolnum>
665       </citerefentry>
666       <citerefentry>
667         <refentrytitle>wpa_supplicant.conf</refentrytitle>
668         <manvolnum>5</manvolnum>
669       </citerefentry>
670       <citerefentry>
671         <refentrytitle>wpa_cli</refentrytitle>
672         <manvolnum>8</manvolnum>
673       </citerefentry>
674       <citerefentry>
675         <refentrytitle>wpa_passphrase</refentrytitle>
676         <manvolnum>8</manvolnum>
677       </citerefentry>
678     </para>
679   </refsect1>
680   <refsect1>
681     <title>Legal</title>
682     <para>wpa_supplicant is copyright (c) 2003-2012,
683     Jouni Malinen <email>j@w1.fi</email> and
684     contributors.
685     All Rights Reserved.</para>
686
687     <para>This program is licensed under the BSD license (the one with
688     advertisement clause removed).</para>
689   </refsect1>
690 </refentry>