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