source: networking/netutils/networkmanager.xml@ 13b116c

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 13b116c was 13b116c, checked in by Douglas R. Reno <renodr@…>, 4 years ago

Update to NetworkManager-1.20.8. Also added kernel configuration and additional test information.

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

  • Property mode set to 100644
File size: 22.2 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY NetworkManager-download-http
8 "&gnome-download-http;/NetworkManager/1.20/NetworkManager-&NetworkManager-version;.tar.xz">
9 <!ENTITY NetworkManager-download-ftp
10 "&gnome-download-ftp;/NetworkManager/1.20/NetworkManager-&NetworkManager-version;.tar.xz">
11 <!ENTITY NetworkManager-md5sum "c0ceb5ab14bfdfeee07536d94cc5c548">
12 <!ENTITY NetworkManager-size "4.5 MB">
13 <!ENTITY NetworkManager-buildsize "922 MB (with tests)">
14 <!ENTITY NetworkManager-time "0.9 SBU (with tests; both using parallelism=4)">
15]>
16
17<sect1 id="NetworkManager" xreflabel="NetworkManager-&NetworkManager-version;">
18 <?dbhtml filename="networkmanager.html"?>
19
20 <sect1info>
21 <othername>$LastChangedBy$</othername>
22 <date>$Date$</date>
23 </sect1info>
24
25 <title>NetworkManager-&NetworkManager-version;</title>
26
27 <indexterm zone="NetworkManager">
28 <primary sortas="a-NetworkManager">NetworkManager</primary>
29 </indexterm>
30
31 <sect2 role="package">
32 <title>Introduction to NetworkManager</title>
33
34 <para>
35 <application>NetworkManager</application> is a set of co-operative
36 tools that make networking simple and straightforward. Whether you use WiFi,
37 wired, 3G, or Bluetooth, NetworkManager allows you to quickly move from
38 one network to another: Once a network has been configured and joined
39 once, it can be detected and re-joined automatically the next time it's
40 available.
41 </para>
42
43 &lfs90_checked;
44
45 <note revision="systemd">
46 <para>
47 Make sure that you disable the <command>systemd-networkd</command>
48 service or configure it not to manage the interfaces you want to manage
49 with <application>NetworkManager</application>.
50 </para>
51 </note>
52
53 <bridgehead renderas="sect3">Package Information</bridgehead>
54 <itemizedlist spacing="compact">
55 <listitem>
56 <para>
57 Download (HTTP): <ulink url="&NetworkManager-download-http;"/>
58 </para>
59 </listitem>
60 <listitem>
61 <para>
62 Download (FTP): <ulink url="&NetworkManager-download-ftp;"/>
63 </para>
64 </listitem>
65 <listitem>
66 <para>
67 Download MD5 sum: &NetworkManager-md5sum;
68 </para>
69 </listitem>
70 <listitem>
71 <para>
72 Download size: &NetworkManager-size;
73 </para>
74 </listitem>
75 <listitem>
76 <para>
77 Estimated disk space required: &NetworkManager-buildsize;
78 </para>
79 </listitem>
80 <listitem>
81 <para>
82 Estimated build time: &NetworkManager-time;
83 </para>
84 </listitem>
85 </itemizedlist>
86
87 <bridgehead renderas="sect3">NetworkManager Dependencies</bridgehead>
88
89 <bridgehead renderas="sect4">Required</bridgehead>
90 <para role="required">
91 <xref linkend="dbus-glib"/> and
92 <xref linkend="libndp"/>
93 </para>
94
95 <bridgehead renderas="sect4">Recommended</bridgehead>
96 <para role="recommended">
97 <xref linkend="curl"/>,
98 <xref linkend="dhcpcd"/> or
99 <xref role="nodep" linkend="dhcp"/> (client only),
100 <xref linkend="gobject-introspection"/>,
101 <xref linkend="iptables"/>,
102 <xref linkend="jansson"/>,
103 <xref linkend="newt"/> (for <command>nmtui</command>),
104 <xref linkend="nss"/>,
105 <xref linkend="polkit"/>,
106 <xref linkend="pygobject3"/>,
107 <phrase revision="sysv"><xref linkend="elogind"/>,</phrase>
108 <phrase revision="systemd"><xref linkend="systemd"/>,</phrase>
109 <xref linkend="upower"/>,
110 <xref linkend="vala"/>, and
111 <xref linkend="wpa_supplicant"/> (built with D-Bus support),
112 </para>
113
114 <bridgehead renderas="sect4">Optional</bridgehead>
115 <para role="optional">
116 <xref linkend="bluez"/>,
117 <xref linkend="dbus-python"/> (for the test suite),
118 <xref linkend="gnutls"/> (used if <xref linkend="nss"/> is not found),
119 <xref linkend="gtk-doc"/>,
120 <xref linkend="libpsl"/>,
121 <xref linkend="qt5"/> (for examples),
122 <xref linkend="ModemManager"/>,
123 <xref linkend="valgrind"/>,
124 <ulink url="http://www.thekelleys.org.uk/dnsmasq/doc.html">dnsmasq</ulink>,
125 <ulink url="https://github.com/Distrotech/libaudit">libaudit</ulink>,
126 <ulink url="https://github.com/jpirko/libteam">libteam</ulink>,
127 <ulink url="https://www.samba.org/ftp/ppp/">PPP</ulink>, and
128 <ulink url="https://dianne.skoll.ca/projects/rp-pppoe/">RP-PPPoE</ulink>
129 </para>
130
131 <para condition="html" role="usernotes">User Notes:
132 <ulink url="&blfs-wiki;/NetworkManager"/>
133 </para>
134 </sect2>
135
136 <sect2 role="kernel" id="NetworkManager-kernel">
137 <title>Kernel Configuration</title>
138
139 <para>
140 If you wish to run the tests, enable the following options in the
141 kernel configuration and recompile the kernel if necessary:
142 </para>
143
144 <!-- Ethernet Teaming support is potentially optional, but I didn't
145 run the tests again to test that. It was needed to convince one of
146 the Linux Platform tests to move farther along because otherwise
147 RTNETLINK would respond with an Error 95 - unknown device type.
148 This would cause the test to fail early on in the process. -->
149
150<screen><literal>Device Drivers ---&gt;
151 [*] Network device support [CONFIG_NETDEVICES] ---&gt;
152 [*] Bonding driver support [CONFIG_BONDING]
153 [*] Dummy net driver support [CONFIG_DUMMY]
154 [*] Ethernet team driver support [CONFIG_NET_TEAM]</literal></screen>
155
156 <indexterm zone="NetworkManager NetworkManager-kernel">
157 <primary sortas="d-NetworkManager">NetworkManager</primary>
158 </indexterm>
159 </sect2>
160
161 <sect2 role="installation">
162 <title>Installation of NetworkManager</title>
163
164 <para>If <xref linkend="qt5"/> is installed and the Qt based
165 examples are desired, fix the configure script:</para>
166
167<screen><userinput>sed -e '/Qt[CDN]/s/Qt/Qt5/g' \
168 -e 's/-qt4/-qt5/' \
169 -e 's/moc_location/host_bins/' \
170 -i examples/C/qt/meson.build</userinput></screen>
171
172 <para>
173 Fix a missing meson.build file for initrd hooks (not used in BLFS):
174 </para>
175
176<screen><userinput>sed '/initrd/d' -i src/meson.build</userinput></screen>
177
178 <para>
179 Fix the python scripts so that they use <application>Python
180 3</application>:
181 </para>
182
183<screen><userinput>grep -rl '^#!.*python$' | xargs sed -i '1s/python/&amp;3/'</userinput></screen>
184
185 <para>
186 Install <application>NetworkManager</application> by running the
187 following commands:
188 </para>
189
190<screen revision="sysv"><userinput>mkdir build &amp;&amp;
191cd build &amp;&amp;
192
193CXXFLAGS+="-O2 -fPIC" \
194meson --prefix /usr \
195 --sysconfdir /etc \
196 --localstatedir /var \
197 -Djson_validation=false \
198 -Dlibaudit=no \
199 -Dlibpsl=false \
200 -Dnmtui=true \
201 -Dovs=false \
202 -Dppp=false \
203 -Dselinux=false \
204 -Dudev_dir=/lib/udev \
205 -Dsession_tracking=elogind \
206 -Dmodem_manager=false \
207 -Dsystemdsystemunitdir=no \
208 -Dsystemd_journal=false \
209 -Dqt=false \
210 .. &amp;&amp;
211ninja</userinput></screen>
212
213<screen revision="systemd"><userinput>mkdir build &amp;&amp;
214cd build &amp;&amp;
215
216CXXFLAGS+="-O2 -fPIC" \
217meson --prefix /usr \
218 --sysconfdir /etc \
219 --localstatedir /var \
220 -Djson_validation=false \
221 -Dlibaudit=no \
222 -Dlibpsl=false \
223 -Dnmtui=true \
224 -Dovs=false \
225 -Dppp=false \
226 -Dselinux=false \
227 -Dqt=false \
228 -Dudev_dir=/lib/udev \
229 -Dsession_tracking=systemd \
230 -Dmodem_manager=false \
231 -Dsystemdsystemunitdir=/lib/systemd/system \
232 .. &amp;&amp;
233ninja</userinput></screen>
234
235 <para>
236 An already active <phrase revision="sysv">graphical</phrase> session
237 with bus address is necessary to run the tests. To test the results,
238 as the root user, <!-- needs the "ip" command -->
239 issue: <command>ninja test</command>. Four tests,
240 <filename>platform/test-cleanup-linux</filename>,
241 <filename>platform/test-link-linux</filename>,
242 <filename>platform/test-route-linux</filename>, and
243 <filename>devices/test-acd</filename> are known to fail.
244 </para>
245
246 <para>
247 Now, as the <systemitem class="username">root</systemitem> user:
248 </para>
249
250<screen role="root"><userinput>ninja install &amp;&amp;
251mv -v /usr/share/doc/NetworkManager{,-&NetworkManager-version;}</userinput></screen>
252
253 </sect2>
254
255 <sect2 role="commands">
256 <title>Command Explanations</title>
257
258 <para>
259 <envar>CXXFLAGS="-O2 -fPIC"</envar>: These compiler options are
260 necessary to build the Qt5 based examples.
261 </para>
262
263 <para>
264 <option>-Ddocs=true</option>: Use this switch to enable building
265 man pages and documentation if <xref linkend="gtk-doc"/> is installed.
266 </para>
267
268 <para>
269 <parameter>-Dnmtui=true</parameter>: This parameter enables building
270 <command>nmtui</command>.
271 </para>
272
273 <para revision="sysv">
274 <parameter>-Dsystemdsystemunitdir=no</parameter> and
275 <parameter>-Dsystemd_journal=false</parameter>: systemd is not
276 used for sysv init systems.
277 </para>
278
279 <para>
280 <parameter>-Djson_validation=false</parameter>,
281 <parameter>-Dlibpsl=false</parameter>, and
282 <parameter>-Dovs=false</parameter>: These switches disable building with the
283 respective libraries. Remove if you have the needed libraries installed.
284 </para>
285
286<!--
287 <para>
288 <parameter>-Dlibpsl=false</parameter>: This switch is required if
289 <application>libpsl</application> is not installed. Omit this switch if
290 you have built <application>libpsl</application>.
291 </para>
292-->
293
294 <para>
295 <parameter>-Dmodem_manager=false</parameter>: This switch is requried if
296 <application>ModemManager</application> is not installed. Omit if you
297 have built <application>ModemManager</application>.
298 </para>
299
300 <para revision="sysv">
301 <parameter>-Dsession_tracking=elogind</parameter>: This switch
302 is used to set <command>elogind</command> as the default
303 program for session tracking.
304 </para>
305
306 <para revision="systemd">
307 <parameter>-Dsession_tracking=systemd</parameter>: This switch
308 is used to set <command>systemd-logind</command> as the default
309 program for session tracking.
310 </para>
311
312 <para revision="systemd">
313 <parameter>-Dsystemdsystemunitdir=/lib/systemd/system</parameter>:
314 This switch is used to set the correct installation directory for
315 systemd units.
316 </para>
317
318 <para>
319 <parameter>-Dppp=false</parameter>: This parameter disables
320 <application>PPP</application> support in
321 <application>NetworkManager</application>.
322 </para>
323
324 <para>
325 <parameter>-Dlibaudit=no</parameter> and
326 <parameter>-Dselinux=false</parameter>: libaudit and SELinux are not used
327 in BLFS.
328 </para>
329
330 <para>
331 <parameter>-Dqt=false</parameter>: disables the
332 <application>QT</application> examples. Omit if you have
333 <application>QT</application> available and wish to install the examples.
334 </para>
335
336 </sect2>
337
338 <sect2 role="configuration">
339 <title>Configuring NetworkManager</title>
340
341 <sect3 id="NetworkManager-config">
342 <title>Config Files</title>
343 <para>
344 <filename>/etc/NetworkManager/NetworkManager.conf</filename>
345 </para>
346
347 <indexterm zone="NetworkManager NetworkManager-config">
348 <primary
349 sortas="e-etc-NetworkManager-NetworkManager.conf">
350 /etc/NetworkManager/NetworkManager.conf</primary>
351 </indexterm>
352
353 </sect3>
354
355 <sect3><title>Configuration Information</title>
356
357 <para>
358 For <application>NetworkManager</application> to work, at least
359 a minimal configuration file must be present. Such file is not
360 installed with <command>make install</command>. Issue the following
361 command as the <systemitem class="username">root</systemitem> user to
362 create minimal <filename>NetworkManager.conf</filename> file:
363 </para>
364
365<screen role="root"><userinput>cat &gt;&gt; /etc/NetworkManager/NetworkManager.conf &lt;&lt; "EOF"
366<literal>[main]
367plugins=keyfile</literal>
368EOF</userinput></screen>
369
370 <para>
371 This file should not be modified directly by users of the system.
372 Instead, system specific changes should be made using configuration
373 files in the
374 <filename class="directory">/etc/NetworkManager/conf.d</filename>
375 direcotry.
376 </para>
377
378 <para>
379 To allow polkit to manage authorizations, add the following
380 configuration file:
381 </para>
382
383<screen role="root"><userinput>cat &gt; /etc/NetworkManager/conf.d/polkit.conf &lt;&lt; "EOF"
384<literal>[main]
385auth-polkit=true</literal>
386EOF</userinput></screen>
387
388 <para>
389 To use something other than the built-in dhcp client (recommended if
390 using only <command>nmcli</command>), use the following configuration
391 (valid values are dhclient, dhcpcd, and internal):
392 </para>
393
394<screen role="nodump"><userinput>cat &gt; /etc/NetworkManager/conf.d/dhcp.conf &lt;&lt; "EOF"
395<literal>[main]
396dhcp=</literal><replaceable>dhclient</replaceable>
397EOF</userinput></screen>
398
399 <para>
400 To prevent <application>NetworkManager</application> from updating the
401 <filename>/etc/resolv.conf</filename> file, add the following
402 configuration file:
403 </para>
404
405<screen role="nodump"><userinput>cat &gt; /etc/NetworkManager/conf.d/no-dns-update.conf &lt;&lt; "EOF"
406<literal>[main]
407dns=none</literal>
408EOF</userinput></screen>
409
410 <para>
411 For additional configuation options, see
412 <command>man 5 NetworkManager.conf</command>.
413 </para>
414
415 <para>
416 To allow regular users permission to configure network connections,
417 you should add them to the
418 <systemitem class="groupname">netdev</systemitem>
419 group, and create a <application>polkit</application> rule that grants
420 access. Run the following commands as the
421 <systemitem class="username">root</systemitem> user:
422 </para>
423
424<screen role="root"><userinput>groupadd -fg 86 netdev &amp;&amp;
425/usr/sbin/usermod -a -G netdev <replaceable>&lt;username&gt;</replaceable>
426
427cat &gt; /usr/share/polkit-1/rules.d/org.freedesktop.NetworkManager.rules &lt;&lt; "EOF"
428<literal>polkit.addRule(function(action, subject) {
429 if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 &amp;&amp; subject.isInGroup("netdev")) {
430 return polkit.Result.YES;
431 }
432});</literal>
433EOF</userinput></screen>
434
435 </sect3>
436
437 <sect3 id="NetworkManager-init">
438 <title><phrase revision="sysv">Boot Script</phrase>
439 <phrase revision="systemd">Systemd Unit</phrase></title>
440
441 <para revision="sysv">
442 To automatically start the <command>NetworkManager</command> daemon
443 when the system is rebooted, install the
444 <filename>/etc/rc.d/init.d/networkmanager</filename>bootscript from the
445 <xref linkend="bootscripts"/> package.
446 </para>
447
448 <para revision="systemd">
449 To start the <command>NetworkManager</command> daemon at boot, enable
450 the previously installed systemd unit by running the following command
451 as the <systemitem class="username">root</systemitem> user:
452 </para>
453
454 <note>
455 <para>
456 If using <application>Network Manager</application> to manage
457 an interface, any previous configuration for that interface should be
458 removed, and the interface brought down prior to starting
459 <application>Network Manager</application>.
460 </para>
461 </note>
462
463 <indexterm zone="NetworkManager NetworkManager-init">
464 <primary sortas="f-NetworkManager">NetworkManager</primary>
465 </indexterm>
466
467<screen role="root" revision="sysv"><userinput>make install-networkmanager</userinput></screen>
468
469<screen role="root" revision="systemd"><userinput>systemctl enable NetworkManager</userinput></screen>
470<!-- The below instruction is obsolete. NetworkManager-wait-online is now
471 enabled by default when enabling NetworkManager. -->
472<!--
473 <para revision="systemd">
474 <application>NetworkManager</application> also ships a systemd unit
475 called <filename>NetworkManager-wait-online.service</filename> which
476 can be used to prevent services that require network connectivity
477 from starting until <application>NetworkManager</application> has
478 established the connection. To enable it, run the following command
479 as the <systemitem class="username">root</systemitem> user:
480 </para>
481
482<screen role="root" revision="systemd"><userinput>systemctl enable NetworkManager-wait-online</userinput></screen>
483 -->
484 <!-- As such, let's now provide instructions on how to disable that
485 behavior, for those who wish to do so. -->
486 <para revision="systemd">
487 Starting in version 1.11.2 of <application>NetworkManager</application>,
488 a systemd unit named <filename>NetworkManager-wait-online.service</filename>
489 is enabled, which is used to prevent services that require network
490 connectivity from starting until <application>NetworkManager</application>
491 establishes a connection. To disable this behavior, run the following
492 command as the <systemitem class="username">root</systemitem> user:
493 </para>
494
495<screen role="root" revision="systemd"><userinput>systemctl disable NetworkManager-wait-online</userinput></screen>
496
497 </sect3>
498
499 </sect2>
500
501 <sect2 role="content">
502 <title>Contents</title>
503
504 <segmentedlist>
505 <segtitle>Installed Programs</segtitle>
506 <segtitle>Installed Libraries</segtitle>
507 <segtitle>Installed Directories</segtitle>
508
509 <seglistitem>
510 <seg>
511 NetworkManager, nmcli, nm-online, nmtui, and, symlinked to nmtui:
512 nmtui-connect, nmtui-edit, and nmtui-hostname
513 </seg>
514 <seg>
515 libnm.so
516 and several modules under /usr/lib/NetworkManager
517 </seg>
518 <seg>
519 /etc/NetworkManager,
520 /usr/include/NetworkManager,
521 /usr/lib/NetworkManager,
522 /usr/share/doc/NetworkManager-&NetworkManager-version;,
523 /usr/share/gtk-doc/html/{libnm,NetworkManager}
524 (if the documentation is built),
525 and
526 /var/lib/NetworkManager
527 </seg>
528 <!-- A lot of libraries were removed here. We should verify compatibilty.
529 RESTORED AT 1.18.2 -renodr -->
530 </seglistitem>
531 </segmentedlist>
532
533 <variablelist>
534 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
535 <?dbfo list-presentation="list"?>
536 <?dbhtml list-presentation="table"?>
537
538 <varlistentry id="nmcli">
539 <term><command>nmcli</command></term>
540 <listitem>
541 <para>
542 is a command-line tool for controlling
543 <application>NetworkManager</application>
544 and getting its status.
545 </para>
546 <indexterm zone="NetworkManager nmcli">
547 <primary sortas="b-nmcli">nmcli</primary>
548 </indexterm>
549 </listitem>
550 </varlistentry>
551
552 <varlistentry id="nm-online">
553 <term><command>nm-online</command></term>
554 <listitem>
555 <para>
556 is a utility to find out whether you are online.
557 </para>
558 <indexterm zone="NetworkManager nm-online">
559 <primary sortas="b-nm-online">nm-online</primary>
560 </indexterm>
561 </listitem>
562 </varlistentry>
563
564 <varlistentry id="nmtui">
565 <term><command>nmtui</command></term>
566 <listitem>
567 <para>
568 is an interactive ncurses based interface for
569 <application>nmcli</application>.
570 </para>
571 <indexterm zone="NetworkManager nmtui">
572 <primary sortas="b-nmtui">nmtui</primary>
573 </indexterm>
574 </listitem>
575 </varlistentry>
576
577 <varlistentry id="nmtui-connect">
578 <term><command>nmtui-connect</command></term>
579 <listitem>
580 <para>
581 is an interactive ncurses based interface connection to
582 activate/deactivate connections.
583 </para>
584 <indexterm zone="NetworkManager nmtui-connect">
585 <primary sortas="b-nmtui-connect">nmtui-connect</primary>
586 </indexterm>
587 </listitem>
588 </varlistentry>
589
590 <varlistentry id="nmtui-edit">
591 <term><command>nmtui-edit</command></term>
592 <listitem>
593 <para>
594 is an interactive ncurses based interface connection editor.
595 </para>
596 <indexterm zone="NetworkManager nmtui-edit">
597 <primary sortas="b-nmtui-edit">nmtui-edit</primary>
598 </indexterm>
599 </listitem>
600 </varlistentry>
601
602 <varlistentry id="nmtui-hostname">
603 <term><command>nmtui-hostname</command></term>
604 <listitem>
605 <para>
606 is an interactive ncurses based interface hostname editor.
607 </para>
608 <indexterm zone="NetworkManager nmtui-hostname">
609 <primary sortas="b-nmtui-hostname">nmtui-hostname</primary>
610 </indexterm>
611 </listitem>
612 </varlistentry>
613
614 <varlistentry id="NetworkManager-prog">
615 <term><command>NetworkManager</command></term>
616 <listitem>
617 <para>
618 is the network management daemon.
619 </para>
620 <indexterm zone="NetworkManager NetworkManager-prog">
621 <primary sortas="b-NetworkManager">NetworkManager</primary>
622 </indexterm>
623 </listitem>
624 </varlistentry>
625
626 <varlistentry id="libnm">
627 <term><filename class="libraryfile">libnm.so</filename></term>
628 <listitem>
629 <para>
630 contains functions used by <application>NetworkManager</application>.
631 </para>
632 <indexterm zone="NetworkManager libnm">
633 <primary sortas="c-libnm">libnm.so</primary>
634 </indexterm>
635 </listitem>
636 </varlistentry>
637 </variablelist>
638
639 </sect2>
640
641</sect1>
Note: See TracBrowser for help on using the repository browser.