source: networking/netutils/networkmanager.xml@ 45ab6c7

11.0 11.1 11.2 11.3 12.0 12.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 45ab6c7 was 45ab6c7, checked in by Xi Ruoyao <xry111@…>, 3 years ago

more SVN prop clean up

Remove "$LastChanged$" everywhere, and also some unused $Date$

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