source: networking/netprogs/wpa_supplicant.xml@ 48de78d

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 12.2 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gimp3 gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/for-12.3 xry111/intltool xry111/llvm18 xry111/soup3 xry111/spidermonkey128 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 48de78d was 48de78d, checked in by Krejzi <krejzi@…>, 12 years ago

Mark some packages as 7.2 checked. Part 7 - Networking.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@10555 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 13.0 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 "8650f6aa23646ef634402552d0669640">
11 <!ENTITY wpa_supplicant-size "1.9 MB">
12 <!ENTITY wpa_supplicant-buildsize "16 MB">
13 <!ENTITY wpa_supplicant-time "0.1 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 &lfs72_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 <!-- From defconfig: WEXT is deprecated in the current Linux kernel
85 version and no new functionality is added to it. nl80211-based
86 interface is the new replacement for WEXT -->
87 <xref linkend="openssl"/>
88 <!-- For EAP-* Methods -->
89 </para>
90
91 <bridgehead renderas="sect4">Optional</bridgehead>
92 <para role="optional">
93 <xref linkend="dbus"/> and
94 <xref linkend="libxml2"/>
95 <!-- D-Bus and libxml2 are required for D-Bus Interface which
96 NetworkManager uses.
97
98 WPA Supplicant uses internal Linux specific implemenation
99 for L2_PACKET, libpcap or libdnet are only there for portability
100 with other OS'es. See README if you don't believe me. -->
101 </para>
102
103 <!-- TODO: Write instructions for building wpa_gui -->
104
105 <para condition="html" role="usernotes">User Notes:
106 <ulink url="&blfs-wiki;/wpa_supplicant"/>
107 </para>
108 </sect2>
109
110 <sect2 role="kernel" id="wpa_supplicant-kernel">
111 <title>Kernel Configuration</title>
112
113 <para>
114 Enable the following options in the kernel configuration
115 and recompile the kernel if necessary:
116 </para>
117
118<screen><literal>[*] Networking support --->
119 [*] Wireless --->
120 [*] cfg80211 - wireless configuration API
121 [*] cfg80211 wireless extensions compatibility
122 [*] Generic IEEE 802.11 Networking Stack (mac80211)
123
124Device Drivers --->
125 [*] Network device support --->
126 [*] Wireless LAN --->
127</literal></screen>
128
129 <para>
130 Select the options that support your hardware:
131 <command>lspci</command> from <xref linkend="pciutils"/> can be used to
132 view your hardware configuration.
133 </para>
134
135 <indexterm zone="wpa_supplicant wpa_supplicant-kernel">
136 <primary sortas="d-wpa_supplicant">wpa_supplicant</primary>
137 </indexterm>
138 </sect2>
139
140 <sect2 role="installation">
141 <title>Installation of WPA Supplicant</title>
142
143 <para>
144 First you will need to create an initial configuration file for the
145 build process. You can read <filename>wpa_supplicant/README</filename>
146 and <filename>wpa_supplicant/defconfig</filename> for the explanation
147 of the following options as well as other options that can be used.
148 Create a build configuration file that should work for standard WiFi
149 setups by running the following command:
150 </para>
151
152<screen><userinput>cat &gt; wpa_supplicant/.config &lt;&lt; "EOF"
153CONFIG_BACKEND=file
154CONFIG_CTRL_IFACE=y
155CONFIG_DRIVER_NL80211=y
156CONFIG_DRIVER_WEXT=y
157CONFIG_DRIVER_WIRED=y
158CONFIG_EAP_GTC=y
159CONFIG_EAP_LEAP=y
160CONFIG_EAP_MD5=y
161CONFIG_EAP_MSCHAPV2=y
162CONFIG_EAP_OTP=y
163CONFIG_EAP_PEAP=y
164CONFIG_EAP_TLS=y
165CONFIG_EAP_TTLS=y
166CONFIG_IEEE8021X_EAPOL=y
167CONFIG_IPV6=y
168CONFIG_LIBNL32=y
169CONFIG_PEERKEY=y
170CONFIG_PKCS12=y
171CONFIG_READLINE=y
172CONFIG_SMARTCARD=y
173CONFIG_WPS=y
174CFLAGS += -I/usr/include/libnl3
175EOF</userinput></screen>
176
177 <para>
178 If you wish to use <application>WPA Supplicant</application> with
179 <xref linkend="NetworkManager"/>, make sure that you have installed
180 <xref linkend="dbus"/> and <xref linkend="libxml2"/>, then add
181 following options to the <application>WPA Supplicant</application>
182 build configuration file by running the following command:
183 </para>
184
185<screen><userinput>cat &gt;&gt; wpa_supplicant/.config &lt;&lt; "EOF"
186CONFIG_CTRL_IFACE_DBUS=y
187CONFIG_CTRL_IFACE_DBUS_NEW=y
188CONFIG_CTRL_IFACE_DBUS_INTRO=y
189EOF</userinput></screen>
190
191 <para>
192 Install <application>WPA Supplicant</application> by running the
193 following commands:
194 </para>
195
196<screen><userinput>cd wpa_supplicant &amp;&amp;
197make BINDIR=/sbin LIBDIR=/lib</userinput></screen>
198
199 <para>
200 This package does not come with a test suite.
201 </para>
202
203 <para>
204 Now, as the <systemitem class="username">root</systemitem>
205 user:
206 </para>
207
208<screen role="root"><userinput>install -v -m755 wpa_{cli,passphrase,supplicant} /sbin &amp;&amp;
209install -v -m644 doc/docbook/wpa_supplicant.conf.5 /usr/share/man/man5 &amp;&amp;
210install -v -m644 doc/docbook/wpa_{cli,passphrase,supplicant}.8 /usr/share/man/man8</userinput></screen>
211
212 <para>
213 If you have built <application>WPA Supplicant</application> with
214 <application>D-Bus</application> support, you will need to install
215 <application>D-Bus</application> configuration files. Install them
216 by running the following commands as the
217 <systemitem class="username">root</systemitem> user:
218 </para>
219
220<screen role="root"><userinput>install -v -m644 dbus/fi.{epitest.hostap.WPASupplicant,w1.wpa_supplicant1}.service \
221 /usr/share/dbus-1/system-services &amp;&amp;
222install -v -m644 dbus/dbus-wpa_supplicant.conf /etc/dbus-1/system.d/wpa_supplicant.conf</userinput></screen>
223
224 <note>
225 <para>
226 You will need to restart system <application>D-Bus</application> daemon
227 before you can use <application>WPA Supplicant</application>
228 <application>D-Bus</application> interface.
229 </para>
230 </note>
231
232 </sect2>
233
234 <sect2 role="configuration">
235 <title>Configuring wpa_supplicant</title>
236
237 <sect3 id="wpa_supplicant-config">
238 <title>Config File</title>
239 <para><filename>/etc/wpa_supplicant.conf</filename></para>
240
241 <indexterm zone="wpa_supplicant wpa_supplicant-config">
242 <primary
243 sortas="e-etc-wpa_supplicant.conf">/etc/wpa_supplicant.conf</primary>
244 </indexterm>
245 </sect3>
246
247 <sect3>
248 <title>Configuration Information</title>
249
250 <para>
251 To connect to an access point that uses a password you need to put
252 the pre-shared key in <filename>/etc/wpa_supplicant.conf</filename>. Use
253 <command>wpa_passphrase</command> to generate this. SSID is the string
254 that the access point/router transmits to identify itself. As the
255 <systemitem class="username">root</systemitem> user:
256 </para>
257
258<screen role="root"><userinput>wpa_passphrase <replaceable>SSID</replaceable> <replaceable>SECRET_PASSWORD</replaceable> &gt; /etc/wpa_supplicant.conf</userinput></screen>
259
260 <para>
261 <filename>/etc/wpa_supplicant.conf</filename> can hold the details of
262 several access points. When you run <command>wpa_supplicant</command>
263 it will scan for the SSIDs it can see and choose the appropriate
264 password to connect.
265 </para>
266
267 <para>
268 If you want to connect to an access point that isn't password
269 protected, put an entry like this in
270 <filename>/etc/wpa_supplicant.conf</filename>. Replace
271 "Some-SSID" with the SSID of the access point/router.
272 </para>
273
274<screen>network={
275 ssid="<replaceable>Some-SSID</replaceable>"
276 key_mgmt=NONE
277}</screen>
278
279 <para>
280 There are many options that you could use to tweak how you connect
281 to each access point. They are described in some detail in the
282 <filename>wpa_supplicant/wpa_supplicant.conf</filename> file in the
283 source tree.
284 </para>
285
286 <para>
287 To use <command>wpa_cli</command> to control the running
288 <command>>wpa_supplicant</command> daemon, add a control interface to
289 <filename>/etc/wpa_supplicant.conf</filename> as the
290 <systemitem class="username">root</systemitem> user:
291 </para>
292
293<screen role="root"><userinput>echo ctrl_interface=/run/wpa_supplicant &gt;&gt; /etc/wpa_supplicant.conf</userinput></screen>
294 </sect3>
295
296 <sect3>
297 <title>Connecting to an Access Point</title>
298
299 <para>
300 If your router/access point uses DHCP to allocate IP addresses you
301 can install <xref linkend="dhcpcd"/> and use it to connect. As the
302 <systemitem class="username">root</systemitem> user:
303 </para>
304
305<screen role="root"><userinput>wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0 -Dnl80211,wext
306sleep 2 # let it settle
307dhcpcd</userinput></screen>
308
309 <para>
310 Alternatively, you can use static addresses on your local network.
311 This has the advantage that you can put the hostnames in
312 <filename>/etc/hosts</filename>. Replace 192.168.1.6 with the static
313 address you've chosen. Replace 192.168.1.1 with the local IP address of
314 the access point/router. Run the following commands as the
315 <systemitem class="username">root</systemitem> user:
316 </para>
317
318<screen role="root"><userinput>ip addr add 192.168.1.6 dev wlan0
319ip link set wlan0 up
320wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0 -Dnl80211,wext
321ip route add 192.168.1.1 dev wlan0
322ip route add default via 192.168.1.1 dev wlan0</userinput></screen>
323
324 </sect3>
325 </sect2>
326
327 <sect2 role="content">
328 <title>Contents</title>
329
330 <segmentedlist>
331 <segtitle>Installed Programs</segtitle>
332 <segtitle>Installed Libraries</segtitle>
333 <segtitle>Installed Directories</segtitle>
334
335 <seglistitem>
336 <seg>wpa_supplicant, wpa_passphrase and wpa_cli</seg>
337 <seg>none</seg>
338 <seg>none</seg>
339 </seglistitem>
340 </segmentedlist>
341
342 <variablelist>
343 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
344 <?dbfo list-presentation="list"?>
345 <?dbhtml list-presentation="table"?>
346
347 <varlistentry id="wpa_supplicant-prog">
348 <term><command>wpa_supplicant</command></term>
349 <listitem>
350 <para>
351 is a daemon that can connect to a password protected wireless
352 access point.
353 </para>
354 <indexterm zone="wpa_supplicant wpa_supplicant-prog">
355 <primary sortas="b-wpa_supplicant">wpa_supplicant</primary>
356 </indexterm>
357 </listitem>
358 </varlistentry>
359
360 <varlistentry id="wpa_passphrase">
361 <term><command>wpa_passphrase</command></term>
362 <listitem>
363 <para>
364 takes an SSID and a password and generates a simple
365 configuration that <command>wpa_supplicant</command> can
366 understand.
367 </para>
368 <indexterm zone="wpa_supplicant wpa_passphrase">
369 <primary sortas="b-wpa_passphrase">wpa_passphrase</primary>
370 </indexterm>
371 </listitem>
372 </varlistentry>
373
374 <varlistentry id="wpa_cli">
375 <term><command>wpa_cli</command></term>
376 <listitem>
377 <para>
378 is a command line interface used to control a running
379 <command>wpa_supplicant</command> daemon.
380 </para>
381 <indexterm zone="wpa_supplicant wpa_cli">
382 <primary sortas="b-wpa_cli">wpa_cli</primary>
383 </indexterm>
384 </listitem>
385 </varlistentry>
386
387 </variablelist>
388
389 </sect2>
390
391</sect1>
Note: See TracBrowser for help on using the repository browser.