[e33ddee] | 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 |
|
---|
[0d7900a] | 7 | <!ENTITY NetworkManager-download-http
|
---|
[eae0d6d1] | 8 | "&gnome-download-http;/NetworkManager/&NetworkManager-minor;/NetworkManager-&NetworkManager-version;.tar.xz">
|
---|
[f4ac7141] | 9 | <!ENTITY NetworkManager-download-ftp " ">
|
---|
[9518df8] | 10 | <!ENTITY NetworkManager-md5sum "bd6c9cb0ecd0fb7f516cde7bf4dee3fb">
|
---|
[17746cc] | 11 | <!ENTITY NetworkManager-size "6.6 MB">
|
---|
[9518df8] | 12 | <!ENTITY NetworkManager-buildsize "904 MB (with tests and documentation)">
|
---|
| 13 | <!ENTITY NetworkManager-time "1.2 SBU (with tests, using parallelism=4)">
|
---|
[e33ddee] | 14 | ]>
|
---|
| 15 |
|
---|
| 16 | <sect1 id="NetworkManager" xreflabel="NetworkManager-&NetworkManager-version;">
|
---|
| 17 | <?dbhtml filename="networkmanager.html"?>
|
---|
| 18 |
|
---|
| 19 |
|
---|
| 20 | <title>NetworkManager-&NetworkManager-version;</title>
|
---|
| 21 |
|
---|
| 22 | <indexterm zone="NetworkManager">
|
---|
| 23 | <primary sortas="a-NetworkManager">NetworkManager</primary>
|
---|
| 24 | </indexterm>
|
---|
| 25 |
|
---|
| 26 | <sect2 role="package">
|
---|
| 27 | <title>Introduction to NetworkManager</title>
|
---|
| 28 |
|
---|
[7ded7e3] | 29 | <para>
|
---|
| 30 | <application>NetworkManager</application> is a set of co-operative
|
---|
[e130fead] | 31 | tools that make networking simple and straightforward. Whether you use WiFi,
|
---|
[8df33ae3] | 32 | wired, 3G, or Bluetooth, NetworkManager allows you to quickly move from
|
---|
| 33 | one network to another: Once a network has been configured and joined
|
---|
| 34 | once, it can be detected and re-joined automatically the next time it's
|
---|
| 35 | available.
|
---|
[7ded7e3] | 36 | </para>
|
---|
[e33ddee] | 37 |
|
---|
[d54f002] | 38 | &lfs120_checked;
|
---|
[e33ddee] | 39 |
|
---|
[cec6657e] | 40 | <note revision="systemd">
|
---|
| 41 | <para>
|
---|
| 42 | Make sure that you disable the <command>systemd-networkd</command>
|
---|
| 43 | service or configure it not to manage the interfaces you want to manage
|
---|
| 44 | with <application>NetworkManager</application>.
|
---|
| 45 | </para>
|
---|
| 46 | </note>
|
---|
| 47 |
|
---|
[e33ddee] | 48 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 49 | <itemizedlist spacing="compact">
|
---|
| 50 | <listitem>
|
---|
[7ded7e3] | 51 | <para>
|
---|
| 52 | Download (HTTP): <ulink url="&NetworkManager-download-http;"/>
|
---|
| 53 | </para>
|
---|
[e33ddee] | 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
[7ded7e3] | 56 | <para>
|
---|
| 57 | Download (FTP): <ulink url="&NetworkManager-download-ftp;"/>
|
---|
| 58 | </para>
|
---|
[e33ddee] | 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
[7ded7e3] | 61 | <para>
|
---|
| 62 | Download MD5 sum: &NetworkManager-md5sum;
|
---|
| 63 | </para>
|
---|
[e33ddee] | 64 | </listitem>
|
---|
| 65 | <listitem>
|
---|
[7ded7e3] | 66 | <para>
|
---|
| 67 | Download size: &NetworkManager-size;
|
---|
| 68 | </para>
|
---|
[e33ddee] | 69 | </listitem>
|
---|
| 70 | <listitem>
|
---|
[7ded7e3] | 71 | <para>
|
---|
| 72 | Estimated disk space required: &NetworkManager-buildsize;
|
---|
| 73 | </para>
|
---|
[e33ddee] | 74 | </listitem>
|
---|
| 75 | <listitem>
|
---|
[7ded7e3] | 76 | <para>
|
---|
| 77 | Estimated build time: &NetworkManager-time;
|
---|
| 78 | </para>
|
---|
[e33ddee] | 79 | </listitem>
|
---|
| 80 | </itemizedlist>
|
---|
| 81 |
|
---|
| 82 | <bridgehead renderas="sect3">NetworkManager Dependencies</bridgehead>
|
---|
| 83 |
|
---|
| 84 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[d497e89] | 85 | <para role="required">
|
---|
[7be78b9a] | 86 | <xref linkend="jansson"/> and
|
---|
[d267a13] | 87 | <xref linkend="libndp"/>
|
---|
[d497e89] | 88 | </para>
|
---|
| 89 |
|
---|
| 90 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 91 | <para role="recommended">
|
---|
[c4ae27ab] | 92 | <xref linkend="curl"/>,
|
---|
[e4c821e2] | 93 | <xref linkend="dhcpcd"/>,
|
---|
[4b3c4b2] | 94 | <xref linkend="gobject-introspection"/>,
|
---|
[b7d1d2b] | 95 | <xref linkend="iptables"/>,
|
---|
[696fed8] | 96 | <xref linkend="newt"/> (for <command>nmtui</command>),
|
---|
[d267a13] | 97 | <xref linkend="nss"/>,
|
---|
[c2ba57e] | 98 | <xref role='runtime' linkend="polkit"/> (runtime),
|
---|
[b528d0f4] | 99 | <xref linkend="pygobject3"/>,
|
---|
[51dfb3e] | 100 | <phrase revision="sysv"><xref linkend="elogind"/>,</phrase>
|
---|
[cec6657e] | 101 | <phrase revision="systemd"><xref linkend="systemd"/>,</phrase>
|
---|
[626bb04] | 102 | <xref linkend="vala"/>, and
|
---|
[9a381c8] | 103 | <xref linkend="wpa_supplicant"/> (runtime, built with D-Bus support)
|
---|
[d497e89] | 104 | </para>
|
---|
[e33ddee] | 105 |
|
---|
[d0880dfa] | 106 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[d497e89] | 107 | <para role="optional">
|
---|
[d4f4107] | 108 | <xref linkend="bluez"/>,
|
---|
[e64cabd] | 109 | <xref linkend="dbus-python"/> (for the test suite),
|
---|
[4a9054a8] | 110 | <!-- <xref linkend="firewalld"/> (For whenever firewalld is reintroduced) -->
|
---|
[261fdeb] | 111 | <xref linkend="gnutls"/> (can be used instead of <xref linkend="nss"/>),
|
---|
[d497e89] | 112 | <xref linkend="gtk-doc"/>,
|
---|
[1ad3510e] | 113 | <xref linkend="libpsl"/>,
|
---|
[e440af5] | 114 | (<xref linkend="qt5"/> or
|
---|
[b3867c5] | 115 | <xref role="node" linkend="qt5-components"/> with qtdoc) (for examples),
|
---|
[7d645679] | 116 | <xref linkend="ModemManager"/>,
|
---|
[c2ba57e] | 117 | <xref linkend="upower"/>,
|
---|
[acb3e9f] | 118 | <xref linkend="valgrind"/>,
|
---|
[75e3e09] | 119 | <ulink url="https://thekelleys.org.uk/dnsmasq/doc.html">dnsmasq</ulink>,
|
---|
[365c6fb] | 120 | <ulink url="https://firewalld.org/">firewalld</ulink>,
|
---|
[262a108] | 121 | <ulink url="https://github.com/Distrotech/libaudit">libaudit</ulink>,
|
---|
[4f5369a] | 122 | <ulink url="https://github.com/jpirko/libteam">libteam</ulink>,
|
---|
[01701da9] | 123 | <ulink url="&gnome-download-http;/mobile-broadband-provider-info/">mobile-broadband-provider-info</ulink>,
|
---|
[cec6657e] | 124 | <ulink url="https://www.samba.org/ftp/ppp/">PPP</ulink>, and
|
---|
[e130fead] | 125 | <ulink url="https://dianne.skoll.ca/projects/rp-pppoe/">RP-PPPoE</ulink>
|
---|
[d497e89] | 126 | </para>
|
---|
[d0880dfa] | 127 |
|
---|
[e33ddee] | 128 | </sect2>
|
---|
| 129 |
|
---|
[13b116c] | 130 | <sect2 role="kernel" id="NetworkManager-kernel">
|
---|
| 131 | <title>Kernel Configuration</title>
|
---|
| 132 |
|
---|
| 133 | <para>
|
---|
[fc88f1f] | 134 | If you wish to run the tests, check that at least the following options
|
---|
| 135 | are enabled in the kernel configuration. Those options have been
|
---|
| 136 | determined to be necessary, but may not be sufficient. Recompile the
|
---|
| 137 | kernel if necessary:
|
---|
[13b116c] | 138 | </para>
|
---|
| 139 |
|
---|
[8558044] | 140 | <!-- Ethernet Teaming support is potentially optional, but I didn't
|
---|
[13b116c] | 141 | run the tests again to test that. It was needed to convince one of
|
---|
| 142 | the Linux Platform tests to move farther along because otherwise
|
---|
| 143 | RTNETLINK would respond with an Error 95 - unknown device type.
|
---|
[fc88f1f] | 144 | This would cause the test to fail early on in the process.
|
---|
| 145 |
|
---|
| 146 | [pierre, Nov 2022]: I cannot tell whether these options are
|
---|
| 147 | the only ones that are needed. They are the options I had to add
|
---|
| 148 | in order to have some tests pass. But I already had some other
|
---|
| 149 | options set for packet filtering (iptables), that may not be
|
---|
| 150 | available by default and may be necessary. Even with the options
|
---|
| 151 | below still one test (test-route) fails.-->
|
---|
| 152 |
|
---|
[0add366] | 153 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 154 | href="networkmanager-test-kernel.xml"/>
|
---|
[13b116c] | 155 |
|
---|
| 156 | <indexterm zone="NetworkManager NetworkManager-kernel">
|
---|
[0add366] | 157 | <primary sortas="d-NetworkManager">NetworkManager (test)</primary>
|
---|
[13b116c] | 158 | </indexterm>
|
---|
| 159 | </sect2>
|
---|
| 160 |
|
---|
[e33ddee] | 161 | <sect2 role="installation">
|
---|
| 162 | <title>Installation of NetworkManager</title>
|
---|
| 163 |
|
---|
[7c56ece] | 164 | <para>
|
---|
[8558044] | 165 | If <xref linkend="qt5"/> is installed and the Qt based
|
---|
[7c56ece] | 166 | examples are desired, fix two meson.build files:
|
---|
| 167 | </para>
|
---|
[e4d2b8d] | 168 |
|
---|
[e022b07] | 169 | <screen><userinput>sed -e 's/-qt4/-qt5/' \
|
---|
[e4d2b8d] | 170 | -e 's/moc_location/host_bins/' \
|
---|
[6573fc3] | 171 | -i examples/C/qt/meson.build &&
|
---|
[40d141f] | 172 |
|
---|
[6573fc3] | 173 | sed -e 's/Qt/&5/' \
|
---|
| 174 | -i meson.build</userinput></screen>
|
---|
[d267a13] | 175 |
|
---|
[f61c18e] | 176 | <!--
|
---|
[d267a13] | 177 | <para>
|
---|
| 178 | Fix a missing meson.build file for initrd hooks (not used in BLFS):
|
---|
| 179 | </para>
|
---|
| 180 |
|
---|
[4da49b9] | 181 | <screen><userinput>sed '/initrd/d' -i src/core/meson.build</userinput></screen>
|
---|
[f61c18e] | 182 | -->
|
---|
[e4d2b8d] | 183 |
|
---|
[fdbfe39] | 184 | <para>
|
---|
| 185 | Fix the python scripts so that they use <application>Python
|
---|
| 186 | 3</application>:
|
---|
| 187 | </para>
|
---|
| 188 |
|
---|
| 189 | <screen><userinput>grep -rl '^#!.*python$' | xargs sed -i '1s/python/&3/'</userinput></screen>
|
---|
| 190 |
|
---|
[7ded7e3] | 191 | <para>
|
---|
[7c4f32b] | 192 | Install <application>NetworkManager</application> by running the
|
---|
| 193 | following commands:
|
---|
[7ded7e3] | 194 | </para>
|
---|
[e33ddee] | 195 |
|
---|
[d267a13] | 196 | <screen revision="sysv"><userinput>mkdir build &&
|
---|
[7d07abd] | 197 | cd build &&
|
---|
[d267a13] | 198 |
|
---|
| 199 | CXXFLAGS+="-O2 -fPIC" \
|
---|
[91318eb] | 200 | meson setup .. \
|
---|
[4b6e2b2] | 201 | --prefix=/usr \
|
---|
[adf17153] | 202 | --buildtype=release \
|
---|
[d267a13] | 203 | -Dlibaudit=no \
|
---|
[39100371] | 204 | -Dlibpsl=false \
|
---|
| 205 | -Dnmtui=true \
|
---|
| 206 | -Dovs=false \
|
---|
| 207 | -Dppp=false \
|
---|
[d267a13] | 208 | -Dselinux=false \
|
---|
[51dfb3e] | 209 | -Dsession_tracking=elogind \
|
---|
[39100371] | 210 | -Dmodem_manager=false \
|
---|
[d267a13] | 211 | -Dsystemdsystemunitdir=no \
|
---|
| 212 | -Dsystemd_journal=false \
|
---|
[91318eb] | 213 | -Dqt=false &&
|
---|
[d267a13] | 214 | ninja</userinput></screen>
|
---|
| 215 |
|
---|
| 216 | <screen revision="systemd"><userinput>mkdir build &&
|
---|
[7d07abd] | 217 | cd build &&
|
---|
[d267a13] | 218 |
|
---|
| 219 | CXXFLAGS+="-O2 -fPIC" \
|
---|
[91318eb] | 220 | meson setup .. \
|
---|
[4b6e2b2] | 221 | --prefix=/usr \
|
---|
[adf17153] | 222 | --buildtype=release \
|
---|
[d267a13] | 223 | -Dlibaudit=no \
|
---|
[39100371] | 224 | -Dlibpsl=false \
|
---|
| 225 | -Dnmtui=true \
|
---|
| 226 | -Dovs=false \
|
---|
| 227 | -Dppp=false \
|
---|
[d267a13] | 228 | -Dselinux=false \
|
---|
| 229 | -Dqt=false \
|
---|
| 230 | -Dsession_tracking=systemd \
|
---|
[91318eb] | 231 | -Dmodem_manager=false &&
|
---|
[d267a13] | 232 | ninja</userinput></screen>
|
---|
[cec6657e] | 233 |
|
---|
[7ded7e3] | 234 | <para>
|
---|
[0bfaca0] | 235 | An already active graphical session with a bus address is necessary
|
---|
| 236 | to run the tests. To test the results, issue
|
---|
| 237 | <command>ninja test</command>.
|
---|
[fc88f1f] | 238 | </para>
|
---|
| 239 |
|
---|
| 240 | <para>
|
---|
| 241 | A few tests may fail, depending on enabled kernel options.
|
---|
[7ded7e3] | 242 | </para>
|
---|
[e33ddee] | 243 |
|
---|
[7ded7e3] | 244 | <para>
|
---|
| 245 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 246 | </para>
|
---|
[e33ddee] | 247 |
|
---|
[d267a13] | 248 | <screen role="root"><userinput>ninja install &&
|
---|
| 249 | mv -v /usr/share/doc/NetworkManager{,-&NetworkManager-version;}</userinput></screen>
|
---|
[e33ddee] | 250 |
|
---|
[4d6a0e2] | 251 | <para>
|
---|
| 252 | If you have not passed the <option>-Ddocs=true</option> option to
|
---|
| 253 | <command>meson</command>, you can install the pregenerated manual pages
|
---|
| 254 | with (as the &root; user):
|
---|
| 255 | </para>
|
---|
| 256 |
|
---|
| 257 | <screen role="root"><userinput>for file in $(echo ../man/*.[1578]); do
|
---|
| 258 | section=${file##*.} &&
|
---|
| 259 | install -vdm 755 /usr/share/man/man$section
|
---|
| 260 | install -vm 644 $file /usr/share/man/man$section/
|
---|
| 261 | done</userinput></screen>
|
---|
| 262 |
|
---|
| 263 | <para>
|
---|
[17746cc] | 264 | If you have not used <option>-Ddocs=true</option>, the
|
---|
[4d6a0e2] | 265 | pregenerated HTML documentation can also be installed with (as
|
---|
| 266 | the &root; user):
|
---|
| 267 | </para>
|
---|
| 268 |
|
---|
| 269 | <screen role="root"
|
---|
| 270 | remap="doc"><userinput>cp -Rv ../docs/{api,libnm} /usr/share/doc/NetworkManager-&NetworkManager-version;</userinput></screen>
|
---|
| 271 |
|
---|
[e33ddee] | 272 | </sect2>
|
---|
| 273 |
|
---|
| 274 | <sect2 role="commands">
|
---|
| 275 | <title>Command Explanations</title>
|
---|
| 276 |
|
---|
[e4d2b8d] | 277 | <para>
|
---|
[8558044] | 278 | <envar>CXXFLAGS="-O2 -fPIC"</envar>: These compiler options are
|
---|
[e4d2b8d] | 279 | necessary to build the Qt5 based examples.
|
---|
| 280 | </para>
|
---|
| 281 |
|
---|
[adf17153] | 282 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 283 | href="../../xincludes/meson-buildtype-release.xml"/>
|
---|
| 284 |
|
---|
[e64cabd] | 285 | <para>
|
---|
[fdbfe39] | 286 | <option>-Ddocs=true</option>: Use this switch to enable building
|
---|
[39100371] | 287 | man pages and documentation if <xref linkend="gtk-doc"/> is installed.
|
---|
[e64cabd] | 288 | </para>
|
---|
| 289 |
|
---|
[7ded7e3] | 290 | <para>
|
---|
[17746cc] | 291 | <parameter>-Dnmtui=true</parameter>: This switch enables building
|
---|
[acb3e9f] | 292 | <command>nmtui</command>.
|
---|
| 293 | </para>
|
---|
| 294 |
|
---|
[d267a13] | 295 | <para revision="sysv">
|
---|
[51dfb3e] | 296 | <parameter>-Dsystemdsystemunitdir=no</parameter> and
|
---|
[d267a13] | 297 | <parameter>-Dsystemd_journal=false</parameter>: systemd is not
|
---|
[17746cc] | 298 | used for sysv init systems, so prevent installing units and using the
|
---|
| 299 | systemd journal.
|
---|
[d267a13] | 300 | </para>
|
---|
| 301 |
|
---|
[39100371] | 302 | <para>
|
---|
[21d18f7e] | 303 | <parameter>-Dlibpsl=false</parameter> and
|
---|
[17746cc] | 304 | <parameter>-Dovs=false</parameter>: These switches disable building with
|
---|
| 305 | the respective libraries. Remove these if you have the needed libraries
|
---|
| 306 | installed on your system.
|
---|
[39100371] | 307 | </para>
|
---|
[8558044] | 308 |
|
---|
[f759a25] | 309 | <para>
|
---|
[2c87187] | 310 | <parameter>-Dmodem_manager=false</parameter>: This switch is required if
|
---|
[17746cc] | 311 | <application>ModemManager</application> is not installed. Omit this switch
|
---|
| 312 | if you have built <application>ModemManager</application> and
|
---|
[a406810] | 313 | <application>mobile-broadband-provider-info</application>.
|
---|
[39100371] | 314 | </para>
|
---|
| 315 |
|
---|
[51dfb3e] | 316 | <para revision="sysv">
|
---|
| 317 | <parameter>-Dsession_tracking=elogind</parameter>: This switch
|
---|
| 318 | is used to set <command>elogind</command> as the default
|
---|
| 319 | program for session tracking.
|
---|
| 320 | </para>
|
---|
| 321 |
|
---|
[cec6657e] | 322 | <para revision="systemd">
|
---|
[d267a13] | 323 | <parameter>-Dsession_tracking=systemd</parameter>: This switch
|
---|
[cec6657e] | 324 | is used to set <command>systemd-logind</command> as the default
|
---|
| 325 | program for session tracking.
|
---|
| 326 | </para>
|
---|
| 327 |
|
---|
| 328 | <para revision="systemd">
|
---|
[d267a13] | 329 | <parameter>-Dsystemdsystemunitdir=/lib/systemd/system</parameter>:
|
---|
[cec6657e] | 330 | This switch is used to set the correct installation directory for
|
---|
| 331 | systemd units.
|
---|
| 332 | </para>
|
---|
| 333 |
|
---|
[acb3e9f] | 334 | <para>
|
---|
[17746cc] | 335 | <parameter>-Dppp=false</parameter>: This switch disables
|
---|
[6e1616e2] | 336 | <application>PPP</application> support in
|
---|
[17746cc] | 337 | <application>NetworkManager</application> since the programs necessary
|
---|
| 338 | for it are not installed. Remove this switch if you need PPP support and
|
---|
| 339 | have <application>PPP</application> installed.
|
---|
[7ded7e3] | 340 | </para>
|
---|
[e33ddee] | 341 |
|
---|
[8c7390c] | 342 | <para>
|
---|
[d267a13] | 343 | <parameter>-Dlibaudit=no</parameter> and
|
---|
[17746cc] | 344 | <parameter>-Dselinux=false</parameter>: This switch disables support for
|
---|
| 345 | libaudit and SELinux since they are not used in BLFS.
|
---|
[d6e164b] | 346 | </para>
|
---|
[e33ddee] | 347 |
|
---|
[b528d0f4] | 348 | <para>
|
---|
[17746cc] | 349 | <parameter>-Dqt=false</parameter>: This switch disables the
|
---|
| 350 | <application>Qt</application> examples. Omit if you have
|
---|
| 351 | <application>Qt</application> available and wish to install the examples.
|
---|
[b528d0f4] | 352 | </para>
|
---|
| 353 |
|
---|
[261fdeb] | 354 | <para>
|
---|
| 355 | <option>-Dcrypto=gnutls</option>: Use this switch if you have GnuTLS
|
---|
| 356 | installed and want to use it for certificate and key operations in
|
---|
| 357 | NetworkManager, instead of using NSS (the default).
|
---|
| 358 | </para>
|
---|
| 359 |
|
---|
| 360 | <para>
|
---|
| 361 | <option>-Dcrypto=null</option>: Use this switch if neither NSS nor
|
---|
| 362 | GnuTLS is installed but you want to build NetworkManager anyway. This
|
---|
| 363 | switch will make NetworkManager lack some features (for example
|
---|
| 364 | 802.1X).
|
---|
| 365 | </para>
|
---|
| 366 |
|
---|
[c2ba57e] | 367 | <para>
|
---|
| 368 | <option>-Dsuspend_resume=upower</option>: Use this switch if
|
---|
| 369 | you have <xref linkend='upower'/> installed and want to use it
|
---|
| 370 | (instead of &logind;) for suspend and resume support.
|
---|
| 371 | </para>
|
---|
[e33ddee] | 372 | </sect2>
|
---|
| 373 |
|
---|
[d497e89] | 374 | <sect2 role="configuration">
|
---|
| 375 | <title>Configuring NetworkManager</title>
|
---|
| 376 |
|
---|
| 377 | <sect3 id="NetworkManager-config">
|
---|
| 378 | <title>Config Files</title>
|
---|
| 379 | <para>
|
---|
| 380 | <filename>/etc/NetworkManager/NetworkManager.conf</filename>
|
---|
| 381 | </para>
|
---|
| 382 |
|
---|
| 383 | <indexterm zone="NetworkManager NetworkManager-config">
|
---|
| 384 | <primary
|
---|
| 385 | sortas="e-etc-NetworkManager-NetworkManager.conf">
|
---|
| 386 | /etc/NetworkManager/NetworkManager.conf</primary>
|
---|
| 387 | </indexterm>
|
---|
| 388 |
|
---|
| 389 | </sect3>
|
---|
| 390 |
|
---|
| 391 | <sect3><title>Configuration Information</title>
|
---|
| 392 |
|
---|
| 393 | <para>
|
---|
| 394 | For <application>NetworkManager</application> to work, at least
|
---|
[21d18f7e] | 395 | a minimal configuration file must be present. Such a file is not
|
---|
[8df33ae3] | 396 | installed with <command>make install</command>. Issue the following
|
---|
| 397 | command as the <systemitem class="username">root</systemitem> user to
|
---|
[21d18f7e] | 398 | create a minimal <filename>NetworkManager.conf</filename> file:
|
---|
[d497e89] | 399 | </para>
|
---|
| 400 |
|
---|
| 401 | <screen role="root"><userinput>cat >> /etc/NetworkManager/NetworkManager.conf << "EOF"
|
---|
| 402 | <literal>[main]
|
---|
| 403 | plugins=keyfile</literal>
|
---|
| 404 | EOF</userinput></screen>
|
---|
| 405 |
|
---|
| 406 | <para>
|
---|
[7fd06b0] | 407 | This file should not be modified directly by users of the system.
|
---|
| 408 | Instead, system specific changes should be made using configuration
|
---|
| 409 | files in the
|
---|
| 410 | <filename class="directory">/etc/NetworkManager/conf.d</filename>
|
---|
[21d18f7e] | 411 | directory.
|
---|
[7fd06b0] | 412 | </para>
|
---|
| 413 |
|
---|
| 414 | <para>
|
---|
| 415 | To allow polkit to manage authorizations, add the following
|
---|
| 416 | configuration file:
|
---|
| 417 | </para>
|
---|
| 418 |
|
---|
| 419 | <screen role="root"><userinput>cat > /etc/NetworkManager/conf.d/polkit.conf << "EOF"
|
---|
| 420 | <literal>[main]
|
---|
| 421 | auth-polkit=true</literal>
|
---|
| 422 | EOF</userinput></screen>
|
---|
| 423 |
|
---|
| 424 | <para>
|
---|
| 425 | To use something other than the built-in dhcp client (recommended if
|
---|
| 426 | using only <command>nmcli</command>), use the following configuration
|
---|
[194d47b] | 427 | (valid values include either dhcpcd or internal):
|
---|
[7fd06b0] | 428 | </para>
|
---|
| 429 |
|
---|
| 430 | <screen role="nodump"><userinput>cat > /etc/NetworkManager/conf.d/dhcp.conf << "EOF"
|
---|
| 431 | <literal>[main]
|
---|
[194d47b] | 432 | dhcp=</literal><replaceable>dhcpcd</replaceable>
|
---|
[7fd06b0] | 433 | EOF</userinput></screen>
|
---|
| 434 |
|
---|
| 435 | <para>
|
---|
| 436 | To prevent <application>NetworkManager</application> from updating the
|
---|
| 437 | <filename>/etc/resolv.conf</filename> file, add the following
|
---|
| 438 | configuration file:
|
---|
| 439 | </para>
|
---|
| 440 |
|
---|
| 441 | <screen role="nodump"><userinput>cat > /etc/NetworkManager/conf.d/no-dns-update.conf << "EOF"
|
---|
| 442 | <literal>[main]
|
---|
| 443 | dns=none</literal>
|
---|
| 444 | EOF</userinput></screen>
|
---|
| 445 |
|
---|
| 446 | <para>
|
---|
[5f729f8] | 447 | For additional configuration options, see
|
---|
[7fd06b0] | 448 | <command>man 5 NetworkManager.conf</command>.
|
---|
[0d7900a] | 449 | </para>
|
---|
[d497e89] | 450 |
|
---|
[8df33ae3] | 451 | <para>
|
---|
[21d18f7e] | 452 | To allow regular users to configure network connections,
|
---|
[8df33ae3] | 453 | you should add them to the
|
---|
| 454 | <systemitem class="groupname">netdev</systemitem>
|
---|
| 455 | group, and create a <application>polkit</application> rule that grants
|
---|
| 456 | access. Run the following commands as the
|
---|
| 457 | <systemitem class="username">root</systemitem> user:
|
---|
| 458 | </para>
|
---|
| 459 |
|
---|
[a581662] | 460 | <screen role="root"><userinput>groupadd -fg 86 netdev &&
|
---|
[b88584a] | 461 | /usr/sbin/usermod -a -G netdev <replaceable><username></replaceable>
|
---|
[8df33ae3] | 462 |
|
---|
| 463 | cat > /usr/share/polkit-1/rules.d/org.freedesktop.NetworkManager.rules << "EOF"
|
---|
| 464 | <literal>polkit.addRule(function(action, subject) {
|
---|
| 465 | if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 && subject.isInGroup("netdev")) {
|
---|
| 466 | return polkit.Result.YES;
|
---|
| 467 | }
|
---|
| 468 | });</literal>
|
---|
| 469 | EOF</userinput></screen>
|
---|
| 470 |
|
---|
[d497e89] | 471 | </sect3>
|
---|
| 472 |
|
---|
| 473 | <sect3 id="NetworkManager-init">
|
---|
[cec6657e] | 474 | <title><phrase revision="sysv">Boot Script</phrase>
|
---|
| 475 | <phrase revision="systemd">Systemd Unit</phrase></title>
|
---|
| 476 |
|
---|
| 477 | <para revision="sysv">
|
---|
| 478 | To automatically start the <command>NetworkManager</command> daemon
|
---|
| 479 | when the system is rebooted, install the
|
---|
[8558044] | 480 | <filename>/etc/rc.d/init.d/networkmanager</filename>bootscript from the
|
---|
[cec6657e] | 481 | <xref linkend="bootscripts"/> package.
|
---|
| 482 | </para>
|
---|
[d497e89] | 483 |
|
---|
[cec6657e] | 484 | <para revision="systemd">
|
---|
| 485 | To start the <command>NetworkManager</command> daemon at boot, enable
|
---|
| 486 | the previously installed systemd unit by running the following command
|
---|
| 487 | as the <systemitem class="username">root</systemitem> user:
|
---|
[d497e89] | 488 | </para>
|
---|
| 489 |
|
---|
[8df33ae3] | 490 | <note>
|
---|
| 491 | <para>
|
---|
| 492 | If using <application>Network Manager</application> to manage
|
---|
| 493 | an interface, any previous configuration for that interface should be
|
---|
| 494 | removed, and the interface brought down prior to starting
|
---|
| 495 | <application>Network Manager</application>.
|
---|
| 496 | </para>
|
---|
| 497 | </note>
|
---|
[8558044] | 498 |
|
---|
[d497e89] | 499 | <indexterm zone="NetworkManager NetworkManager-init">
|
---|
| 500 | <primary sortas="f-NetworkManager">NetworkManager</primary>
|
---|
| 501 | </indexterm>
|
---|
| 502 |
|
---|
[cec6657e] | 503 | <screen role="root" revision="sysv"><userinput>make install-networkmanager</userinput></screen>
|
---|
| 504 |
|
---|
| 505 | <screen role="root" revision="systemd"><userinput>systemctl enable NetworkManager</userinput></screen>
|
---|
[e2a1442] | 506 | <!-- The below instruction is obsolete. NetworkManager-wait-online is now
|
---|
| 507 | enabled by default when enabling NetworkManager. -->
|
---|
| 508 | <!--
|
---|
[cec6657e] | 509 | <para revision="systemd">
|
---|
| 510 | <application>NetworkManager</application> also ships a systemd unit
|
---|
| 511 | called <filename>NetworkManager-wait-online.service</filename> which
|
---|
| 512 | can be used to prevent services that require network connectivity
|
---|
| 513 | from starting until <application>NetworkManager</application> has
|
---|
| 514 | established the connection. To enable it, run the following command
|
---|
| 515 | as the <systemitem class="username">root</systemitem> user:
|
---|
| 516 | </para>
|
---|
| 517 |
|
---|
| 518 | <screen role="root" revision="systemd"><userinput>systemctl enable NetworkManager-wait-online</userinput></screen>
|
---|
[e2a1442] | 519 | -->
|
---|
| 520 | <!-- As such, let's now provide instructions on how to disable that
|
---|
| 521 | behavior, for those who wish to do so. -->
|
---|
| 522 | <para revision="systemd">
|
---|
| 523 | Starting in version 1.11.2 of <application>NetworkManager</application>,
|
---|
| 524 | a systemd unit named <filename>NetworkManager-wait-online.service</filename>
|
---|
| 525 | is enabled, which is used to prevent services that require network
|
---|
| 526 | connectivity from starting until <application>NetworkManager</application>
|
---|
| 527 | establishes a connection. To disable this behavior, run the following
|
---|
| 528 | command as the <systemitem class="username">root</systemitem> user:
|
---|
| 529 | </para>
|
---|
| 530 |
|
---|
| 531 | <screen role="root" revision="systemd"><userinput>systemctl disable NetworkManager-wait-online</userinput></screen>
|
---|
[2cd1071] | 532 |
|
---|
[d497e89] | 533 | </sect3>
|
---|
| 534 |
|
---|
| 535 | </sect2>
|
---|
| 536 |
|
---|
[e33ddee] | 537 | <sect2 role="content">
|
---|
| 538 | <title>Contents</title>
|
---|
| 539 |
|
---|
| 540 | <segmentedlist>
|
---|
| 541 | <segtitle>Installed Programs</segtitle>
|
---|
| 542 | <segtitle>Installed Libraries</segtitle>
|
---|
| 543 | <segtitle>Installed Directories</segtitle>
|
---|
| 544 |
|
---|
| 545 | <seglistitem>
|
---|
[d497e89] | 546 | <seg>
|
---|
[8c7390c] | 547 | NetworkManager, nmcli, nm-online, nmtui, and, symlinked to nmtui:
|
---|
| 548 | nmtui-connect, nmtui-edit, and nmtui-hostname
|
---|
[d497e89] | 549 | </seg>
|
---|
| 550 | <seg>
|
---|
[b9f17a8] | 551 | libnm.so
|
---|
[52c95143] | 552 | and several modules under /usr/lib/NetworkManager
|
---|
[d497e89] | 553 | </seg>
|
---|
| 554 | <seg>
|
---|
[5aa7dce] | 555 | /etc/NetworkManager,
|
---|
[05a433b] | 556 | /usr/include/libnm,
|
---|
[5aa7dce] | 557 | /usr/lib/NetworkManager,
|
---|
| 558 | /usr/share/doc/NetworkManager-&NetworkManager-version;,
|
---|
[b9f17a8] | 559 | /usr/share/gtk-doc/html/{libnm,NetworkManager}
|
---|
| 560 | (if the documentation is built),
|
---|
[5aa7dce] | 561 | and
|
---|
[262a108] | 562 | /var/lib/NetworkManager
|
---|
[d497e89] | 563 | </seg>
|
---|
[e33ddee] | 564 | </seglistitem>
|
---|
| 565 | </segmentedlist>
|
---|
| 566 |
|
---|
| 567 | <variablelist>
|
---|
| 568 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 569 | <?dbfo list-presentation="list"?>
|
---|
| 570 | <?dbhtml list-presentation="table"?>
|
---|
| 571 |
|
---|
[d497e89] | 572 | <varlistentry id="nmcli">
|
---|
| 573 | <term><command>nmcli</command></term>
|
---|
[e33ddee] | 574 | <listitem>
|
---|
[7ded7e3] | 575 | <para>
|
---|
| 576 | is a command-line tool for controlling
|
---|
[0d7900a] | 577 | <application>NetworkManager</application>
|
---|
[4c24eb0a] | 578 | and getting its status
|
---|
[7ded7e3] | 579 | </para>
|
---|
[d497e89] | 580 | <indexterm zone="NetworkManager nmcli">
|
---|
| 581 | <primary sortas="b-nmcli">nmcli</primary>
|
---|
[e33ddee] | 582 | </indexterm>
|
---|
| 583 | </listitem>
|
---|
| 584 | </varlistentry>
|
---|
| 585 |
|
---|
| 586 | <varlistentry id="nm-online">
|
---|
| 587 | <term><command>nm-online</command></term>
|
---|
| 588 | <listitem>
|
---|
[7ded7e3] | 589 | <para>
|
---|
[4c24eb0a] | 590 | is an utility to determine whether you are online
|
---|
[7ded7e3] | 591 | </para>
|
---|
[e33ddee] | 592 | <indexterm zone="NetworkManager nm-online">
|
---|
| 593 | <primary sortas="b-nm-online">nm-online</primary>
|
---|
| 594 | </indexterm>
|
---|
| 595 | </listitem>
|
---|
| 596 | </varlistentry>
|
---|
| 597 |
|
---|
[acb3e9f] | 598 | <varlistentry id="nmtui">
|
---|
| 599 | <term><command>nmtui</command></term>
|
---|
| 600 | <listitem>
|
---|
| 601 | <para>
|
---|
[21d18f7e] | 602 | is an interactive ncurses-based user interface for
|
---|
[4c24eb0a] | 603 | <application>nmcli</application>
|
---|
[acb3e9f] | 604 | </para>
|
---|
| 605 | <indexterm zone="NetworkManager nmtui">
|
---|
| 606 | <primary sortas="b-nmtui">nmtui</primary>
|
---|
| 607 | </indexterm>
|
---|
| 608 | </listitem>
|
---|
| 609 | </varlistentry>
|
---|
| 610 |
|
---|
| 611 | <varlistentry id="nmtui-connect">
|
---|
| 612 | <term><command>nmtui-connect</command></term>
|
---|
| 613 | <listitem>
|
---|
| 614 | <para>
|
---|
[21d18f7e] | 615 | is an interactive ncurses-based user interface to
|
---|
[4c24eb0a] | 616 | activate/deactivate connections
|
---|
[acb3e9f] | 617 | </para>
|
---|
| 618 | <indexterm zone="NetworkManager nmtui-connect">
|
---|
| 619 | <primary sortas="b-nmtui-connect">nmtui-connect</primary>
|
---|
| 620 | </indexterm>
|
---|
| 621 | </listitem>
|
---|
| 622 | </varlistentry>
|
---|
| 623 |
|
---|
| 624 | <varlistentry id="nmtui-edit">
|
---|
| 625 | <term><command>nmtui-edit</command></term>
|
---|
| 626 | <listitem>
|
---|
| 627 | <para>
|
---|
[4c24eb0a] | 628 | is an interactive ncurses-based user interface to edit connections
|
---|
[acb3e9f] | 629 | </para>
|
---|
| 630 | <indexterm zone="NetworkManager nmtui-edit">
|
---|
| 631 | <primary sortas="b-nmtui-edit">nmtui-edit</primary>
|
---|
| 632 | </indexterm>
|
---|
| 633 | </listitem>
|
---|
| 634 | </varlistentry>
|
---|
| 635 |
|
---|
| 636 | <varlistentry id="nmtui-hostname">
|
---|
| 637 | <term><command>nmtui-hostname</command></term>
|
---|
[e33ddee] | 638 | <listitem>
|
---|
[7ded7e3] | 639 | <para>
|
---|
[4c24eb0a] | 640 | is an interactive ncurses-based user interface to edit the hostname
|
---|
[7ded7e3] | 641 | </para>
|
---|
[acb3e9f] | 642 | <indexterm zone="NetworkManager nmtui-hostname">
|
---|
| 643 | <primary sortas="b-nmtui-hostname">nmtui-hostname</primary>
|
---|
[e33ddee] | 644 | </indexterm>
|
---|
| 645 | </listitem>
|
---|
| 646 | </varlistentry>
|
---|
| 647 |
|
---|
[d497e89] | 648 | <varlistentry id="NetworkManager-prog">
|
---|
| 649 | <term><command>NetworkManager</command></term>
|
---|
[e33ddee] | 650 | <listitem>
|
---|
[7ded7e3] | 651 | <para>
|
---|
[4c24eb0a] | 652 | is the network management daemon
|
---|
[7ded7e3] | 653 | </para>
|
---|
[d497e89] | 654 | <indexterm zone="NetworkManager NetworkManager-prog">
|
---|
[7ded7e3] | 655 | <primary sortas="b-NetworkManager">NetworkManager</primary>
|
---|
[e33ddee] | 656 | </indexterm>
|
---|
| 657 | </listitem>
|
---|
| 658 | </varlistentry>
|
---|
| 659 |
|
---|
[262a108] | 660 | <varlistentry id="libnm">
|
---|
| 661 | <term><filename class="libraryfile">libnm.so</filename></term>
|
---|
[e33ddee] | 662 | <listitem>
|
---|
[7ded7e3] | 663 | <para>
|
---|
[4c24eb0a] | 664 | contains functions used by <application>NetworkManager</application>
|
---|
[7ded7e3] | 665 | </para>
|
---|
[262a108] | 666 | <indexterm zone="NetworkManager libnm">
|
---|
| 667 | <primary sortas="c-libnm">libnm.so</primary>
|
---|
[e33ddee] | 668 | </indexterm>
|
---|
| 669 | </listitem>
|
---|
| 670 | </varlistentry>
|
---|
| 671 | </variablelist>
|
---|
| 672 |
|
---|
| 673 | </sect2>
|
---|
| 674 |
|
---|
| 675 | </sect1>
|
---|