[ab4fdfc] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[a130a69] | 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
|
---|
[8dfc5c3] | 8 | "https://w1.fi/releases/wpa_supplicant-&wpa_supplicant-version;.tar.gz">
|
---|
[4c869cdd] | 9 | <!ENTITY wpa_supplicant-download-ftp " ">
|
---|
[44d17c7] | 10 | <!ENTITY wpa_supplicant-md5sum "72a4a00eddb7a499a58113c3361ab094">
|
---|
| 11 | <!ENTITY wpa_supplicant-size "3.7 MB">
|
---|
| 12 | <!ENTITY wpa_supplicant-buildsize "35 MB">
|
---|
[0bb63a3] | 13 | <!ENTITY wpa_supplicant-time "0.3 SBU">
|
---|
[a130a69] | 14 | ]>
|
---|
| 15 |
|
---|
| 16 | <sect1 id="wpa_supplicant" xreflabel="wpa_supplicant-&wpa_supplicant-version;">
|
---|
| 17 | <?dbhtml filename="wpa_supplicant.html"?>
|
---|
| 18 |
|
---|
| 19 |
|
---|
| 20 | <title>wpa_supplicant-&wpa_supplicant-version;</title>
|
---|
| 21 |
|
---|
| 22 | <indexterm zone="wpa_supplicant">
|
---|
| 23 | <primary sortas="a-wpa_supplicant">wpa_supplicant</primary>
|
---|
| 24 | </indexterm>
|
---|
| 25 |
|
---|
| 26 | <sect2 role="package">
|
---|
[4c869cdd] | 27 | <title>Introduction to WPA Supplicant</title>
|
---|
| 28 |
|
---|
| 29 | <para>
|
---|
| 30 | <application>WPA Supplicant</application> is a Wi-Fi Protected Access
|
---|
| 31 | (WPA) client and IEEE 802.1X supplicant. It implements WPA key negotiation
|
---|
| 32 | with a WPA Authenticator and Extensible Authentication Protocol (EAP)
|
---|
| 33 | authentication with an Authentication Server. In addition, it controls the
|
---|
| 34 | roaming and IEEE 802.11 authentication/association of the wireless LAN
|
---|
| 35 | driver. This is useful for connecting to a password protected wireless
|
---|
| 36 | access point.
|
---|
| 37 | </para>
|
---|
[a130a69] | 38 |
|
---|
[9c48a24b] | 39 | &lfs122_checked;
|
---|
[5603a81] | 40 |
|
---|
[a130a69] | 41 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 42 | <itemizedlist spacing="compact">
|
---|
| 43 | <listitem>
|
---|
[4c869cdd] | 44 | <para>
|
---|
| 45 | Download (HTTP): <ulink url="&wpa_supplicant-download-http;"/>
|
---|
| 46 | </para>
|
---|
[a130a69] | 47 | </listitem>
|
---|
| 48 | <listitem>
|
---|
[4c869cdd] | 49 | <para>
|
---|
| 50 | Download (FTP): <ulink url="&wpa_supplicant-download-ftp;"/>
|
---|
| 51 | </para>
|
---|
[a130a69] | 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
[4c869cdd] | 54 | <para>
|
---|
| 55 | Download MD5 sum: &wpa_supplicant-md5sum;
|
---|
| 56 | </para>
|
---|
[a130a69] | 57 | </listitem>
|
---|
| 58 | <listitem>
|
---|
[4c869cdd] | 59 | <para>
|
---|
| 60 | Download size: &wpa_supplicant-size;
|
---|
| 61 | </para>
|
---|
[a130a69] | 62 | </listitem>
|
---|
| 63 | <listitem>
|
---|
[4c869cdd] | 64 | <para>
|
---|
| 65 | Estimated disk space required: &wpa_supplicant-buildsize;
|
---|
| 66 | </para>
|
---|
[a130a69] | 67 | </listitem>
|
---|
| 68 | <listitem>
|
---|
[4c869cdd] | 69 | <para>
|
---|
| 70 | Estimated build time: &wpa_supplicant-time;
|
---|
| 71 | </para>
|
---|
[a130a69] | 72 | </listitem>
|
---|
| 73 | </itemizedlist>
|
---|
[44d17c7] | 74 | <!--
|
---|
[a0209f04] | 75 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 76 | <itemizedlist spacing="compact">
|
---|
| 77 | <listitem>
|
---|
| 78 | <para>
|
---|
| 79 | Required patch:
|
---|
| 80 | <ulink url="&patch-root;/wpa_supplicant-&wpa_supplicant-version;-security_fix-1.patch"/>
|
---|
| 81 | </para>
|
---|
| 82 | </listitem>
|
---|
| 83 | </itemizedlist>
|
---|
[44d17c7] | 84 | -->
|
---|
[4c869cdd] | 85 | <bridgehead renderas="sect3">WPA Supplicant Dependencies</bridgehead>
|
---|
| 86 |
|
---|
[ca66edf] | 87 | <bridgehead renderas="sect4">Required (Runtime)</bridgehead>
|
---|
| 88 | <para role="nodump">
|
---|
| 89 | <xref linkend="wireless-kernel"/>
|
---|
| 90 | </para>
|
---|
| 91 |
|
---|
[4c869cdd] | 92 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 93 | <para role="recommended">
|
---|
[4584c7b] | 94 | <xref linkend="desktop-file-utils"/> (for running
|
---|
| 95 | <command>update-desktop-database</command>) and
|
---|
| 96 | <xref linkend="libnl"/>
|
---|
[4c869cdd] | 97 | </para>
|
---|
[a130a69] | 98 |
|
---|
| 99 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[26c1bdd] | 100 | <para role="optional">
|
---|
[0e16b36] | 101 | <phrase revision="sysv"><xref linkend="dbus"/> and</phrase>
|
---|
| 102 | <xref linkend="libxml2"/>
|
---|
[26c1bdd] | 103 | </para>
|
---|
[a130a69] | 104 |
|
---|
[8fa167c] | 105 |
|
---|
[a130a69] | 106 | </sect2>
|
---|
| 107 |
|
---|
| 108 | <sect2 role="kernel" id="wpa_supplicant-kernel">
|
---|
| 109 | <title>Kernel Configuration</title>
|
---|
| 110 |
|
---|
[4c869cdd] | 111 | <para>
|
---|
[ca66edf] | 112 | To use <application>wpa_supplicant</application>, the kernel must have
|
---|
| 113 | the appropriate drivers and other support available. Read
|
---|
| 114 | <xref linkend='wireless-kernel'/> for details.
|
---|
[4c869cdd] | 115 | </para>
|
---|
[a130a69] | 116 |
|
---|
| 117 | <indexterm zone="wpa_supplicant wpa_supplicant-kernel">
|
---|
| 118 | <primary sortas="d-wpa_supplicant">wpa_supplicant</primary>
|
---|
| 119 | </indexterm>
|
---|
| 120 | </sect2>
|
---|
| 121 |
|
---|
| 122 | <sect2 role="installation">
|
---|
[4c869cdd] | 123 | <title>Installation of WPA Supplicant</title>
|
---|
| 124 |
|
---|
| 125 | <para>
|
---|
| 126 | First you will need to create an initial configuration file for the
|
---|
| 127 | build process. You can read <filename>wpa_supplicant/README</filename>
|
---|
| 128 | and <filename>wpa_supplicant/defconfig</filename> for the explanation
|
---|
| 129 | of the following options as well as other options that can be used.
|
---|
| 130 | Create a build configuration file that should work for standard WiFi
|
---|
| 131 | setups by running the following command:
|
---|
| 132 | </para>
|
---|
[a130a69] | 133 |
|
---|
[4c869cdd] | 134 | <screen><userinput>cat > wpa_supplicant/.config << "EOF"
|
---|
[8fa167c] | 135 | <literal>CONFIG_BACKEND=file
|
---|
[4c869cdd] | 136 | CONFIG_CTRL_IFACE=y
|
---|
[8cce479c] | 137 | CONFIG_DEBUG_FILE=y
|
---|
| 138 | CONFIG_DEBUG_SYSLOG=y
|
---|
| 139 | CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON
|
---|
[4c869cdd] | 140 | CONFIG_DRIVER_NL80211=y
|
---|
[a130a69] | 141 | CONFIG_DRIVER_WEXT=y
|
---|
[4c869cdd] | 142 | CONFIG_DRIVER_WIRED=y
|
---|
[a130a69] | 143 | CONFIG_EAP_GTC=y
|
---|
| 144 | CONFIG_EAP_LEAP=y
|
---|
| 145 | CONFIG_EAP_MD5=y
|
---|
| 146 | CONFIG_EAP_MSCHAPV2=y
|
---|
| 147 | CONFIG_EAP_OTP=y
|
---|
| 148 | CONFIG_EAP_PEAP=y
|
---|
| 149 | CONFIG_EAP_TLS=y
|
---|
| 150 | CONFIG_EAP_TTLS=y
|
---|
[4c869cdd] | 151 | CONFIG_IEEE8021X_EAPOL=y
|
---|
| 152 | CONFIG_IPV6=y
|
---|
| 153 | CONFIG_LIBNL32=y
|
---|
[a130a69] | 154 | CONFIG_PEERKEY=y
|
---|
| 155 | CONFIG_PKCS12=y
|
---|
| 156 | CONFIG_READLINE=y
|
---|
[4c869cdd] | 157 | CONFIG_SMARTCARD=y
|
---|
| 158 | CONFIG_WPS=y
|
---|
[8fa167c] | 159 | CFLAGS += -I/usr/include/libnl3</literal>
|
---|
[4c869cdd] | 160 | EOF</userinput></screen>
|
---|
| 161 |
|
---|
| 162 | <para>
|
---|
| 163 | If you wish to use <application>WPA Supplicant</application> with
|
---|
| 164 | <xref linkend="NetworkManager"/>, make sure that you have installed
|
---|
[54666831] | 165 | <xref linkend="dbus"/> and <xref linkend="libxml2"/>, then add the
|
---|
[4c869cdd] | 166 | following options to the <application>WPA Supplicant</application>
|
---|
| 167 | build configuration file by running the following command:
|
---|
| 168 | </para>
|
---|
[26c1bdd] | 169 |
|
---|
[4c869cdd] | 170 | <screen><userinput>cat >> wpa_supplicant/.config << "EOF"
|
---|
[8fa167c] | 171 | <literal>CONFIG_CTRL_IFACE_DBUS=y
|
---|
[4c869cdd] | 172 | CONFIG_CTRL_IFACE_DBUS_NEW=y
|
---|
[8fa167c] | 173 | CONFIG_CTRL_IFACE_DBUS_INTRO=y</literal>
|
---|
[4c869cdd] | 174 | EOF</userinput></screen>
|
---|
[a130a69] | 175 |
|
---|
[44d17c7] | 176 | <!-- Fixed in version 2.11
|
---|
[a0209f04] | 177 | <para>
|
---|
| 178 | Next, patch a security vulnerability that occurs when connecting to some
|
---|
| 179 | networks:
|
---|
[44d17c7] | 180 | <!- - CVE-2023-52160, see Ticket #19304. - ->
|
---|
[a0209f04] | 181 | </para>
|
---|
| 182 |
|
---|
| 183 | <screen><userinput>patch -Np1 -i ../wpa_supplicant-&wpa_supplicant-version;-security_fix-1.patch</userinput></screen>
|
---|
[44d17c7] | 184 | -->
|
---|
[f5d675c] | 185 | <para>
|
---|
| 186 | Install <application>WPA Supplicant</application> by running the
|
---|
| 187 | following commands:
|
---|
| 188 | </para>
|
---|
| 189 |
|
---|
[abf53e1] | 190 | <screen><userinput>cd wpa_supplicant &&
|
---|
[ef044424] | 191 | make BINDIR=/usr/sbin LIBDIR=/usr/lib</userinput></screen>
|
---|
[a130a69] | 192 |
|
---|
[4c869cdd] | 193 | <para>
|
---|
| 194 | This package does not come with a test suite.
|
---|
| 195 | </para>
|
---|
[a130a69] | 196 |
|
---|
[4c869cdd] | 197 | <para>
|
---|
[2946338a] | 198 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
[4c869cdd] | 199 | </para>
|
---|
[a130a69] | 200 |
|
---|
[d8d42fa] | 201 | <screen role="root"><userinput>install -v -m755 wpa_{cli,passphrase,supplicant} /usr/sbin/ &&
|
---|
[97a30d62] | 202 | install -v -m644 doc/docbook/wpa_supplicant.conf.5 /usr/share/man/man5/ &&
|
---|
| 203 | install -v -m644 doc/docbook/wpa_{cli,passphrase,supplicant}.8 /usr/share/man/man8/</userinput></screen>
|
---|
[a130a69] | 204 |
|
---|
[7b478500] | 205 | <para revision="systemd">
|
---|
| 206 | Install the <application>systemd</application> support files by
|
---|
| 207 | running the following command as the <systemitem
|
---|
| 208 | class="username">root</systemitem> user:
|
---|
| 209 | </para>
|
---|
| 210 |
|
---|
[0884fe0] | 211 | <screen role="root" revision="systemd"><userinput>install -v -m644 systemd/*.service /usr/lib/systemd/system/</userinput></screen>
|
---|
[7b478500] | 212 |
|
---|
[4c869cdd] | 213 | <para>
|
---|
| 214 | If you have built <application>WPA Supplicant</application> with
|
---|
| 215 | <application>D-Bus</application> support, you will need to install
|
---|
| 216 | <application>D-Bus</application> configuration files. Install them
|
---|
| 217 | by running the following commands as the
|
---|
| 218 | <systemitem class="username">root</systemitem> user:
|
---|
| 219 | </para>
|
---|
[a130a69] | 220 |
|
---|
[66b1ff0] | 221 | <screen role="root"><userinput>install -v -m644 dbus/fi.w1.wpa_supplicant1.service \
|
---|
[97a30d62] | 222 | /usr/share/dbus-1/system-services/ &&
|
---|
[83394f2] | 223 | install -v -d -m755 /etc/dbus-1/system.d &&
|
---|
[2946338a] | 224 | install -v -m644 dbus/dbus-wpa_supplicant.conf \
|
---|
| 225 | /etc/dbus-1/system.d/wpa_supplicant.conf</userinput></screen>
|
---|
[a130a69] | 226 |
|
---|
[4c869cdd] | 227 | <note>
|
---|
| 228 | <para>
|
---|
[2946338a] | 229 | You will need to restart the system <application>D-Bus</application> daemon
|
---|
| 230 | before you can use the <application>WPA Supplicant</application>
|
---|
[325113f8] | 231 | <application>D-Bus</application> interface.
|
---|
[4c869cdd] | 232 | </para>
|
---|
| 233 | </note>
|
---|
[a130a69] | 234 |
|
---|
[2946338a] | 235 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 236 | href="../../xincludes/update-desktop-database.xml"/>
|
---|
[97a30d62] | 237 |
|
---|
[a130a69] | 238 | </sect2>
|
---|
| 239 |
|
---|
| 240 | <sect2 role="configuration">
|
---|
| 241 | <title>Configuring wpa_supplicant</title>
|
---|
| 242 |
|
---|
[161535c] | 243 | <important>
|
---|
| 244 | <para>
|
---|
| 245 | If you are using WPA Supplicant with
|
---|
| 246 | <xref linkend='NetworkManager'/> (or anything communicating with
|
---|
| 247 | WPA Supplicant via D-Bus), this section should be skipped. Running
|
---|
| 248 | a D-Bus connected WPA Supplicant instance and another WPA supplicant
|
---|
| 249 | instance configured following this section simultaneously can cause
|
---|
| 250 | subtle issues.
|
---|
| 251 | </para>
|
---|
| 252 | </important>
|
---|
| 253 |
|
---|
[a130a69] | 254 | <sect3 id="wpa_supplicant-config">
|
---|
| 255 | <title>Config File</title>
|
---|
[97a30d62] | 256 |
|
---|
[7b478500] | 257 | <para revision="sysv">
|
---|
[97a30d62] | 258 | <filename>/etc/sysconfig/wpa_supplicant-*.conf</filename>
|
---|
| 259 | </para>
|
---|
[a130a69] | 260 |
|
---|
[7b478500] | 261 | <para revision="systemd">
|
---|
| 262 | <filename>/etc/wpa_supplicant/wpa_supplicant-*.conf</filename>
|
---|
| 263 | </para>
|
---|
| 264 |
|
---|
| 265 | <indexterm zone="wpa_supplicant wpa_supplicant-config" revision="sysv">
|
---|
[a130a69] | 266 | <primary
|
---|
[97a30d62] | 267 | sortas="e-etc-sysconfig-wpa_supplicant-star.conf">/etc/sysconfig/wpa_supplicant-*.conf</primary>
|
---|
[a130a69] | 268 | </indexterm>
|
---|
[97a30d62] | 269 |
|
---|
[7b478500] | 270 | <indexterm zone="wpa_supplicant wpa_supplicant-config" revision="systemd">
|
---|
| 271 | <primary
|
---|
| 272 | sortas="e-etc-wpa_supplicant-wpa_supplicant-star.conf">/etc/wpa_supplicant/wpa_supplicant-*.conf</primary>
|
---|
| 273 | </indexterm>
|
---|
| 274 |
|
---|
[a130a69] | 275 | </sect3>
|
---|
| 276 |
|
---|
| 277 | <sect3>
|
---|
| 278 | <title>Configuration Information</title>
|
---|
| 279 |
|
---|
[4c869cdd] | 280 | <para>
|
---|
[2946338a] | 281 | To connect to an access point that uses a password, you need to put
|
---|
[7b478500] | 282 | the pre-shared key in
|
---|
[b51fe6e] | 283 | <phrase revision="sysv">
|
---|
| 284 | <filename>
|
---|
[7c56ece] | 285 | /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename>.
|
---|
[b51fe6e] | 286 | </phrase>
|
---|
| 287 | <phrase revision="systemd">
|
---|
| 288 | <filename>
|
---|
[7c56ece] | 289 | /etc/wpa_supplicant/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename>.
|
---|
[b51fe6e] | 290 | </phrase>
|
---|
[97a30d62] | 291 | SSID is the string that the access point/router transmits to
|
---|
| 292 | identify itself. Run the following command as the
|
---|
[4c869cdd] | 293 | <systemitem class="username">root</systemitem> user:
|
---|
| 294 | </para>
|
---|
[a130a69] | 295 |
|
---|
[b51fe6e] | 296 | <screen role="nodump" revision="sysv"><userinput>wpa_passphrase <replaceable>SSID</replaceable> <replaceable>SECRET_PASSWORD</replaceable> > /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</userinput></screen>
|
---|
[7b478500] | 297 |
|
---|
[b51fe6e] | 298 | <screen role="nodump" revision="systemd"><userinput>install -v -dm755 /etc/wpa_supplicant &&
|
---|
[7b478500] | 299 | wpa_passphrase <replaceable>SSID</replaceable> <replaceable>SECRET_PASSWORD</replaceable> > /etc/wpa_supplicant/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</userinput></screen>
|
---|
[a130a69] | 300 |
|
---|
[4c869cdd] | 301 | <para>
|
---|
[b51fe6e] | 302 | <phrase revision="sysv">
|
---|
| 303 | <filename>
|
---|
| 304 | /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf
|
---|
| 305 | </filename>
|
---|
| 306 | </phrase>
|
---|
| 307 | <phrase revision="systemd">
|
---|
| 308 | <filename>
|
---|
| 309 | /etc/wpa_supplicant/wpa_supplicant-<replaceable>wifi0</replaceable>.conf
|
---|
| 310 | </filename>
|
---|
[8558044] | 311 | </phrase>
|
---|
[7b478500] | 312 | can hold the details of several access points. When
|
---|
[97a30d62] | 313 | <command>wpa_supplicant</command> is started, it will scan for the
|
---|
| 314 | SSIDs it can see and choose the appropriate password to connect.
|
---|
[822cc4a6] | 315 | </para>
|
---|
[a130a69] | 316 |
|
---|
[4c869cdd] | 317 | <para>
|
---|
| 318 | If you want to connect to an access point that isn't password
|
---|
[7b478500] | 319 | protected, put an entry like this in
|
---|
[b51fe6e] | 320 | <phrase revision="sysv">
|
---|
| 321 | <filename>
|
---|
[7c56ece] | 322 | /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename>.
|
---|
[b51fe6e] | 323 | </phrase>
|
---|
| 324 | <phrase revision="systemd">
|
---|
| 325 | <filename>
|
---|
[7c56ece] | 326 | /etc/wpa_supplicant/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename>.
|
---|
| 327 | </phrase>
|
---|
[97a30d62] | 328 | Replace "Some-SSID" with the SSID of the access point/router.
|
---|
[4c869cdd] | 329 | </para>
|
---|
[a130a69] | 330 |
|
---|
| 331 | <screen>network={
|
---|
| 332 | ssid="<replaceable>Some-SSID</replaceable>"
|
---|
| 333 | key_mgmt=NONE
|
---|
| 334 | }</screen>
|
---|
| 335 |
|
---|
[b51fe6e] | 336 | <para>
|
---|
| 337 | Connecting to a new access point that is not in the configuration
|
---|
[0bb63a3] | 338 | file can be accomplished manually via the command line, but it
|
---|
[b51fe6e] | 339 | must be done via a privileged user. To do that, add the following to
|
---|
| 340 | the configuration file:
|
---|
| 341 | </para>
|
---|
[822cc4a6] | 342 |
|
---|
[f77c63d0] | 343 | <screen>ctrl_interface=DIR=/run/wpa_supplicant GROUP=<privileged group>
|
---|
[822cc4a6] | 344 | update_config=1</screen>
|
---|
| 345 |
|
---|
| 346 | <para>
|
---|
[f77c63d0] | 347 | Replace the <privileged group> above with a system group where
|
---|
[822cc4a6] | 348 | members have the ability to connect to a wireless access point.
|
---|
| 349 | </para>
|
---|
| 350 |
|
---|
[4c869cdd] | 351 | <para>
|
---|
| 352 | There are many options that you could use to tweak how you connect
|
---|
| 353 | to each access point. They are described in some detail in the
|
---|
| 354 | <filename>wpa_supplicant/wpa_supplicant.conf</filename> file in the
|
---|
| 355 | source tree.
|
---|
| 356 | </para>
|
---|
[a130a69] | 357 |
|
---|
[97a30d62] | 358 | </sect3>
|
---|
| 359 |
|
---|
| 360 | <sect3>
|
---|
| 361 | <title>Connecting to an Access Point</title>
|
---|
| 362 |
|
---|
[7b478500] | 363 | <para id="wpa-service" revision="sysv">
|
---|
[97a30d62] | 364 | If you want to configure network interfaces at boot using
|
---|
| 365 | <command>wpa_supplicant</command>, you need to install the
|
---|
| 366 | <filename>/lib/services/wpa</filename> script
|
---|
[7b478500] | 367 | included in <xref linkend="bootscripts"/> package:
|
---|
[97a30d62] | 368 | </para>
|
---|
| 369 |
|
---|
[7b478500] | 370 | <screen role="root" revision="sysv"><userinput>make install-service-wpa</userinput></screen>
|
---|
[97a30d62] | 371 |
|
---|
[7b478500] | 372 | <indexterm zone="wpa_supplicant wpa-service" revision="sysv">
|
---|
[97a30d62] | 373 | <primary sortas="f-wpa">wpa</primary>
|
---|
| 374 | </indexterm>
|
---|
| 375 |
|
---|
[7b478500] | 376 | <para revision="sysv">
|
---|
[97a30d62] | 377 | If your router/access point uses DHCP to allocate IP addresses, you
|
---|
[194d47b] | 378 | can install <xref linkend="dhcpcd" role="nodep"/> and use it to
|
---|
[97a30d62] | 379 | automatically obtain network addresses. Create the
|
---|
[2e41a4f] | 380 | <filename>/etc/sysconfig/ifconfig-<replaceable>wifi0</replaceable>
|
---|
[97a30d62] | 381 | </filename> by running the following command as the
|
---|
[4c869cdd] | 382 | <systemitem class="username">root</systemitem> user:
|
---|
| 383 | </para>
|
---|
[a130a69] | 384 |
|
---|
[7b478500] | 385 | <screen role="root" revision="sysv"><userinput>cat > /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> << "EOF"
|
---|
[97a30d62] | 386 | <literal>ONBOOT="yes"
|
---|
| 387 | IFACE="<replaceable>wlan0</replaceable>"
|
---|
| 388 | SERVICE="wpa"
|
---|
[a130a69] | 389 |
|
---|
[97a30d62] | 390 | # Additional arguments to wpa_supplicant
|
---|
| 391 | WPA_ARGS=""
|
---|
| 392 |
|
---|
| 393 | WPA_SERVICE="dhcpcd"
|
---|
| 394 | DHCP_START="-b -q <replaceable><insert appropriate start options here></replaceable>"
|
---|
| 395 | DHCP_STOP="-k <replaceable><insert additional stop options here></replaceable>"</literal>
|
---|
| 396 | EOF</userinput></screen>
|
---|
[a130a69] | 397 |
|
---|
[7b478500] | 398 | <para revision="sysv">
|
---|
[97a30d62] | 399 | Alternatively, if you use static addresses on your local network,
|
---|
| 400 | then create the
|
---|
[2e41a4f] | 401 | <filename>/etc/sysconfig/ifconfig-<replaceable>wifi0</replaceable>
|
---|
[97a30d62] | 402 | </filename> by running the following command as the
|
---|
[4c869cdd] | 403 | <systemitem class="username">root</systemitem> user:
|
---|
| 404 | </para>
|
---|
[a130a69] | 405 |
|
---|
[7b478500] | 406 | <screen role="root" revision="sysv"><userinput>cat > /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> << "EOF"
|
---|
[97a30d62] | 407 | <literal>ONBOOT="yes"
|
---|
| 408 | IFACE="<replaceable>wlan0</replaceable>"
|
---|
| 409 | SERVICE="wpa"
|
---|
| 410 |
|
---|
| 411 | # Additional arguments to wpa_supplicant
|
---|
| 412 | WPA_ARGS=""
|
---|
| 413 |
|
---|
| 414 | WPA_SERVICE="ipv4-static"
|
---|
| 415 | IP="192.168.1.1"
|
---|
| 416 | GATEWAY="192.168.1.2"
|
---|
| 417 | PREFIX="24"
|
---|
| 418 | BROADCAST="192.168.1.255"</literal>
|
---|
| 419 | EOF</userinput></screen>
|
---|
[a130a69] | 420 |
|
---|
[7b478500] | 421 | <para revision="systemd">
|
---|
| 422 | There are 3 types of <application>systemd</application> units
|
---|
| 423 | that were installed:
|
---|
| 424 | </para>
|
---|
| 425 |
|
---|
| 426 | <itemizedlist spacing="compact" revision="systemd">
|
---|
| 427 | <listitem>
|
---|
| 428 | <para>
|
---|
| 429 | wpa_supplicant@.service
|
---|
| 430 | </para>
|
---|
| 431 | </listitem>
|
---|
| 432 | <listitem>
|
---|
| 433 | <para>
|
---|
| 434 | wpa_supplicant-nl80211@.service
|
---|
| 435 | </para>
|
---|
| 436 | </listitem>
|
---|
| 437 | <listitem>
|
---|
| 438 | <para>
|
---|
| 439 | wpa_supplicant-wired@.service
|
---|
| 440 | </para>
|
---|
| 441 | </listitem>
|
---|
| 442 | </itemizedlist>
|
---|
| 443 |
|
---|
| 444 | <para revision="systemd">
|
---|
| 445 | The only difference between 3 of them is what driver
|
---|
| 446 | is used for connecting (-D option). The first one uses
|
---|
| 447 | the default driver, the second one uses the nl80211
|
---|
| 448 | driver and the third one uses the wired driver.
|
---|
| 449 | </para>
|
---|
| 450 |
|
---|
[4c869cdd] | 451 | <para>
|
---|
[97a30d62] | 452 | You can connect to the wireless access point by
|
---|
| 453 | running the following command as the
|
---|
[4c869cdd] | 454 | <systemitem class="username">root</systemitem> user:
|
---|
| 455 | </para>
|
---|
[a130a69] | 456 |
|
---|
[7b478500] | 457 | <screen role="root" revision="sysv"><userinput>ifup <replaceable>wifi0</replaceable></userinput></screen>
|
---|
[97a30d62] | 458 |
|
---|
[7b478500] | 459 | <para revision="sysv">
|
---|
[97a30d62] | 460 | Replace <replaceable>wlan0</replaceable> with the correct
|
---|
[2e41a4f] | 461 | wireless interface and <replaceable>wifi0</replaceable>
|
---|
| 462 | with desired name for the configuration file. Please note
|
---|
| 463 | that <filename>wpa_supplicant-*.conf</filename> and
|
---|
| 464 | <filename>ifconfig.*</filename> configuration files need
|
---|
| 465 | to have identical names, ie both contain
|
---|
| 466 | <replaceable>wifi0</replaceable> in their name.
|
---|
[97a30d62] | 467 | </para>
|
---|
[a130a69] | 468 |
|
---|
[7b478500] | 469 | <screen role="root" revision="systemd"><userinput>systemctl start wpa_supplicant@<replaceable>wlan0</replaceable></userinput></screen>
|
---|
| 470 |
|
---|
| 471 | <para revision="systemd">
|
---|
| 472 | To connect to the wireless access point at
|
---|
| 473 | boot, simply enable the appropriate
|
---|
| 474 | <command>wpa_supplicant</command> service
|
---|
| 475 | by running the following command as the
|
---|
| 476 | <systemitem class="username">root</systemitem> user:
|
---|
| 477 | </para>
|
---|
| 478 |
|
---|
| 479 | <screen role="root" revision="systemd"><userinput>systemctl enable wpa_supplicant@<replaceable>wlan0</replaceable></userinput></screen>
|
---|
| 480 |
|
---|
| 481 | <para revision="systemd">
|
---|
| 482 | Depending on your setup, you can replace the
|
---|
| 483 | <filename>wpa_supplicant@.service</filename>
|
---|
| 484 | with any other listed above.
|
---|
| 485 | </para>
|
---|
| 486 |
|
---|
| 487 | <para revision="systemd">
|
---|
| 488 | To assign a network address to your wireless interface, consult the
|
---|
[f0dc9578] | 489 | <ulink url="&lfs-root;/chapter09/network.html">General Network Configuration</ulink>
|
---|
[7b478500] | 490 | page in LFS.
|
---|
| 491 | </para>
|
---|
| 492 |
|
---|
[a130a69] | 493 | </sect3>
|
---|
[97a30d62] | 494 |
|
---|
[a130a69] | 495 | </sect2>
|
---|
| 496 |
|
---|
| 497 | <sect2 role="content">
|
---|
| 498 | <title>Contents</title>
|
---|
| 499 |
|
---|
| 500 | <segmentedlist>
|
---|
| 501 | <segtitle>Installed Programs</segtitle>
|
---|
[c3c56b2] | 502 | <segtitle>Installed Libraries</segtitle>
|
---|
| 503 | <segtitle>Installed Directories</segtitle>
|
---|
[0d7900a] | 504 |
|
---|
[a130a69] | 505 | <seglistitem>
|
---|
[8cce479c] | 506 | <seg>
|
---|
[0bb63a3] | 507 | wpa_supplicant, wpa_passphrase and wpa_cli
|
---|
[8cce479c] | 508 | </seg>
|
---|
[c3c56b2] | 509 | <seg>
|
---|
| 510 | None
|
---|
| 511 | </seg>
|
---|
| 512 | <seg>
|
---|
| 513 | None
|
---|
| 514 | </seg>
|
---|
[a130a69] | 515 | </seglistitem>
|
---|
| 516 | </segmentedlist>
|
---|
| 517 |
|
---|
| 518 | <variablelist>
|
---|
| 519 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 520 | <?dbfo list-presentation="list"?>
|
---|
| 521 | <?dbhtml list-presentation="table"?>
|
---|
| 522 |
|
---|
| 523 | <varlistentry id="wpa_supplicant-prog">
|
---|
| 524 | <term><command>wpa_supplicant</command></term>
|
---|
| 525 | <listitem>
|
---|
[4c869cdd] | 526 | <para>
|
---|
| 527 | is a daemon that can connect to a password protected wireless
|
---|
[4c24eb0a] | 528 | access point
|
---|
[4c869cdd] | 529 | </para>
|
---|
[a130a69] | 530 | <indexterm zone="wpa_supplicant wpa_supplicant-prog">
|
---|
| 531 | <primary sortas="b-wpa_supplicant">wpa_supplicant</primary>
|
---|
| 532 | </indexterm>
|
---|
| 533 | </listitem>
|
---|
| 534 | </varlistentry>
|
---|
| 535 |
|
---|
| 536 | <varlistentry id="wpa_passphrase">
|
---|
| 537 | <term><command>wpa_passphrase</command></term>
|
---|
| 538 | <listitem>
|
---|
[4c869cdd] | 539 | <para>
|
---|
| 540 | takes an SSID and a password and generates a simple
|
---|
| 541 | configuration that <command>wpa_supplicant</command> can
|
---|
[4c24eb0a] | 542 | understand
|
---|
[4c869cdd] | 543 | </para>
|
---|
[a130a69] | 544 | <indexterm zone="wpa_supplicant wpa_passphrase">
|
---|
| 545 | <primary sortas="b-wpa_passphrase">wpa_passphrase</primary>
|
---|
| 546 | </indexterm>
|
---|
| 547 | </listitem>
|
---|
| 548 | </varlistentry>
|
---|
| 549 |
|
---|
| 550 | <varlistentry id="wpa_cli">
|
---|
| 551 | <term><command>wpa_cli</command></term>
|
---|
| 552 | <listitem>
|
---|
[4c869cdd] | 553 | <para>
|
---|
| 554 | is a command line interface used to control a running
|
---|
[4c24eb0a] | 555 | <command>wpa_supplicant</command> daemon
|
---|
[4c869cdd] | 556 | </para>
|
---|
[a130a69] | 557 | <indexterm zone="wpa_supplicant wpa_cli">
|
---|
| 558 | <primary sortas="b-wpa_cli">wpa_cli</primary>
|
---|
| 559 | </indexterm>
|
---|
| 560 | </listitem>
|
---|
| 561 | </varlistentry>
|
---|
[4c869cdd] | 562 |
|
---|
[a130a69] | 563 | </variablelist>
|
---|
[4c869cdd] | 564 |
|
---|
[a130a69] | 565 | </sect2>
|
---|
[4c869cdd] | 566 |
|
---|
[a130a69] | 567 | </sect1>
|
---|