source: networking/netutils/networkmanager.xml@ ad8b716

12.2 gimp3 lazarus trunk xry111/for-12.3 xry111/spidermonkey128
Last change on this file since ad8b716 was ad8b716, checked in by Bruce Dubbs <bdubbs@…>, 2 months ago

onsolidate qt5 pages.

Remove the page for a full qt5 install.
Remove qt5-components

Rename qt5-alternate to qt5-components adding instructions to optionally
add qtdoc and qtmultimedia to the build.

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