1WPA_SUPPLICANT(8)                                            WPA_SUPPLICANT(8)
2
3
4

NAME

6       wpa_supplicant  - Wi-Fi Protected Access client and IEEE 802.1X suppli‐
7       cant
8

SYNOPSIS

10       wpa_supplicant [ -BddehLqqvw ]  [  -iifname  ]  [  -cconfig  file  ]  [
11       -Ddriver ] [ -PPID_file ]
12
13

OVERVIEW

15       Wireless  networks do not require physical access to the network equip‐
16       ment in the same way as wired networks. This makes it easier for  unau‐
17       thorized users to passively monitor a network and capture all transmit‐
18       ted frames.  In addition, unauthorized use of the network is much  eas‐
19       ier. In many cases, this can happen even without user's explicit knowl‐
20       edge since the wireless LAN adapter may have been configured  to  auto‐
21       matically join any available network.
22
23       Link-layer  encryption  can  be used to provide a layer of security for
24       wireless networks. The original wireless  LAN  standard,  IEEE  802.11,
25       included a simple encryption mechanism, WEP. However, that proved to be
26       flawed in many areas and network protected with WEP cannot be  consider
27       secure.  IEEE  802.1X authentication and frequently changed dynamic WEP
28       keys can be used to improve the network security,  but  even  that  has
29       inherited  security  issues due to the use of WEP for encryption. Wi-Fi
30       Protected Access and IEEE 802.11i amendment to the wireless  LAN  stan‐
31       dard  introduce a much improvement mechanism for securing wireless net‐
32       works. IEEE 802.11i enabled networks that are  using  CCMP  (encryption
33       mechanism  based  on strong cryptographic algorithm AES) can finally be
34       called secure used for applications which require efficient  protection
35       against unauthorized access.
36
37       wpa_supplicant  is  an  implementation of the WPA Supplicant component,
38       i.e., the part that runs in the client stations. It implements WPA  key
39       negotiation  with  a  WPA  Authenticator  and  EAP  authentication with
40       Authentication Server. In addition, it controls the  roaming  and  IEEE
41       802.11 authentication/association of the wireless LAN driver.
42
43       wpa_supplicant  is  designed  to be a "daemon" program that runs in the
44       background and acts as the backend component controlling  the  wireless
45       connection.  wpa_supplicant  supports separate frontend programs and an
46       example text-based frontend, wpa_cli, is included with wpa_supplicant.
47
48       Before wpa_supplicant can do its work, the network  interface  must  be
49       available.   That  means  that  the physical device must be present and
50       enabled, and the driver for the device must have be loaded.  Note, how‐
51       ever,  that  the '-w' option of the wpa_supplicant daemon instructs the
52       daemon to continue running and to wait  for  the  interface  to  become
53       available.   Without  the '-w' option, the daemon will exit immediately
54       if the device is not already available.
55
56       After wpa_supplicant has configured the network  device,  higher  level
57       configuration such as DHCP may proceed.  There are a variety of ways to
58       integrate wpa_supplicant into a machine's networking scripts, a few  of
59       which are described in sections below.
60
61       The following steps are used when associating with an AP using WPA:
62
63       · wpa_supplicant requests the kernel driver to scan neighboring BSSes
64
65       · wpa_supplicant selects a BSS based on its configuration
66
67       · wpa_supplicant  requests the kernel driver to associate with the cho‐
68         sen BSS
69
70       · If WPA-EAP: integrated IEEE 802.1X Supplicant or external Xsupplicant
71         completes  EAP authentication with the authentication server (proxied
72         by the Authenticator in the AP)
73
74       · If WPA-EAP: master key is received from the IEEE 802.1X Supplicant
75
76       · If WPA-PSK: wpa_supplicant uses PSK as the master session key
77
78       · wpa_supplicant completes WPA 4-Way Handshake and Group Key  Handshake
79         with the Authenticator (AP)
80
81       · wpa_supplicant configures encryption keys for unicast and broadcast
82
83       · normal data packets can be transmitted and received
84

SUPPORTED FEATURES

86       Supported WPA/IEEE 802.11i features:
87
88       · WPA-PSK ("WPA-Personal")
89
90       · WPA  with  EAP (e.g., with RADIUS authentication server) ("WPA-Enter‐
91         prise") Following authentication methods are supported with an  inte‐
92         grate IEEE 802.1X Supplicant:
93
94         · EAP-TLS
95
96         · EAP-PEAP/MSCHAPv2 (both PEAPv0 and PEAPv1)
97
98         · EAP-PEAP/TLS (both PEAPv0 and PEAPv1)
99
100         · EAP-PEAP/GTC (both PEAPv0 and PEAPv1)
101
102         · EAP-PEAP/OTP (both PEAPv0 and PEAPv1)
103
104         · EAP-PEAP/MD5-Challenge (both PEAPv0 and PEAPv1)
105
106         · EAP-TTLS/EAP-MD5-Challenge
107
108         · EAP-TTLS/EAP-GTC
109
110         · EAP-TTLS/EAP-OTP
111
112         · EAP-TTLS/EAP-MSCHAPv2
113
114         · EAP-TTLS/EAP-TLS
115
116         · EAP-TTLS/MSCHAPv2
117
118         · EAP-TTLS/MSCHAP
119
120         · EAP-TTLS/PAP
121
122         · EAP-TTLS/CHAP
123
124         · EAP-SIM
125
126         · EAP-AKA
127
128         · EAP-PSK
129
130         · EAP-PAX
131
132         · LEAP  (note:  requires  special  support  from  the driver for IEEE
133           802.11 authentication)
134
135         · (following methods are supported, but since they  do  not  generate
136           keying  material,  they  cannot be used with WPA or IEEE 802.1X WEP
137           keying)
138
139         · EAP-MD5-Challenge
140
141         · EAP-MSCHAPv2
142
143         · EAP-GTC
144
145         · EAP-OTP
146
147       · key management for CCMP, TKIP, WEP104, WEP40
148
149       · RSN/WPA2 (IEEE 802.11i)
150
151         · pre-authentication
152
153         · PMKSA caching
154

AVAILABLE DRIVERS

156       The available drivers to specify with the -D option are:
157
158       hostap (default) Host AP driver  (Intersil  Prism2/2.5/3).   (this  can
159              also be used with Linuxant DriverLoader).
160
161       hermes Agere Systems Inc. driver (Hermes-I/Hermes-II).
162
163       madwifi
164              MADWIFI 802.11 support (Atheros, etc.).
165
166       atmel  ATMEL AT76C5XXx (USB, PCMCIA).
167
168       wext   Linux wireless extensions (generic).
169
170       ndiswrapper
171              Linux ndiswrapper.
172
173       broadcom
174              Broadcom wl.o driver.
175
176       ipw    Intel ipw2100/2200 driver.
177
178       wired  wpa_supplicant wired Ethernet driver
179
180       bsd    BSD 802.11 support (Atheros, etc.).
181
182       ndis   Windows NDIS driver.
183

COMMAND LINE OPTIONS

185       -B     Run daemon in the background.
186
187       -i ifname
188              Interface to listen on.
189
190       -c filename
191              Path to configuration file.
192
193       -P PID_file
194              Path to PID file.
195
196       -C ctrl_interface
197              Path to ctrl_interface socket (only used if -c is not).
198
199       -g global ctrl_interface
200              Path to global ctrl_interface socket.
201
202       -D driver
203              Driver to use.  See the available options below.
204
205       -d     Increase debugging verbosity (-dd even more).
206
207       -K     Include keys (passwords, etc.) in debug output.
208
209       -t     Include timestamp in debug messages.
210
211       -e     Use  external  IEEE  802.1X Supplicant (e.g., xsupplicant) (this
212              disables the internal Supplicant).
213
214       -h     Help.  Show a usage message.
215
216       -L     Show license (GPL and BSD).
217
218       -q     Decrease debugging verbosity (-qq even less).
219
220       -v     Show version.
221
222       -w     wait for interface to be added, if needed.   normally,  wpa_sup‐
223              plicant will exit if the interface is not there yet.
224
225       -N     Start describing new interface.
226

EXAMPLES

228       In most common cases, wpa_supplicant is started with:
229
230
231              wpa_supplicant -Bw -c/etc/wpa_supplicant.conf -iwlan0
232
233       This  makes  the  process  fork  into background and wait for the wlan0
234       interface if it is not available at startup time.
235
236       The easiest way to debug  problems,  and  to  get  debug  log  for  bug
237       reports,  is  to  start  wpa_supplicant  on  foreground  with debugging
238       enabled:
239
240
241              wpa_supplicant -c/etc/wpa_supplicant.conf -iwlan0 -d
242
243       wpa_supplicant can control multiple interfaces (radios) either by  run‐
244       ning  one  process for each interface separately or by running just one
245       process and list of options at command line. Each  interface  is  sepa‐
246       rated  with  -N  argument. As an example, following command would start
247       wpa_supplicant for two interfaces:
248
249
250              wpa_supplicant \
251                   -c wpa1.conf -i wlan0 -D hostap -N \
252                   -c wpa2.conf -i ath0 -D madwifi
253

OS REQUIREMENTS

255       Current hardware/software requirements:
256
257       · Linux kernel 2.4.x or 2.6.x with Linux  Wireless  Extensions  v15  or
258         newer
259
260       · FreeBSD 6-CURRENT
261
262       · Microsoft  Windows  with WinPcap (at least WinXP, may work with other
263         versions)
264

SUPPORTED DRIVERS

266       Host AP driver for Prism2/2.5/3 (development snapshot/v0.2.x)
267              (http://hostap.epitest.fi/) Driver needs to be  set  in  Managed
268              mode  ('iwconfig wlan0 mode managed').  Please note that station
269              firmware version needs to be 1.7.0 or newer to work in WPA mode.
270
271       Linuxant DriverLoader
272              (http://www.linuxant.com/driverloader/) with Windows NDIS driver
273              for your wlan card supporting WPA.
274
275       Agere Systems Inc. Linux Driver
276              (http://www.agere.com/support/drivers/)  Please  note  that  the
277              driver interface file (driver_hermes.c)  and  hardware  specific
278              include  files  are not included in the wpa_supplicant distribu‐
279              tion. You will need to copy these from the source package of the
280              Agere driver.
281
282       madwifi driver for cards based on Atheros chip set (ar521x)
283              (http://sourceforge.net/projects/madwifi/)  Please note that you
284              will need to modify the wpa_supplicant .config file to  use  the
285              correct  path  for  the madwifi driver root directory (CFLAGS +=
286              -I../madwifi/wpa line in example defconfig).
287
288       ATMEL AT76C5XXx driver for USB and PCMCIA cards
289              (http://atmelwlandriver.sourceforge.net/).
290
291       Linux ndiswrapper
292              (http://ndiswrapper.sourceforge.net/) with Windows NDIS driver.
293
294       Broadcom wl.o driver
295              This is a generic  Linux  driver  for  Broadcom  IEEE  802.11a/g
296              cards.   However,  it is proprietary driver that is not publicly
297              available except for couple of exceptions, mainly Broadcom-based
298              APs/wireless  routers  that  use Linux. The driver binary can be
299              downloaded,     e.g.,     from     Linksys     support      site
300              (http://www.linksys.com/support/gpl.asp) for Linksys WRT54G. The
301              GPL tarball includes cross-compiler and the needed header  file,
302              wlioctl.h, for compiling wpa_supplicant.  This driver support in
303              wpa_supplicant is expected to work also with other devices based
304              on  Broadcom  driver  (assuming  the driver includes client mode
305              support).
306
307        Intel ipw2100 driver
308              (http://sourceforge.net/projects/ipw2100/)
309
310       Intel ipw2200 driver
311              (http://sourceforge.net/projects/ipw2200/)
312
313       Linux wireless extensions
314              In theory, any driver that supports  Linux  wireless  extensions
315              can  be  used  with  IEEE  802.1X  (i.e.,  not  WPA)  when using
316              ap_scan=0 option in configuration file.
317
318       Wired Ethernet drivers
319              Use ap_scan=0.
320
321       BSD net80211 layer (e.g., Atheros driver)
322              At the moment, this is for FreeBSD 6-CURRENT branch.
323
324       Windows NDIS
325              The  current  Windows   port   requires   WinPcap   (http://win
326              pcap.polito.it/).  See README-Windows.txt for more information.
327
328       wpa_supplicant  was  designed  to be portable for different drivers and
329       operating systems. Hopefully, support for more wlan cards and OSes will
330       be  added  in  the future. See developer.txt for more information about
331       the design of wpa_supplicant and porting to  other  drivers.  One  main
332       goal  is  to  add full WPA/WPA2 support to Linux wireless extensions to
333       allow new drivers to be  supported  without  having  to  implement  new
334       driver-specific interface code in wpa_supplicant.
335

ARCHITECTURE

337       The wpa_supplicant system consists of the following components:
338
339       wpa_supplicant.conf
340              the  configuration  file  describing  all networks that the user
341              wants the computer to connect to.
342
343       wpa_supplicant
344              the program that directly interacts with the network interface.
345
346       wpa_cli
347              the client program that provides a high-level interface  to  the
348              functionality of the daemon.
349
350       wpa_passphrase
351              a  utility  needed  to  construct wpa_supplicant.conf files that
352              include encrypted passwords.
353

QUICK START

355       First, make a configuration file, e.g.  /etc/wpa_supplicant.conf,  that
356       describes   the  networks  you  are  interested  in.   See  wpa_suppli‐
357       cant.conf(5) for details.
358
359       Once the configuration is ready, you can test whether the configuration
360       works  by  running wpa_supplicant with following command to start it on
361       foreground with debugging enabled:
362
363
364              wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -d
365
366
367       Assuming everything goes fine, you can start using following command to
368       start wpa_supplicant on background without debugging:
369
370
371              wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -B
372
373
374       Please  note that if you included more than one driver interface in the
375       build time configuration (.config),  you  may  need  to  specify  which
376       interface  to  use  by  including -D<driver name> option on the command
377       line.
378

INTERFACE TO PCMCIA-CS/CARDMRG

380       For example, following small changes to pcmcia-cs scripts can  be  used
381       to enable WPA support:
382
383       Add  MODE="Managed"  and  WPA="y"  to  the  network scheme in /etc/pcm‐
384       cia/wireless.opts.
385
386       Add the following block  to  the  end  of  'start'  action  handler  in
387       /etc/pcmcia/wireless:
388
389
390              if [ "$WPA" = "y" -a -x /usr/local/bin/wpa_supplicant ]; then
391                  /usr/local/bin/wpa_supplicant -Bw -c/etc/wpa_supplicant.conf -i$DEVICE
392              fi
393
394
395       Add  the  following block to the end of 'stop' action handler (may need
396       to be separated from other actions) in /etc/pcmcia/wireless:
397
398
399              if [ "$WPA" = "y" -a -x /usr/local/bin/wpa_supplicant ]; then
400                  killall wpa_supplicant
401              fi
402
403
404       This will make cardmgr start wpa_supplicant when the  card  is  plugged
405       in. wpa_supplicant will wait until the interface is set up--either when
406       a static IP address is configured or when DHCP client  is  started--and
407       will then negotiate keys with the AP.
408

SEE ALSO

410       wpa_background(8) wpa_supplicant.conf(5) wpa_cli(8) wpa_passphrase(8)
411
413       wpa_supplicant   is  copyright  (c)  2003-2005,  Jouni  Malinen  <jkma‐
414       line@cc.hut.fi> and contributors.  All Rights Reserved.
415
416       This program is dual-licensed under both the  GPL  version  2  and  BSD
417       license. Either license may be used at your option.
418
419
420
421                               31 December 2006              WPA_SUPPLICANT(8)
Impressum