source: networking/netutils/networkmanager.xml@ 7c56ece

10.0 10.1 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 7c56ece was 7c56ece, checked in by Pierre Labastie <pieere@…>, 4 years ago

Finish formatting "networking"

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@22877 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/&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 "b7b8875c3ef1db0989f78351ba3e8ad8">
12 <!ENTITY NetworkManager-size "4.5 MB">
13 <!ENTITY NetworkManager-buildsize "862 MB (with tests)">
14 <!ENTITY NetworkManager-time "0.8 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 &lfs91_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://ftp.gnome.org/pub/gnome/sources/mobile-broadband-provider-info/">mobile-broadband-provider-info</ulink>,
128 <ulink url="https://www.samba.org/ftp/ppp/">PPP</ulink>, and
129 <ulink url="https://dianne.skoll.ca/projects/rp-pppoe/">RP-PPPoE</ulink>
130 </para>
131
132 <para condition="html" role="usernotes">User Notes:
133 <ulink url="&blfs-wiki;/NetworkManager"/>
134 </para>
135 </sect2>
136
137 <sect2 role="kernel" id="NetworkManager-kernel">
138 <title>Kernel Configuration</title>
139
140 <para>
141 If you wish to run the tests, enable the following options in the
142 kernel configuration and recompile the kernel if necessary:
143 </para>
144
145 <!-- Ethernet Teaming support is potentially optional, but I didn't
146 run the tests again to test that. It was needed to convince one of
147 the Linux Platform tests to move farther along because otherwise
148 RTNETLINK would respond with an Error 95 - unknown device type.
149 This would cause the test to fail early on in the process. -->
150
151<screen><literal>Device Drivers ---&gt;
152 [*] Network device support [CONFIG_NETDEVICES] ---&gt;
153 [*] Bonding driver support [CONFIG_BONDING]
154 [*] Dummy net driver support [CONFIG_DUMMY]
155 [*] Ethernet team driver support [CONFIG_NET_TEAM]</literal></screen>
156
157 <indexterm zone="NetworkManager NetworkManager-kernel">
158 <primary sortas="d-NetworkManager">NetworkManager</primary>
159 </indexterm>
160 </sect2>
161
162 <sect2 role="installation">
163 <title>Installation of NetworkManager</title>
164
165 <para>
166 If <xref linkend="qt5"/> is installed and the Qt based
167 examples are desired, fix two meson.build files:
168 </para>
169
170<screen><userinput>sed -e 's/-qt4/-qt5/' \
171 -e 's/moc_location/host_bins/' \
172 -i examples/C/qt/meson.build &amp;&amp;
173sed -e 's/Qt/&amp;5/' \
174 -i meson.build</userinput></screen>
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/meson.build</userinput></screen>
181
182 <para>
183 Fix the python scripts so that they use <application>Python
184 3</application>:
185 </para>
186
187<screen><userinput>grep -rl '^#!.*python$' | xargs sed -i '1s/python/&amp;3/'</userinput></screen>
188
189 <para>
190 Install <application>NetworkManager</application> by running the
191 following commands:
192 </para>
193
194<screen revision="sysv"><userinput>mkdir build &amp;&amp;
195cd build &amp;&amp;
196
197CXXFLAGS+="-O2 -fPIC" \
198meson --prefix /usr \
199 --sysconfdir /etc \
200 --localstatedir /var \
201 -Djson_validation=false \
202 -Dlibaudit=no \
203 -Dlibpsl=false \
204 -Dnmtui=true \
205 -Dovs=false \
206 -Dppp=false \
207 -Dselinux=false \
208 -Dudev_dir=/lib/udev \
209 -Dsession_tracking=elogind \
210 -Dmodem_manager=false \
211 -Dsystemdsystemunitdir=no \
212 -Dsystemd_journal=false \
213 -Dqt=false \
214 .. &amp;&amp;
215ninja</userinput></screen>
216
217<screen revision="systemd"><userinput>mkdir build &amp;&amp;
218cd build &amp;&amp;
219
220CXXFLAGS+="-O2 -fPIC" \
221meson --prefix /usr \
222 --sysconfdir /etc \
223 --localstatedir /var \
224 -Djson_validation=false \
225 -Dlibaudit=no \
226 -Dlibpsl=false \
227 -Dnmtui=true \
228 -Dovs=false \
229 -Dppp=false \
230 -Dselinux=false \
231 -Dqt=false \
232 -Dudev_dir=/lib/udev \
233 -Dsession_tracking=systemd \
234 -Dmodem_manager=false \
235 -Dsystemdsystemunitdir=/lib/systemd/system \
236 .. &amp;&amp;
237ninja</userinput></screen>
238
239 <para>
240 An already active graphical session
241 with a bus address is necessary to run the tests. To test the results,
242 as the root user, <!-- needs the "ip" command -->
243 issue: <command>ninja test</command>. One test, test-core, is 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> and
298 <application>mobile-broadband-provider-info</application>.
299 </para>
300
301 <para revision="sysv">
302 <parameter>-Dsession_tracking=elogind</parameter>: This switch
303 is used to set <command>elogind</command> as the default
304 program for session tracking.
305 </para>
306
307 <para revision="systemd">
308 <parameter>-Dsession_tracking=systemd</parameter>: This switch
309 is used to set <command>systemd-logind</command> as the default
310 program for session tracking.
311 </para>
312
313 <para revision="systemd">
314 <parameter>-Dsystemdsystemunitdir=/lib/systemd/system</parameter>:
315 This switch is used to set the correct installation directory for
316 systemd units.
317 </para>
318
319 <para>
320 <parameter>-Dppp=false</parameter>: This parameter disables
321 <application>PPP</application> support in
322 <application>NetworkManager</application>.
323 </para>
324
325 <para>
326 <parameter>-Dlibaudit=no</parameter> and
327 <parameter>-Dselinux=false</parameter>: libaudit and SELinux are not used
328 in BLFS.
329 </para>
330
331 <para>
332 <parameter>-Dqt=false</parameter>: disables the
333 <application>QT</application> examples. Omit if you have
334 <application>QT</application> available and wish to install the examples.
335 </para>
336
337 </sect2>
338
339 <sect2 role="configuration">
340 <title>Configuring NetworkManager</title>
341
342 <sect3 id="NetworkManager-config">
343 <title>Config Files</title>
344 <para>
345 <filename>/etc/NetworkManager/NetworkManager.conf</filename>
346 </para>
347
348 <indexterm zone="NetworkManager NetworkManager-config">
349 <primary
350 sortas="e-etc-NetworkManager-NetworkManager.conf">
351 /etc/NetworkManager/NetworkManager.conf</primary>
352 </indexterm>
353
354 </sect3>
355
356 <sect3><title>Configuration Information</title>
357
358 <para>
359 For <application>NetworkManager</application> to work, at least
360 a minimal configuration file must be present. Such file is not
361 installed with <command>make install</command>. Issue the following
362 command as the <systemitem class="username">root</systemitem> user to
363 create minimal <filename>NetworkManager.conf</filename> file:
364 </para>
365
366<screen role="root"><userinput>cat &gt;&gt; /etc/NetworkManager/NetworkManager.conf &lt;&lt; "EOF"
367<literal>[main]
368plugins=keyfile</literal>
369EOF</userinput></screen>
370
371 <para>
372 This file should not be modified directly by users of the system.
373 Instead, system specific changes should be made using configuration
374 files in the
375 <filename class="directory">/etc/NetworkManager/conf.d</filename>
376 direcotry.
377 </para>
378
379 <para>
380 To allow polkit to manage authorizations, add the following
381 configuration file:
382 </para>
383
384<screen role="root"><userinput>cat &gt; /etc/NetworkManager/conf.d/polkit.conf &lt;&lt; "EOF"
385<literal>[main]
386auth-polkit=true</literal>
387EOF</userinput></screen>
388
389 <para>
390 To use something other than the built-in dhcp client (recommended if
391 using only <command>nmcli</command>), use the following configuration
392 (valid values are dhclient, dhcpcd, and internal):
393 </para>
394
395<screen role="nodump"><userinput>cat &gt; /etc/NetworkManager/conf.d/dhcp.conf &lt;&lt; "EOF"
396<literal>[main]
397dhcp=</literal><replaceable>dhclient</replaceable>
398EOF</userinput></screen>
399
400 <para>
401 To prevent <application>NetworkManager</application> from updating the
402 <filename>/etc/resolv.conf</filename> file, add the following
403 configuration file:
404 </para>
405
406<screen role="nodump"><userinput>cat &gt; /etc/NetworkManager/conf.d/no-dns-update.conf &lt;&lt; "EOF"
407<literal>[main]
408dns=none</literal>
409EOF</userinput></screen>
410
411 <para>
412 For additional configuation options, see
413 <command>man 5 NetworkManager.conf</command>.
414 </para>
415
416 <para>
417 To allow regular users permission to configure network connections,
418 you should add them to the
419 <systemitem class="groupname">netdev</systemitem>
420 group, and create a <application>polkit</application> rule that grants
421 access. Run the following commands as the
422 <systemitem class="username">root</systemitem> user:
423 </para>
424
425<screen role="root"><userinput>groupadd -fg 86 netdev &amp;&amp;
426/usr/sbin/usermod -a -G netdev <replaceable>&lt;username&gt;</replaceable>
427
428cat &gt; /usr/share/polkit-1/rules.d/org.freedesktop.NetworkManager.rules &lt;&lt; "EOF"
429<literal>polkit.addRule(function(action, subject) {
430 if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 &amp;&amp; subject.isInGroup("netdev")) {
431 return polkit.Result.YES;
432 }
433});</literal>
434EOF</userinput></screen>
435
436 </sect3>
437
438 <sect3 id="NetworkManager-init">
439 <title><phrase revision="sysv">Boot Script</phrase>
440 <phrase revision="systemd">Systemd Unit</phrase></title>
441
442 <para revision="sysv">
443 To automatically start the <command>NetworkManager</command> daemon
444 when the system is rebooted, install the
445 <filename>/etc/rc.d/init.d/networkmanager</filename>bootscript from the
446 <xref linkend="bootscripts"/> package.
447 </para>
448
449 <para revision="systemd">
450 To start the <command>NetworkManager</command> daemon at boot, enable
451 the previously installed systemd unit by running the following command
452 as the <systemitem class="username">root</systemitem> user:
453 </para>
454
455 <note>
456 <para>
457 If using <application>Network Manager</application> to manage
458 an interface, any previous configuration for that interface should be
459 removed, and the interface brought down prior to starting
460 <application>Network Manager</application>.
461 </para>
462 </note>
463
464 <indexterm zone="NetworkManager NetworkManager-init">
465 <primary sortas="f-NetworkManager">NetworkManager</primary>
466 </indexterm>
467
468<screen role="root" revision="sysv"><userinput>make install-networkmanager</userinput></screen>
469
470<screen role="root" revision="systemd"><userinput>systemctl enable NetworkManager</userinput></screen>
471<!-- The below instruction is obsolete. NetworkManager-wait-online is now
472 enabled by default when enabling NetworkManager. -->
473<!--
474 <para revision="systemd">
475 <application>NetworkManager</application> also ships a systemd unit
476 called <filename>NetworkManager-wait-online.service</filename> which
477 can be used to prevent services that require network connectivity
478 from starting until <application>NetworkManager</application> has
479 established the connection. To enable it, run the following command
480 as the <systemitem class="username">root</systemitem> user:
481 </para>
482
483<screen role="root" revision="systemd"><userinput>systemctl enable NetworkManager-wait-online</userinput></screen>
484 -->
485 <!-- As such, let's now provide instructions on how to disable that
486 behavior, for those who wish to do so. -->
487 <para revision="systemd">
488 Starting in version 1.11.2 of <application>NetworkManager</application>,
489 a systemd unit named <filename>NetworkManager-wait-online.service</filename>
490 is enabled, which is used to prevent services that require network
491 connectivity from starting until <application>NetworkManager</application>
492 establishes a connection. To disable this behavior, run the following
493 command as the <systemitem class="username">root</systemitem> user:
494 </para>
495
496<screen role="root" revision="systemd"><userinput>systemctl disable NetworkManager-wait-online</userinput></screen>
497
498 </sect3>
499
500 </sect2>
501
502 <sect2 role="content">
503 <title>Contents</title>
504
505 <segmentedlist>
506 <segtitle>Installed Programs</segtitle>
507 <segtitle>Installed Libraries</segtitle>
508 <segtitle>Installed Directories</segtitle>
509
510 <seglistitem>
511 <seg>
512 NetworkManager, nmcli, nm-online, nmtui, and, symlinked to nmtui:
513 nmtui-connect, nmtui-edit, and nmtui-hostname
514 </seg>
515 <seg>
516 libnm.so
517 and several modules under /usr/lib/NetworkManager
518 </seg>
519 <seg>
520 /etc/NetworkManager,
521 /usr/include/NetworkManager,
522 /usr/lib/NetworkManager,
523 /usr/share/doc/NetworkManager-&NetworkManager-version;,
524 /usr/share/gtk-doc/html/{libnm,NetworkManager}
525 (if the documentation is built),
526 and
527 /var/lib/NetworkManager
528 </seg>
529 <!-- A lot of libraries were removed here. We should verify compatibilty.
530 RESTORED AT 1.18.2 -renodr -->
531 </seglistitem>
532 </segmentedlist>
533
534 <variablelist>
535 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
536 <?dbfo list-presentation="list"?>
537 <?dbhtml list-presentation="table"?>
538
539 <varlistentry id="nmcli">
540 <term><command>nmcli</command></term>
541 <listitem>
542 <para>
543 is a command-line tool for controlling
544 <application>NetworkManager</application>
545 and getting its status.
546 </para>
547 <indexterm zone="NetworkManager nmcli">
548 <primary sortas="b-nmcli">nmcli</primary>
549 </indexterm>
550 </listitem>
551 </varlistentry>
552
553 <varlistentry id="nm-online">
554 <term><command>nm-online</command></term>
555 <listitem>
556 <para>
557 is an utility to find out whether you are online.
558 </para>
559 <indexterm zone="NetworkManager nm-online">
560 <primary sortas="b-nm-online">nm-online</primary>
561 </indexterm>
562 </listitem>
563 </varlistentry>
564
565 <varlistentry id="nmtui">
566 <term><command>nmtui</command></term>
567 <listitem>
568 <para>
569 is an interactive ncurses based interface for
570 <application>nmcli</application>.
571 </para>
572 <indexterm zone="NetworkManager nmtui">
573 <primary sortas="b-nmtui">nmtui</primary>
574 </indexterm>
575 </listitem>
576 </varlistentry>
577
578 <varlistentry id="nmtui-connect">
579 <term><command>nmtui-connect</command></term>
580 <listitem>
581 <para>
582 is an interactive ncurses based interface connection to
583 activate/deactivate connections.
584 </para>
585 <indexterm zone="NetworkManager nmtui-connect">
586 <primary sortas="b-nmtui-connect">nmtui-connect</primary>
587 </indexterm>
588 </listitem>
589 </varlistentry>
590
591 <varlistentry id="nmtui-edit">
592 <term><command>nmtui-edit</command></term>
593 <listitem>
594 <para>
595 is an interactive ncurses based interface connection editor.
596 </para>
597 <indexterm zone="NetworkManager nmtui-edit">
598 <primary sortas="b-nmtui-edit">nmtui-edit</primary>
599 </indexterm>
600 </listitem>
601 </varlistentry>
602
603 <varlistentry id="nmtui-hostname">
604 <term><command>nmtui-hostname</command></term>
605 <listitem>
606 <para>
607 is an interactive ncurses based interface hostname editor.
608 </para>
609 <indexterm zone="NetworkManager nmtui-hostname">
610 <primary sortas="b-nmtui-hostname">nmtui-hostname</primary>
611 </indexterm>
612 </listitem>
613 </varlistentry>
614
615 <varlistentry id="NetworkManager-prog">
616 <term><command>NetworkManager</command></term>
617 <listitem>
618 <para>
619 is the network management daemon.
620 </para>
621 <indexterm zone="NetworkManager NetworkManager-prog">
622 <primary sortas="b-NetworkManager">NetworkManager</primary>
623 </indexterm>
624 </listitem>
625 </varlistentry>
626
627 <varlistentry id="libnm">
628 <term><filename class="libraryfile">libnm.so</filename></term>
629 <listitem>
630 <para>
631 contains functions used by <application>NetworkManager</application>.
632 </para>
633 <indexterm zone="NetworkManager libnm">
634 <primary sortas="c-libnm">libnm.so</primary>
635 </indexterm>
636 </listitem>
637 </varlistentry>
638 </variablelist>
639
640 </sect2>
641
642</sect1>
Note: See TracBrowser for help on using the repository browser.