source: networking/netprogs/wpa_supplicant.xml@ 5bc57bb

gnome
Last change on this file since 5bc57bb was 5bc57bb, checked in by Christopher Gregory <cjg@…>, 10 years ago

Converted ntp rpcbind rsync samba wpa_supplicant avahi networkmanager and wicd pages to systemd

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/gnome@13414 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 20.8 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY wpa_supplicant-download-http
8 "http://hostap.epitest.fi/releases/wpa_supplicant-&wpa_supplicant-version;.tar.gz">
9 <!ENTITY wpa_supplicant-download-ftp " ">
10 <!ENTITY wpa_supplicant-md5sum "238e8e888bbd558e1a57e3eb28d1dd07">
11 <!ENTITY wpa_supplicant-size "2.3 MB">
12 <!ENTITY wpa_supplicant-buildsize "26 MB">
13 <!ENTITY wpa_supplicant-time "0.2 SBU">
14]>
15
16<sect1 id="wpa_supplicant" xreflabel="wpa_supplicant-&wpa_supplicant-version;">
17 <?dbhtml filename="wpa_supplicant.html"?>
18
19 <sect1info>
20 <othername>$LastChangedBy$</othername>
21 <date>$Date$</date>
22 </sect1info>
23
24 <title>wpa_supplicant-&wpa_supplicant-version;</title>
25
26 <indexterm zone="wpa_supplicant">
27 <primary sortas="a-wpa_supplicant">wpa_supplicant</primary>
28 </indexterm>
29
30 <sect2 role="package">
31 <title>Introduction to WPA Supplicant</title>
32
33 <para>
34 <application>WPA Supplicant</application> is a Wi-Fi Protected Access
35 (WPA) client and IEEE 802.1X supplicant. It implements WPA key negotiation
36 with a WPA Authenticator and Extensible Authentication Protocol (EAP)
37 authentication with an Authentication Server. In addition, it controls the
38 roaming and IEEE 802.11 authentication/association of the wireless LAN
39 driver. This is useful for connecting to a password protected wireless
40 access point.
41 </para>
42
43 &lfs75_checked;
44
45 <bridgehead renderas="sect3">Package Information</bridgehead>
46 <itemizedlist spacing="compact">
47 <listitem>
48 <para>
49 Download (HTTP): <ulink url="&wpa_supplicant-download-http;"/>
50 </para>
51 </listitem>
52 <listitem>
53 <para>
54 Download (FTP): <ulink url="&wpa_supplicant-download-ftp;"/>
55 </para>
56 </listitem>
57 <listitem>
58 <para>
59 Download MD5 sum: &wpa_supplicant-md5sum;
60 </para>
61 </listitem>
62 <listitem>
63 <para>
64 Download size: &wpa_supplicant-size;
65 </para>
66 </listitem>
67 <listitem>
68 <para>
69 Estimated disk space required: &wpa_supplicant-buildsize;
70 </para>
71 </listitem>
72 <listitem>
73 <para>
74 Estimated build time: &wpa_supplicant-time;
75 </para>
76 </listitem>
77 </itemizedlist>
78
79 <bridgehead renderas="sect3">WPA Supplicant Dependencies</bridgehead>
80
81 <bridgehead renderas="sect4">Recommended</bridgehead>
82 <para role="recommended">
83 <xref linkend="libnl"/> and
84 <xref linkend="openssl"/>
85 </para>
86
87 <bridgehead renderas="sect4">Optional</bridgehead>
88 <para role="optional">
89 <xref linkend="dbus"/>,
90 <xref linkend="libxml2"/>, and
91 <xref linkend="qt4"/>
92 </para>
93
94 <para condition="html" role="usernotes">User Notes:
95 <ulink url="&blfs-wiki;/wpa_supplicant"/>
96 </para>
97
98 </sect2>
99
100 <sect2 role="kernel" id="wpa_supplicant-kernel">
101 <title>Kernel Configuration</title>
102
103 <para>
104 Enable the following options in the kernel configuration as well as
105 specific device drivers for your hardware and recompile the kernel if
106 necessary:
107 </para>
108
109<screen><literal>Networking support --->
110 Wireless --->
111 cfg80211 - wireless configuration API: Y or M
112 cfg80211 wireless extensions compatibility: Y
113 Generic IEEE 802.11 Networking Stack (mac80211): Y or M
114Device Drivers --->
115 Network device support --->
116 Wireless LAN ---></literal></screen>
117
118 <para>
119 Select the options that support your hardware:
120 <command>lspci</command> from <xref linkend="pciutils"/> can be used to
121 view your hardware configuration.
122 </para>
123
124 <indexterm zone="wpa_supplicant wpa_supplicant-kernel">
125 <primary sortas="d-wpa_supplicant">wpa_supplicant</primary>
126 </indexterm>
127 </sect2>
128
129 <sect2 role="installation">
130 <title>Installation of WPA Supplicant</title>
131
132 <para>
133 First you will need to create an initial configuration file for the
134 build process. You can read <filename>wpa_supplicant/README</filename>
135 and <filename>wpa_supplicant/defconfig</filename> for the explanation
136 of the following options as well as other options that can be used.
137 Create a build configuration file that should work for standard WiFi
138 setups by running the following command:
139 </para>
140
141<screen><userinput>cat &gt; wpa_supplicant/.config &lt;&lt; "EOF"
142<literal>CONFIG_BACKEND=file
143CONFIG_CTRL_IFACE=y
144CONFIG_DEBUG_FILE=y
145CONFIG_DEBUG_SYSLOG=y
146CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON
147CONFIG_DRIVER_NL80211=y
148CONFIG_DRIVER_WEXT=y
149CONFIG_DRIVER_WIRED=y
150CONFIG_EAP_GTC=y
151CONFIG_EAP_LEAP=y
152CONFIG_EAP_MD5=y
153CONFIG_EAP_MSCHAPV2=y
154CONFIG_EAP_OTP=y
155CONFIG_EAP_PEAP=y
156CONFIG_EAP_TLS=y
157CONFIG_EAP_TTLS=y
158CONFIG_IEEE8021X_EAPOL=y
159CONFIG_IPV6=y
160CONFIG_LIBNL32=y
161CONFIG_PEERKEY=y
162CONFIG_PKCS12=y
163CONFIG_READLINE=y
164CONFIG_SMARTCARD=y
165CONFIG_WPS=y
166CFLAGS += -I/usr/include/libnl3</literal>
167EOF</userinput></screen>
168
169 <para>
170 If you wish to use <application>WPA Supplicant</application> with
171 <xref linkend="NetworkManager"/>, make sure that you have installed
172 <xref linkend="dbus"/> and <xref linkend="libxml2"/>, then add the
173 following options to the <application>WPA Supplicant</application>
174 build configuration file by running the following command:
175 </para>
176
177<screen><userinput>cat &gt;&gt; wpa_supplicant/.config &lt;&lt; "EOF"
178<literal>CONFIG_CTRL_IFACE_DBUS=y
179CONFIG_CTRL_IFACE_DBUS_NEW=y
180CONFIG_CTRL_IFACE_DBUS_INTRO=y</literal>
181EOF</userinput></screen>
182
183 <para>
184 Install <application>WPA Supplicant</application> by running the
185 following commands:
186 </para>
187
188<screen><userinput>cd wpa_supplicant &amp;&amp;
189make BINDIR=/sbin LIBDIR=/lib</userinput></screen>
190
191 <para>
192 If you have installed <xref linkend="qt4"/> and wish to build
193 the <application>WPA Supplicant</application> GUI program, run
194 the following commands:
195 </para>
196
197<screen><userinput>pushd wpa_gui-qt4 &amp;&amp;
198qmake wpa_gui.pro &amp;&amp;
199make &amp;&amp;
200popd</userinput></screen>
201
202 <para>
203 This package does not come with a test suite.
204 </para>
205
206 <para>
207 Now, as the <systemitem class="username">root</systemitem> user:
208 </para>
209
210<screen role="root"><userinput>install -v -m755 wpa_{cli,passphrase,supplicant} /sbin/ &amp;&amp;
211install -v -m644 doc/docbook/wpa_supplicant.conf.5 /usr/share/man/man5/ &amp;&amp;
212install -v -m644 doc/docbook/wpa_{cli,passphrase,supplicant}.8 /usr/share/man/man8/</userinput></screen>
213
214 <para>
215 If you have built <application>WPA Supplicant</application> with
216 <application>D-Bus</application> support, you will need to install
217 <application>D-Bus</application> configuration files. Install them
218 by running the following commands as the
219 <systemitem class="username">root</systemitem> user:
220 </para>
221
222<screen role="root"><userinput>install -v -m644 dbus/fi.{epitest.hostap.WPASupplicant,w1.wpa_supplicant1}.service \
223 /usr/share/dbus-1/system-services/ &amp;&amp;
224install -v -m644 dbus/dbus-wpa_supplicant.conf \
225 /etc/dbus-1/system.d/wpa_supplicant.conf</userinput></screen>
226
227 <para>
228 If you have built the <application>WPA Supplicant</application> GUI
229 program, install it by running the following commands as the
230 <systemitem class="username">root</systemitem> user:
231 </para>
232
233<screen role="root"><userinput>install -v -m755 wpa_gui-qt4/wpa_gui /usr/bin/ &amp;&amp;
234install -v -m644 doc/docbook/wpa_gui.8 /usr/share/man/man8/ &amp;&amp;
235install -v -m644 wpa_gui-qt4/wpa_gui.desktop /usr/share/applications/ &amp;&amp;
236install -v -m644 wpa_gui-qt4/icons/wpa_gui.svg /usr/share/pixmaps/</userinput></screen>
237
238 <note>
239 <para>
240 You will need to restart the system <application>D-Bus</application> daemon
241 before you can use the <application>WPA Supplicant</application>
242 <application>D-Bus</application> interface.
243 </para>
244 </note>
245
246 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
247 href="../../xincludes/update-desktop-database.xml"/>
248
249 </sect2>
250
251 <sect2 role="configuration">
252 <title>Configuring wpa_supplicant</title>
253
254 <sect3 id="wpa_supplicant-config">
255 <title>Config File</title>
256
257 <para>
258 <filename>/etc/sysconfig/wpa_supplicant-*.conf</filename>
259 </para>
260
261 <indexterm zone="wpa_supplicant wpa_supplicant-config">
262 <primary
263 sortas="e-etc-sysconfig-wpa_supplicant-star.conf">/etc/sysconfig/wpa_supplicant-*.conf</primary>
264 </indexterm>
265
266 </sect3>
267
268 <sect3>
269 <title>Configuration Information</title>
270
271 <para>
272 To connect to an access point that uses a password, you need to put
273 the pre-shared key in <filename>
274 /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename>.
275 SSID is the string that the access point/router transmits to
276 identify itself. Run the following command as the
277 <systemitem class="username">root</systemitem> user:
278 </para>
279
280<screen role="root"><userinput>wpa_passphrase <replaceable>SSID</replaceable> <replaceable>SECRET_PASSWORD</replaceable> &gt; /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</userinput></screen>
281
282 <para>
283 <filename>/etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf
284 </filename> can hold the details of several access points. When
285 <command>wpa_supplicant</command> is started, it will scan for the
286 SSIDs it can see and choose the appropriate password to connect.
287 </para>
288
289 <para>
290 If you want to connect to an access point that isn't password
291 protected, put an entry like this in <filename>
292 /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename>.
293 Replace "Some-SSID" with the SSID of the access point/router.
294 </para>
295
296<screen>network={
297 ssid="<replaceable>Some-SSID</replaceable>"
298 key_mgmt=NONE
299}</screen>
300
301 <para>
302 There are many options that you could use to tweak how you connect
303 to each access point. They are described in some detail in the
304 <filename>wpa_supplicant/wpa_supplicant.conf</filename> file in the
305 source tree.
306 </para>
307
308 </sect3>
309
310 <sect3>
311 <title>Connecting to an Access Point</title>
312
313 <para id="wpa-service">
314 This package provides systemd units in the source tarball.
315 To install them, issue the following commands as the
316 <systemitem class="username">root</systemitem> user:
317 </para>
318
319<screen role="root">
320<userinput>
321install -v -m644 systemd/*.service /lib/systemd/system
322</userinput></screen>
323
324 <para>
325 The following files were installed:
326
327 /lib/systemd/system/wpa_supplicant.service
328
329 /lib/systemd/system/wpa_supplicant-nl80211@.service
330 /lib/systemd/system/wpa_supplicant-wired@.service
331 /lib/systemd/system/wpa_supplicant@.service
332
333 The first service should be enabled if D-Bus interface was built into
334 wpa_supplicant, so that wpa_supplicant D-Bus interface can be started at boot
335 instead of being automatically activated by the D-Bus daemon which doesn't work
336 when using systemd.
337 To enable the service issue the following command as the
338 <systemitem class="username">root</systemitem> user:
339 </para>
340
341<screen role="root">
342<userinput>
343systemctl enable wpa_supplicant.service
344</userinput></screen>
345
346 <para>
347 The following three files are per-interface specific files.
348 Much like LFS ifupdown@.service, they will start wpa_supplicant for a network
349 interface. Only difference between the three files is the wpa_supplicant_driver
350 being used.
351
352 The first one uses -Dnl80211, the second one uses -Dwired and the last one uses
353 default -D option (not specified).
354 </para>
355
356
357 <indexterm zone="wpa_supplicant wpa-service">
358 <primary sortas="f-wpa">wpa</primary>
359 </indexterm>
360
361 <para>
362 If your router/access point uses DHCP to allocate IP addresses, you
363 can install <xref linkend="dhcp"/> client and use it to
364 automatically obtain network addresses. If your using the first unit file
365 Create the
366 <filename>/etc/wpa_supplicant/wpa_supplicant-nl80211-<replaceable>wifi0</replaceable>.conf
367 </filename> by running the following command as the
368 <systemitem class="username">root</systemitem> user:
369 </para>
370
371 <note>
372 <para>
373 wifi0 needs to be replaced with the actual interface.
374 </para>
375 </note>
376
377<screen role="root"><userinput>cat &gt; /etc/wpa_supplicant/wpa_supplicant-nl80211-<replaceable>wifi0</replaceable>.conf &lt;&lt; "EOF"
378<literal>ONBOOT="yes"
379IFACE="<replaceable>wlan0</replaceable>"
380SERVICE="wpa"
381
382# Additional arguments to wpa_supplicant
383WPA_ARGS=""
384
385WPA_SERVICE="dhclient"
386DHCP_START=""
387DHCP_STOP=""
388
389# Set PRINTIP="yes" to have the script print
390# the DHCP assigned IP address
391PRINTIP="no"
392
393# Set PRINTALL="yes" to print the DHCP assigned values for
394# IP, SM, DG, and 1st NS. This requires PRINTIP="yes".
395PRINTALL="no"</literal>
396EOF</userinput></screen>
397
398 <note>
399 <para>
400 Note that the argument after @ and the interface name,
401 ie wifi0 must be the same.
402 </para>
403 </note>
404
405 <para>
406 To enable it, issue the following command as the
407 <systemitem class="username">root</systemitem> user:
408 </para>
409<screen role="root"><userinput>
410systemctl enable wpa_supplicant-nl80211@wifi0
411</userinput></screen>
412
413 <para>
414 If your using the second unit file
415 Create the
416 <filename>/etc/wpa_supplicant/wpa_supplicant-wired-<replaceable>eth0</replaceable>.conf
417 </filename> by running the following command as the
418 <systemitem class="username">root</systemitem> user:
419 </para>
420
421<screen role="root"><userinput>cat &gt; /etc/wpa_supplicant/wpa_supplicant-wired-<replaceable>eth0</replaceable>.conf &lt;&lt; "EOF"
422<literal>ONBOOT="yes"
423IFACE="<replaceable>eth0</replaceable>"
424SERVICE="wpa"
425
426# Additional arguments to wpa_supplicant
427WPA_ARGS=""
428
429WPA_SERVICE="dhclient"
430DHCP_START=""
431DHCP_STOP=""
432
433# Set PRINTIP="yes" to have the script print
434# the DHCP assigned IP address
435PRINTIP="no"
436
437# Set PRINTALL="yes" to print the DHCP assigned values for
438# IP, SM, DG, and 1st NS. This requires PRINTIP="yes".
439PRINTALL="no"</literal>
440EOF</userinput></screen>
441
442 <note>
443 <para>
444 Note that the argument after @ and the interface name,
445 ie eth0 must be the same.
446 </para>
447 </note>
448
449 <para>
450 To enable it, issue the following command as the
451 <systemitem class="username">root</systemitem> user:
452 </para>
453
454<screen role="root"><userinput>
455systemctl enable wpa_supplicant-wired@eth0
456</userinput></screen>
457
458 <para>
459 If your using the third unit file
460 Create the
461 <filename>/etc/wpa_supplicant/wpa_supplicant-<replaceable>eth0</replaceable>.conf
462 </filename> by running the following command as the
463 <systemitem class="username">root</systemitem> user:
464 </para>
465
466<screen role="root"><userinput>cat &gt; /etc/wpa_supplicant/wpa_supplicant-<replaceable>eth0</replaceable>.conf &lt;&lt; "EOF"
467<literal>ONBOOT="yes"
468IFACE="<replaceable>eth0</replaceable>"
469SERVICE="wpa"
470
471# Additional arguments to wpa_supplicant
472WPA_ARGS=""
473
474WPA_SERVICE="dhclient"
475DHCP_START=""
476DHCP_STOP=""
477
478# Set PRINTIP="yes" to have the script print
479# the DHCP assigned IP address
480PRINTIP="no"
481
482# Set PRINTALL="yes" to print the DHCP assigned values for
483# IP, SM, DG, and 1st NS. This requires PRINTIP="yes".
484PRINTALL="no"</literal>
485EOF</userinput></screen>
486
487 <note>
488 <para>
489 Note that the argument after @ and the interface name,
490 ie eth0 must be the same.
491 </para>
492 </note>
493
494 <para>
495 To enable it, issue the following command as the
496 <systemitem class="username">root</systemitem> user:
497 </para>
498
499<screen role="root"><userinput>
500systemctl enable wpa_supplicant-@eth0
501</userinput></screen>
502
503 <para>
504 If you prefer <xref linkend="dhcpcd"/> instead of
505 <xref linkend="dhcp"/> client, then create the
506 <filename>/etc/wpa_supplicant/wpa_supplicant-nl80211-<replaceable>wifi0</replaceable>.conf
507 </filename> by running the following command as the
508 <systemitem class="username">root</systemitem> user:
509 </para>
510
511<screen role="root"><userinput>cat &gt; /etc/wpa_supplicant/wpa_supplicant-nl80211-<replaceable>wifi0</replaceable>.conf &lt;&lt; "EOF"
512<literal>ONBOOT="yes"
513IFACE="<replaceable>wifi0</replaceable>"
514SERVICE="wpa"
515
516# Additional arguments to wpa_supplicant
517WPA_ARGS=""
518
519WPA_SERVICE="dhcpcd"
520DHCP_START="-b -q <replaceable>&lt;insert appropriate start options here&gt;</replaceable>"
521DHCP_STOP="-k <replaceable>&lt;insert additional stop options here&gt;</replaceable>"</literal>
522EOF</userinput></screen>
523
524 <para>
525 Alternatively, if you use static addresses on your local network,
526 then create the
527 <filename>/etc/wpa_supplicant/wpa_supplicant-nl80211-<replaceable>wifi0</replaceable>.conf
528 </filename> by running the following command as the
529 <systemitem class="username">root</systemitem> user:
530 </para>
531
532<screen role="root"><userinput>cat &gt; /etc/wpa_supplicant/wpa_supplicant-nl80211-<replaceable>wifi0</replaceable>.conf &lt;&lt; "EOF"
533<literal>ONBOOT="yes"
534IFACE="<replaceable>wifi0</replaceable>"
535SERVICE="wpa"
536
537# Additional arguments to wpa_supplicant
538WPA_ARGS=""
539
540WPA_SERVICE="ipv4-static"
541IP="192.168.1.1"
542GATEWAY="192.168.1.2"
543PREFIX="24"
544BROADCAST="192.168.1.255"</literal>
545EOF</userinput></screen>
546
547 <para>
548 You can connect to the wireless access point by
549 running the following command as the
550 <systemitem class="username">root</systemitem> user:
551 </para>
552
553<screen role="root"><userinput>ifup <replaceable>wifi0</replaceable></userinput></screen>
554
555 <para>
556 Replace <replaceable>wlan0</replaceable> with the correct
557 wireless interface and <replaceable>wifi0</replaceable>
558 with desired name for the configuration file. Please note
559 that <filename>wpa_supplicant-*.conf</filename> and
560 <filename>ifconfig.*</filename> configuration files need
561 to have identical names, ie both contain
562 <replaceable>wifi0</replaceable> in their name.
563 </para>
564
565 </sect3>
566
567 </sect2>
568
569 <sect2 role="content">
570 <title>Contents</title>
571
572 <segmentedlist>
573 <segtitle>Installed Programs</segtitle>
574 <segtitle>Installed Libraries</segtitle>
575 <segtitle>Installed Directories</segtitle>
576
577 <seglistitem>
578 <seg>
579 wpa_gui, wpa_supplicant, wpa_passphrase and wpa_cli
580 </seg>
581 <seg>
582 None
583 </seg>
584 <seg>
585 None
586 </seg>
587 </seglistitem>
588 </segmentedlist>
589
590 <variablelist>
591 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
592 <?dbfo list-presentation="list"?>
593 <?dbhtml list-presentation="table"?>
594
595 <varlistentry id="wpa_gui">
596 <term><command>wpa_gui</command></term>
597 <listitem>
598 <para>
599 is a graphical frontend program for interacting with
600 <application>wpa_supplicant</application>.
601 </para>
602 <indexterm zone="wpa_supplicant wpa_gui">
603 <primary sortas="b-wpa_gui">wpa_gui</primary>
604 </indexterm>
605 </listitem>
606 </varlistentry>
607
608 <varlistentry id="wpa_supplicant-prog">
609 <term><command>wpa_supplicant</command></term>
610 <listitem>
611 <para>
612 is a daemon that can connect to a password protected wireless
613 access point.
614 </para>
615 <indexterm zone="wpa_supplicant wpa_supplicant-prog">
616 <primary sortas="b-wpa_supplicant">wpa_supplicant</primary>
617 </indexterm>
618 </listitem>
619 </varlistentry>
620
621 <varlistentry id="wpa_passphrase">
622 <term><command>wpa_passphrase</command></term>
623 <listitem>
624 <para>
625 takes an SSID and a password and generates a simple
626 configuration that <command>wpa_supplicant</command> can
627 understand.
628 </para>
629 <indexterm zone="wpa_supplicant wpa_passphrase">
630 <primary sortas="b-wpa_passphrase">wpa_passphrase</primary>
631 </indexterm>
632 </listitem>
633 </varlistentry>
634
635 <varlistentry id="wpa_cli">
636 <term><command>wpa_cli</command></term>
637 <listitem>
638 <para>
639 is a command line interface used to control a running
640 <command>wpa_supplicant</command> daemon.
641 </para>
642 <indexterm zone="wpa_supplicant wpa_cli">
643 <primary sortas="b-wpa_cli">wpa_cli</primary>
644 </indexterm>
645 </listitem>
646 </varlistentry>
647
648 </variablelist>
649
650 </sect2>
651
652</sect1>
Note: See TracBrowser for help on using the repository browser.