[ab4fdfc] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[e33ddee] | 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 " ">
|
---|
[9dc6fdb] | 10 | <!ENTITY NetworkManager-md5sum "0594a237e7182341dd39cf465b1b60fe">
|
---|
| 11 | <!ENTITY NetworkManager-size "6.7 MB">
|
---|
| 12 | <!ENTITY NetworkManager-buildsize "936 MB (with tests and documentation)">
|
---|
| 13 | <!ENTITY NetworkManager-time "0.8 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 |
|
---|
[f67c5c8] | 38 | &lfs121_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">
|
---|
[d267a13] | 86 | <xref linkend="libndp"/>
|
---|
[d497e89] | 87 | </para>
|
---|
| 88 |
|
---|
| 89 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 90 | <para role="recommended">
|
---|
[c4ae27ab] | 91 | <xref linkend="curl"/>,
|
---|
[e4c821e2] | 92 | <xref linkend="dhcpcd"/>,
|
---|
[4b3c4b2] | 93 | <xref linkend="gobject-introspection"/>,
|
---|
[b7d1d2b] | 94 | <xref linkend="iptables"/>,
|
---|
[7b231190] | 95 | <xref linkend="libpsl"/>,
|
---|
[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"/>,
|
---|
[76133fbd] | 113 | <xref linkend="jansson"/>,
|
---|
| 114 | <xref linkend="ModemManager"/>,
|
---|
[e440af5] | 115 | (<xref linkend="qt5"/> or
|
---|
[b3867c5] | 116 | <xref role="node" linkend="qt5-components"/> with qtdoc) (for examples),
|
---|
[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 | -Dnmtui=true \
|
---|
| 205 | -Dovs=false \
|
---|
| 206 | -Dppp=false \
|
---|
[d267a13] | 207 | -Dselinux=false \
|
---|
[51dfb3e] | 208 | -Dsession_tracking=elogind \
|
---|
[39100371] | 209 | -Dmodem_manager=false \
|
---|
[d267a13] | 210 | -Dsystemdsystemunitdir=no \
|
---|
| 211 | -Dsystemd_journal=false \
|
---|
[91318eb] | 212 | -Dqt=false &&
|
---|
[d267a13] | 213 | ninja</userinput></screen>
|
---|
| 214 |
|
---|
| 215 | <screen revision="systemd"><userinput>mkdir build &&
|
---|
[7d07abd] | 216 | cd build &&
|
---|
[d267a13] | 217 |
|
---|
| 218 | CXXFLAGS+="-O2 -fPIC" \
|
---|
[91318eb] | 219 | meson setup .. \
|
---|
[4b6e2b2] | 220 | --prefix=/usr \
|
---|
[adf17153] | 221 | --buildtype=release \
|
---|
[d267a13] | 222 | -Dlibaudit=no \
|
---|
[39100371] | 223 | -Dnmtui=true \
|
---|
| 224 | -Dovs=false \
|
---|
| 225 | -Dppp=false \
|
---|
[d267a13] | 226 | -Dselinux=false \
|
---|
| 227 | -Dqt=false \
|
---|
| 228 | -Dsession_tracking=systemd \
|
---|
[91318eb] | 229 | -Dmodem_manager=false &&
|
---|
[d267a13] | 230 | ninja</userinput></screen>
|
---|
[cec6657e] | 231 |
|
---|
[7ded7e3] | 232 | <para>
|
---|
[0bfaca0] | 233 | An already active graphical session with a bus address is necessary
|
---|
| 234 | to run the tests. To test the results, issue
|
---|
| 235 | <command>ninja test</command>.
|
---|
[fc88f1f] | 236 | </para>
|
---|
| 237 |
|
---|
| 238 | <para>
|
---|
| 239 | A few tests may fail, depending on enabled kernel options.
|
---|
[7ded7e3] | 240 | </para>
|
---|
[e33ddee] | 241 |
|
---|
[7ded7e3] | 242 | <para>
|
---|
| 243 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 244 | </para>
|
---|
[e33ddee] | 245 |
|
---|
[d267a13] | 246 | <screen role="root"><userinput>ninja install &&
|
---|
| 247 | mv -v /usr/share/doc/NetworkManager{,-&NetworkManager-version;}</userinput></screen>
|
---|
[e33ddee] | 248 |
|
---|
[4d6a0e2] | 249 | <para>
|
---|
| 250 | If you have not passed the <option>-Ddocs=true</option> option to
|
---|
| 251 | <command>meson</command>, you can install the pregenerated manual pages
|
---|
| 252 | with (as the &root; user):
|
---|
| 253 | </para>
|
---|
| 254 |
|
---|
| 255 | <screen role="root"><userinput>for file in $(echo ../man/*.[1578]); do
|
---|
| 256 | section=${file##*.} &&
|
---|
| 257 | install -vdm 755 /usr/share/man/man$section
|
---|
| 258 | install -vm 644 $file /usr/share/man/man$section/
|
---|
| 259 | done</userinput></screen>
|
---|
| 260 |
|
---|
| 261 | <para>
|
---|
[17746cc] | 262 | If you have not used <option>-Ddocs=true</option>, the
|
---|
[4d6a0e2] | 263 | pregenerated HTML documentation can also be installed with (as
|
---|
| 264 | the &root; user):
|
---|
| 265 | </para>
|
---|
| 266 |
|
---|
| 267 | <screen role="root"
|
---|
| 268 | remap="doc"><userinput>cp -Rv ../docs/{api,libnm} /usr/share/doc/NetworkManager-&NetworkManager-version;</userinput></screen>
|
---|
| 269 |
|
---|
[e33ddee] | 270 | </sect2>
|
---|
| 271 |
|
---|
| 272 | <sect2 role="commands">
|
---|
| 273 | <title>Command Explanations</title>
|
---|
| 274 |
|
---|
[e4d2b8d] | 275 | <para>
|
---|
[8558044] | 276 | <envar>CXXFLAGS="-O2 -fPIC"</envar>: These compiler options are
|
---|
[e4d2b8d] | 277 | necessary to build the Qt5 based examples.
|
---|
| 278 | </para>
|
---|
| 279 |
|
---|
[adf17153] | 280 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 281 | href="../../xincludes/meson-buildtype-release.xml"/>
|
---|
| 282 |
|
---|
[e64cabd] | 283 | <para>
|
---|
[fdbfe39] | 284 | <option>-Ddocs=true</option>: Use this switch to enable building
|
---|
[39100371] | 285 | man pages and documentation if <xref linkend="gtk-doc"/> is installed.
|
---|
[e64cabd] | 286 | </para>
|
---|
| 287 |
|
---|
[7ded7e3] | 288 | <para>
|
---|
[17746cc] | 289 | <parameter>-Dnmtui=true</parameter>: This switch enables building
|
---|
[acb3e9f] | 290 | <command>nmtui</command>.
|
---|
| 291 | </para>
|
---|
| 292 |
|
---|
[d267a13] | 293 | <para revision="sysv">
|
---|
[51dfb3e] | 294 | <parameter>-Dsystemdsystemunitdir=no</parameter> and
|
---|
[d267a13] | 295 | <parameter>-Dsystemd_journal=false</parameter>: systemd is not
|
---|
[17746cc] | 296 | used for sysv init systems, so prevent installing units and using the
|
---|
| 297 | systemd journal.
|
---|
[d267a13] | 298 | </para>
|
---|
| 299 |
|
---|
[39100371] | 300 | <para>
|
---|
[76133fbd] | 301 | <parameter>-Dovs=false</parameter>: This switch disable the Open
|
---|
| 302 | vSwitch integration because it needs <xref linkend='jansson'/>.
|
---|
| 303 | Remove it if you have <xref linkend='jansson'/> installed on your
|
---|
| 304 | system.
|
---|
[39100371] | 305 | </para>
|
---|
[8558044] | 306 |
|
---|
[f759a25] | 307 | <para>
|
---|
[2c87187] | 308 | <parameter>-Dmodem_manager=false</parameter>: This switch is required if
|
---|
[17746cc] | 309 | <application>ModemManager</application> is not installed. Omit this switch
|
---|
| 310 | if you have built <application>ModemManager</application> and
|
---|
[a406810] | 311 | <application>mobile-broadband-provider-info</application>.
|
---|
[39100371] | 312 | </para>
|
---|
| 313 |
|
---|
[51dfb3e] | 314 | <para revision="sysv">
|
---|
| 315 | <parameter>-Dsession_tracking=elogind</parameter>: This switch
|
---|
| 316 | is used to set <command>elogind</command> as the default
|
---|
| 317 | program for session tracking.
|
---|
| 318 | </para>
|
---|
| 319 |
|
---|
[cec6657e] | 320 | <para revision="systemd">
|
---|
[d267a13] | 321 | <parameter>-Dsession_tracking=systemd</parameter>: This switch
|
---|
[cec6657e] | 322 | is used to set <command>systemd-logind</command> as the default
|
---|
| 323 | program for session tracking.
|
---|
| 324 | </para>
|
---|
[875b3b57] | 325 | <!-- not in instrucitons anymore
|
---|
[cec6657e] | 326 | <para revision="systemd">
|
---|
[d267a13] | 327 | <parameter>-Dsystemdsystemunitdir=/lib/systemd/system</parameter>:
|
---|
[cec6657e] | 328 | This switch is used to set the correct installation directory for
|
---|
| 329 | systemd units.
|
---|
| 330 | </para>
|
---|
[875b3b57] | 331 | -->
|
---|
[acb3e9f] | 332 | <para>
|
---|
[17746cc] | 333 | <parameter>-Dppp=false</parameter>: This switch disables
|
---|
[6e1616e2] | 334 | <application>PPP</application> support in
|
---|
[17746cc] | 335 | <application>NetworkManager</application> since the programs necessary
|
---|
| 336 | for it are not installed. Remove this switch if you need PPP support and
|
---|
| 337 | have <application>PPP</application> installed.
|
---|
[7ded7e3] | 338 | </para>
|
---|
[e33ddee] | 339 |
|
---|
[8c7390c] | 340 | <para>
|
---|
[d267a13] | 341 | <parameter>-Dlibaudit=no</parameter> and
|
---|
[17746cc] | 342 | <parameter>-Dselinux=false</parameter>: This switch disables support for
|
---|
| 343 | libaudit and SELinux since they are not used in BLFS.
|
---|
[d6e164b] | 344 | </para>
|
---|
[e33ddee] | 345 |
|
---|
[b528d0f4] | 346 | <para>
|
---|
[17746cc] | 347 | <parameter>-Dqt=false</parameter>: This switch disables the
|
---|
| 348 | <application>Qt</application> examples. Omit if you have
|
---|
| 349 | <application>Qt</application> available and wish to install the examples.
|
---|
[b528d0f4] | 350 | </para>
|
---|
| 351 |
|
---|
[261fdeb] | 352 | <para>
|
---|
| 353 | <option>-Dcrypto=gnutls</option>: Use this switch if you have GnuTLS
|
---|
| 354 | installed and want to use it for certificate and key operations in
|
---|
| 355 | NetworkManager, instead of using NSS (the default).
|
---|
| 356 | </para>
|
---|
| 357 |
|
---|
| 358 | <para>
|
---|
| 359 | <option>-Dcrypto=null</option>: Use this switch if neither NSS nor
|
---|
| 360 | GnuTLS is installed but you want to build NetworkManager anyway. This
|
---|
| 361 | switch will make NetworkManager lack some features (for example
|
---|
| 362 | 802.1X).
|
---|
| 363 | </para>
|
---|
| 364 |
|
---|
[c2ba57e] | 365 | <para>
|
---|
| 366 | <option>-Dsuspend_resume=upower</option>: Use this switch if
|
---|
| 367 | you have <xref linkend='upower'/> installed and want to use it
|
---|
| 368 | (instead of &logind;) for suspend and resume support.
|
---|
| 369 | </para>
|
---|
[e33ddee] | 370 | </sect2>
|
---|
| 371 |
|
---|
[d497e89] | 372 | <sect2 role="configuration">
|
---|
| 373 | <title>Configuring NetworkManager</title>
|
---|
| 374 |
|
---|
| 375 | <sect3 id="NetworkManager-config">
|
---|
| 376 | <title>Config Files</title>
|
---|
| 377 | <para>
|
---|
| 378 | <filename>/etc/NetworkManager/NetworkManager.conf</filename>
|
---|
| 379 | </para>
|
---|
| 380 |
|
---|
| 381 | <indexterm zone="NetworkManager NetworkManager-config">
|
---|
| 382 | <primary
|
---|
| 383 | sortas="e-etc-NetworkManager-NetworkManager.conf">
|
---|
| 384 | /etc/NetworkManager/NetworkManager.conf</primary>
|
---|
| 385 | </indexterm>
|
---|
| 386 |
|
---|
| 387 | </sect3>
|
---|
| 388 |
|
---|
| 389 | <sect3><title>Configuration Information</title>
|
---|
| 390 |
|
---|
| 391 | <para>
|
---|
| 392 | For <application>NetworkManager</application> to work, at least
|
---|
[21d18f7e] | 393 | a minimal configuration file must be present. Such a file is not
|
---|
[8df33ae3] | 394 | installed with <command>make install</command>. Issue the following
|
---|
| 395 | command as the <systemitem class="username">root</systemitem> user to
|
---|
[21d18f7e] | 396 | create a minimal <filename>NetworkManager.conf</filename> file:
|
---|
[d497e89] | 397 | </para>
|
---|
| 398 |
|
---|
| 399 | <screen role="root"><userinput>cat >> /etc/NetworkManager/NetworkManager.conf << "EOF"
|
---|
| 400 | <literal>[main]
|
---|
| 401 | plugins=keyfile</literal>
|
---|
| 402 | EOF</userinput></screen>
|
---|
| 403 |
|
---|
| 404 | <para>
|
---|
[7fd06b0] | 405 | This file should not be modified directly by users of the system.
|
---|
| 406 | Instead, system specific changes should be made using configuration
|
---|
| 407 | files in the
|
---|
| 408 | <filename class="directory">/etc/NetworkManager/conf.d</filename>
|
---|
[21d18f7e] | 409 | directory.
|
---|
[7fd06b0] | 410 | </para>
|
---|
| 411 |
|
---|
| 412 | <para>
|
---|
| 413 | To allow polkit to manage authorizations, add the following
|
---|
| 414 | configuration file:
|
---|
| 415 | </para>
|
---|
| 416 |
|
---|
| 417 | <screen role="root"><userinput>cat > /etc/NetworkManager/conf.d/polkit.conf << "EOF"
|
---|
| 418 | <literal>[main]
|
---|
| 419 | auth-polkit=true</literal>
|
---|
| 420 | EOF</userinput></screen>
|
---|
| 421 |
|
---|
| 422 | <para>
|
---|
| 423 | To use something other than the built-in dhcp client (recommended if
|
---|
| 424 | using only <command>nmcli</command>), use the following configuration
|
---|
[194d47b] | 425 | (valid values include either dhcpcd or internal):
|
---|
[7fd06b0] | 426 | </para>
|
---|
| 427 |
|
---|
| 428 | <screen role="nodump"><userinput>cat > /etc/NetworkManager/conf.d/dhcp.conf << "EOF"
|
---|
| 429 | <literal>[main]
|
---|
[194d47b] | 430 | dhcp=</literal><replaceable>dhcpcd</replaceable>
|
---|
[7fd06b0] | 431 | EOF</userinput></screen>
|
---|
| 432 |
|
---|
| 433 | <para>
|
---|
| 434 | To prevent <application>NetworkManager</application> from updating the
|
---|
| 435 | <filename>/etc/resolv.conf</filename> file, add the following
|
---|
| 436 | configuration file:
|
---|
| 437 | </para>
|
---|
| 438 |
|
---|
| 439 | <screen role="nodump"><userinput>cat > /etc/NetworkManager/conf.d/no-dns-update.conf << "EOF"
|
---|
| 440 | <literal>[main]
|
---|
| 441 | dns=none</literal>
|
---|
| 442 | EOF</userinput></screen>
|
---|
| 443 |
|
---|
| 444 | <para>
|
---|
[5f729f8] | 445 | For additional configuration options, see
|
---|
[7fd06b0] | 446 | <command>man 5 NetworkManager.conf</command>.
|
---|
[0d7900a] | 447 | </para>
|
---|
[d497e89] | 448 |
|
---|
[8df33ae3] | 449 | <para>
|
---|
[21d18f7e] | 450 | To allow regular users to configure network connections,
|
---|
[8df33ae3] | 451 | you should add them to the
|
---|
| 452 | <systemitem class="groupname">netdev</systemitem>
|
---|
| 453 | group, and create a <application>polkit</application> rule that grants
|
---|
| 454 | access. Run the following commands as the
|
---|
| 455 | <systemitem class="username">root</systemitem> user:
|
---|
| 456 | </para>
|
---|
| 457 |
|
---|
[a581662] | 458 | <screen role="root"><userinput>groupadd -fg 86 netdev &&
|
---|
[b88584a] | 459 | /usr/sbin/usermod -a -G netdev <replaceable><username></replaceable>
|
---|
[8df33ae3] | 460 |
|
---|
| 461 | cat > /usr/share/polkit-1/rules.d/org.freedesktop.NetworkManager.rules << "EOF"
|
---|
| 462 | <literal>polkit.addRule(function(action, subject) {
|
---|
| 463 | if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 && subject.isInGroup("netdev")) {
|
---|
| 464 | return polkit.Result.YES;
|
---|
| 465 | }
|
---|
| 466 | });</literal>
|
---|
| 467 | EOF</userinput></screen>
|
---|
| 468 |
|
---|
[d497e89] | 469 | </sect3>
|
---|
| 470 |
|
---|
| 471 | <sect3 id="NetworkManager-init">
|
---|
[cec6657e] | 472 | <title><phrase revision="sysv">Boot Script</phrase>
|
---|
| 473 | <phrase revision="systemd">Systemd Unit</phrase></title>
|
---|
| 474 |
|
---|
| 475 | <para revision="sysv">
|
---|
| 476 | To automatically start the <command>NetworkManager</command> daemon
|
---|
| 477 | when the system is rebooted, install the
|
---|
[8558044] | 478 | <filename>/etc/rc.d/init.d/networkmanager</filename>bootscript from the
|
---|
[cec6657e] | 479 | <xref linkend="bootscripts"/> package.
|
---|
| 480 | </para>
|
---|
[d497e89] | 481 |
|
---|
[cec6657e] | 482 | <para revision="systemd">
|
---|
| 483 | To start the <command>NetworkManager</command> daemon at boot, enable
|
---|
| 484 | the previously installed systemd unit by running the following command
|
---|
| 485 | as the <systemitem class="username">root</systemitem> user:
|
---|
[d497e89] | 486 | </para>
|
---|
| 487 |
|
---|
[8df33ae3] | 488 | <note>
|
---|
| 489 | <para>
|
---|
| 490 | If using <application>Network Manager</application> to manage
|
---|
| 491 | an interface, any previous configuration for that interface should be
|
---|
| 492 | removed, and the interface brought down prior to starting
|
---|
| 493 | <application>Network Manager</application>.
|
---|
| 494 | </para>
|
---|
| 495 | </note>
|
---|
[8558044] | 496 |
|
---|
[d497e89] | 497 | <indexterm zone="NetworkManager NetworkManager-init">
|
---|
| 498 | <primary sortas="f-NetworkManager">NetworkManager</primary>
|
---|
| 499 | </indexterm>
|
---|
| 500 |
|
---|
[cec6657e] | 501 | <screen role="root" revision="sysv"><userinput>make install-networkmanager</userinput></screen>
|
---|
| 502 |
|
---|
| 503 | <screen role="root" revision="systemd"><userinput>systemctl enable NetworkManager</userinput></screen>
|
---|
[e2a1442] | 504 | <!-- The below instruction is obsolete. NetworkManager-wait-online is now
|
---|
| 505 | enabled by default when enabling NetworkManager. -->
|
---|
| 506 | <!--
|
---|
[cec6657e] | 507 | <para revision="systemd">
|
---|
| 508 | <application>NetworkManager</application> also ships a systemd unit
|
---|
| 509 | called <filename>NetworkManager-wait-online.service</filename> which
|
---|
| 510 | can be used to prevent services that require network connectivity
|
---|
| 511 | from starting until <application>NetworkManager</application> has
|
---|
| 512 | established the connection. To enable it, run the following command
|
---|
| 513 | as the <systemitem class="username">root</systemitem> user:
|
---|
| 514 | </para>
|
---|
| 515 |
|
---|
| 516 | <screen role="root" revision="systemd"><userinput>systemctl enable NetworkManager-wait-online</userinput></screen>
|
---|
[e2a1442] | 517 | -->
|
---|
| 518 | <!-- As such, let's now provide instructions on how to disable that
|
---|
| 519 | behavior, for those who wish to do so. -->
|
---|
| 520 | <para revision="systemd">
|
---|
| 521 | Starting in version 1.11.2 of <application>NetworkManager</application>,
|
---|
| 522 | a systemd unit named <filename>NetworkManager-wait-online.service</filename>
|
---|
| 523 | is enabled, which is used to prevent services that require network
|
---|
| 524 | connectivity from starting until <application>NetworkManager</application>
|
---|
| 525 | establishes a connection. To disable this behavior, run the following
|
---|
| 526 | command as the <systemitem class="username">root</systemitem> user:
|
---|
| 527 | </para>
|
---|
| 528 |
|
---|
| 529 | <screen role="root" revision="systemd"><userinput>systemctl disable NetworkManager-wait-online</userinput></screen>
|
---|
[2cd1071] | 530 |
|
---|
[d497e89] | 531 | </sect3>
|
---|
| 532 |
|
---|
| 533 | </sect2>
|
---|
| 534 |
|
---|
[e33ddee] | 535 | <sect2 role="content">
|
---|
| 536 | <title>Contents</title>
|
---|
| 537 |
|
---|
| 538 | <segmentedlist>
|
---|
| 539 | <segtitle>Installed Programs</segtitle>
|
---|
| 540 | <segtitle>Installed Libraries</segtitle>
|
---|
| 541 | <segtitle>Installed Directories</segtitle>
|
---|
| 542 |
|
---|
| 543 | <seglistitem>
|
---|
[d497e89] | 544 | <seg>
|
---|
[8c7390c] | 545 | NetworkManager, nmcli, nm-online, nmtui, and, symlinked to nmtui:
|
---|
| 546 | nmtui-connect, nmtui-edit, and nmtui-hostname
|
---|
[d497e89] | 547 | </seg>
|
---|
| 548 | <seg>
|
---|
[b9f17a8] | 549 | libnm.so
|
---|
[52c95143] | 550 | and several modules under /usr/lib/NetworkManager
|
---|
[d497e89] | 551 | </seg>
|
---|
| 552 | <seg>
|
---|
[5aa7dce] | 553 | /etc/NetworkManager,
|
---|
[05a433b] | 554 | /usr/include/libnm,
|
---|
[5aa7dce] | 555 | /usr/lib/NetworkManager,
|
---|
| 556 | /usr/share/doc/NetworkManager-&NetworkManager-version;,
|
---|
[b9f17a8] | 557 | /usr/share/gtk-doc/html/{libnm,NetworkManager}
|
---|
| 558 | (if the documentation is built),
|
---|
[5aa7dce] | 559 | and
|
---|
[262a108] | 560 | /var/lib/NetworkManager
|
---|
[d497e89] | 561 | </seg>
|
---|
[e33ddee] | 562 | </seglistitem>
|
---|
| 563 | </segmentedlist>
|
---|
| 564 |
|
---|
| 565 | <variablelist>
|
---|
| 566 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 567 | <?dbfo list-presentation="list"?>
|
---|
| 568 | <?dbhtml list-presentation="table"?>
|
---|
| 569 |
|
---|
[d497e89] | 570 | <varlistentry id="nmcli">
|
---|
| 571 | <term><command>nmcli</command></term>
|
---|
[e33ddee] | 572 | <listitem>
|
---|
[7ded7e3] | 573 | <para>
|
---|
| 574 | is a command-line tool for controlling
|
---|
[0d7900a] | 575 | <application>NetworkManager</application>
|
---|
[4c24eb0a] | 576 | and getting its status
|
---|
[7ded7e3] | 577 | </para>
|
---|
[d497e89] | 578 | <indexterm zone="NetworkManager nmcli">
|
---|
| 579 | <primary sortas="b-nmcli">nmcli</primary>
|
---|
[e33ddee] | 580 | </indexterm>
|
---|
| 581 | </listitem>
|
---|
| 582 | </varlistentry>
|
---|
| 583 |
|
---|
| 584 | <varlistentry id="nm-online">
|
---|
| 585 | <term><command>nm-online</command></term>
|
---|
| 586 | <listitem>
|
---|
[7ded7e3] | 587 | <para>
|
---|
[4c24eb0a] | 588 | is an utility to determine whether you are online
|
---|
[7ded7e3] | 589 | </para>
|
---|
[e33ddee] | 590 | <indexterm zone="NetworkManager nm-online">
|
---|
| 591 | <primary sortas="b-nm-online">nm-online</primary>
|
---|
| 592 | </indexterm>
|
---|
| 593 | </listitem>
|
---|
| 594 | </varlistentry>
|
---|
| 595 |
|
---|
[acb3e9f] | 596 | <varlistentry id="nmtui">
|
---|
| 597 | <term><command>nmtui</command></term>
|
---|
| 598 | <listitem>
|
---|
| 599 | <para>
|
---|
[21d18f7e] | 600 | is an interactive ncurses-based user interface for
|
---|
[4c24eb0a] | 601 | <application>nmcli</application>
|
---|
[acb3e9f] | 602 | </para>
|
---|
| 603 | <indexterm zone="NetworkManager nmtui">
|
---|
| 604 | <primary sortas="b-nmtui">nmtui</primary>
|
---|
| 605 | </indexterm>
|
---|
| 606 | </listitem>
|
---|
| 607 | </varlistentry>
|
---|
| 608 |
|
---|
| 609 | <varlistentry id="nmtui-connect">
|
---|
| 610 | <term><command>nmtui-connect</command></term>
|
---|
| 611 | <listitem>
|
---|
| 612 | <para>
|
---|
[21d18f7e] | 613 | is an interactive ncurses-based user interface to
|
---|
[4c24eb0a] | 614 | activate/deactivate connections
|
---|
[acb3e9f] | 615 | </para>
|
---|
| 616 | <indexterm zone="NetworkManager nmtui-connect">
|
---|
| 617 | <primary sortas="b-nmtui-connect">nmtui-connect</primary>
|
---|
| 618 | </indexterm>
|
---|
| 619 | </listitem>
|
---|
| 620 | </varlistentry>
|
---|
| 621 |
|
---|
| 622 | <varlistentry id="nmtui-edit">
|
---|
| 623 | <term><command>nmtui-edit</command></term>
|
---|
| 624 | <listitem>
|
---|
| 625 | <para>
|
---|
[4c24eb0a] | 626 | is an interactive ncurses-based user interface to edit connections
|
---|
[acb3e9f] | 627 | </para>
|
---|
| 628 | <indexterm zone="NetworkManager nmtui-edit">
|
---|
| 629 | <primary sortas="b-nmtui-edit">nmtui-edit</primary>
|
---|
| 630 | </indexterm>
|
---|
| 631 | </listitem>
|
---|
| 632 | </varlistentry>
|
---|
| 633 |
|
---|
| 634 | <varlistentry id="nmtui-hostname">
|
---|
| 635 | <term><command>nmtui-hostname</command></term>
|
---|
[e33ddee] | 636 | <listitem>
|
---|
[7ded7e3] | 637 | <para>
|
---|
[4c24eb0a] | 638 | is an interactive ncurses-based user interface to edit the hostname
|
---|
[7ded7e3] | 639 | </para>
|
---|
[acb3e9f] | 640 | <indexterm zone="NetworkManager nmtui-hostname">
|
---|
| 641 | <primary sortas="b-nmtui-hostname">nmtui-hostname</primary>
|
---|
[e33ddee] | 642 | </indexterm>
|
---|
| 643 | </listitem>
|
---|
| 644 | </varlistentry>
|
---|
| 645 |
|
---|
[d497e89] | 646 | <varlistentry id="NetworkManager-prog">
|
---|
| 647 | <term><command>NetworkManager</command></term>
|
---|
[e33ddee] | 648 | <listitem>
|
---|
[7ded7e3] | 649 | <para>
|
---|
[4c24eb0a] | 650 | is the network management daemon
|
---|
[7ded7e3] | 651 | </para>
|
---|
[d497e89] | 652 | <indexterm zone="NetworkManager NetworkManager-prog">
|
---|
[7ded7e3] | 653 | <primary sortas="b-NetworkManager">NetworkManager</primary>
|
---|
[e33ddee] | 654 | </indexterm>
|
---|
| 655 | </listitem>
|
---|
| 656 | </varlistentry>
|
---|
| 657 |
|
---|
[262a108] | 658 | <varlistentry id="libnm">
|
---|
| 659 | <term><filename class="libraryfile">libnm.so</filename></term>
|
---|
[e33ddee] | 660 | <listitem>
|
---|
[7ded7e3] | 661 | <para>
|
---|
[4c24eb0a] | 662 | contains functions used by <application>NetworkManager</application>
|
---|
[7ded7e3] | 663 | </para>
|
---|
[262a108] | 664 | <indexterm zone="NetworkManager libnm">
|
---|
| 665 | <primary sortas="c-libnm">libnm.so</primary>
|
---|
[e33ddee] | 666 | </indexterm>
|
---|
| 667 | </listitem>
|
---|
| 668 | </varlistentry>
|
---|
| 669 | </variablelist>
|
---|
| 670 |
|
---|
| 671 | </sect2>
|
---|
| 672 |
|
---|
| 673 | </sect1>
|
---|