source: networking/netutils/networkmanager.xml@ 52c9514

10.0 10.1 11.0 9.0 9.1 ken/refactor-virt lazarus qt5new trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 52c9514 was 52c9514, checked in by Douglas R. Reno <renodr@…>, 2 years ago

Update to NetworkManager-1.18.2. This also fixes minor breakage in the Wireshark plugin for NetworkManager caused by kernel 5.2

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

  • Property mode set to 100644
File size: 21.4 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.18/NetworkManager-&NetworkManager-version;.tar.xz">
9 <!ENTITY NetworkManager-download-ftp
10 "&gnome-download-ftp;/NetworkManager/1.18/NetworkManager-&NetworkManager-version;.tar.xz">
11 <!ENTITY NetworkManager-md5sum "ca1e6175c6ba97ca1adf65a67861ccd9">
12 <!ENTITY NetworkManager-size "4.6 MB">
13 <!ENTITY NetworkManager-buildsize "872 MB (with tests)">
14 <!ENTITY NetworkManager-time "1.8 SBU (with tests)">
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 &lfs84_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 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="installation">
137 <title>Installation of NetworkManager</title>
138
139 <para>If <xref linkend="qt5"/> is installed and the Qt based
140 examples are desired, fix the configure script:</para>
141
142<screen><userinput>sed -e '/Qt[CDN]/s/Qt/Qt5/g' \
143 -e 's/-qt4/-qt5/' \
144 -e 's/moc_location/host_bins/' \
145 -i examples/C/qt/meson.build</userinput></screen>
146
147 <para>
148 Fix a missing meson.build file for initrd hooks (not used in BLFS):
149 </para>
150
151<screen><userinput>sed '/initrd/d' -i src/meson.build</userinput></screen>
152
153 <para>
154 Fix the python scripts so that they use <application>Python
155 3</application>:
156 </para>
157
158<screen><userinput>grep -rl '^#!.*python$' | xargs sed -i '1s/python/&amp;3/'</userinput></screen>
159
160 <para>
161 Install <application>NetworkManager</application> by running the
162 following commands:
163 </para>
164
165<screen revision="sysv"><userinput>mkdir build &amp;&amp;
166cd build &amp;&amp;
167
168CXXFLAGS+="-O2 -fPIC" \
169meson --prefix /usr \
170 --sysconfdir /etc \
171 --localstatedir /var \
172 -Djson_validation=false \
173 -Dlibaudit=no \
174 -Dlibnm_glib=true \
175 -Dlibpsl=false \
176 -Dnmtui=true \
177 -Dovs=false \
178 -Dppp=false \
179 -Dselinux=false \
180 -Dudev_dir=/lib/udev \
181 -Dsession_tracking=elogind \
182 -Dmodem_manager=false \
183 -Dsystemdsystemunitdir=no \
184 -Dsystemd_journal=false \
185 -Dqt=false \
186 .. &amp;&amp;
187ninja</userinput></screen>
188
189<screen revision="systemd"><userinput>mkdir build &amp;&amp;
190cd build &amp;&amp;
191
192CXXFLAGS+="-O2 -fPIC" \
193meson --prefix /usr \
194 --sysconfdir /etc \
195 --localstatedir /var \
196 -Djson_validation=false \
197 -Dlibaudit=no \
198 -Dlibnm_glib=true \
199 -Dlibpsl=false \
200 -Dnmtui=true \
201 -Dovs=false \
202 -Dppp=false \
203 -Dselinux=false \
204 -Dqt=false \
205 -Dudev_dir=/lib/udev \
206 -Dsession_tracking=systemd \
207 -Dmodem_manager=false \
208 -Dsystemdsystemunitdir=/lib/systemd/system \
209 .. &amp;&amp;
210ninja</userinput></screen>
211
212 <para>
213 An already active <phrase revision="sysv">graphical</phrase> session
214 with bus address is necessary to run the tests. To test the results,
215 issue: <command>ninja test</command>.
216 </para>
217
218 <para>
219 Now, as the <systemitem class="username">root</systemitem> user:
220 </para>
221
222<screen role="root"><userinput>ninja install &amp;&amp;
223mv -v /usr/share/doc/NetworkManager{,-&NetworkManager-version;}</userinput></screen>
224
225 </sect2>
226
227 <sect2 role="commands">
228 <title>Command Explanations</title>
229
230 <para>
231 <envar>CXXFLAGS="-O2 -fPIC"</envar>: These compiler options are
232 necessary to build the Qt5 based examples.
233 </para>
234
235 <para>
236 <option>-Ddocs=true</option>: Use this switch to enable building
237 man pages and documentation if <xref linkend="gtk-doc"/> is installed.
238 </para>
239
240 <para>
241 <parameter>-Dnmtui=true</parameter>: This parameter enables building
242 <command>nmtui</command>.
243 </para>
244
245 <para revision="sysv">
246 <parameter>-Dsystemdsystemunitdir=no</parameter> and
247 <parameter>-Dsystemd_journal=false</parameter>: systemd is not
248 used for sysv init systems.
249 </para>
250
251 <para>
252 <parameter>-Djson_validation=false</parameter>,
253 <parameter>-Dlibpsl=false</parameter>, and
254 <parameter>-Dovs=false</parameter>: These switches disable building with the
255 respective libraries. Remove if you have the needed libraries installed.
256 </para>
257
258<!--
259 <para>
260 <parameter>-Dlibpsl=false</parameter>: This switch is required if
261 <application>libpsl</application> is not installed. Omit this switch if
262 you have built <application>libpsl</application>.
263 </para>
264-->
265
266 <para>
267 <parameter>-Dmodem_manager=false</parameter>: This switch is requried if
268 <application>ModemManager</application> is not installed. Omit if you
269 have built <application>ModemManager</application>.
270 </para>
271
272 <para revision="sysv">
273 <parameter>-Dsession_tracking=elogind</parameter>: This switch
274 is used to set <command>elogind</command> as the default
275 program for session tracking.
276 </para>
277
278 <para revision="systemd">
279 <parameter>-Dsession_tracking=systemd</parameter>: This switch
280 is used to set <command>systemd-logind</command> as the default
281 program for session tracking.
282 </para>
283
284 <para revision="systemd">
285 <parameter>-Dsystemdsystemunitdir=/lib/systemd/system</parameter>:
286 This switch is used to set the correct installation directory for
287 systemd units.
288 </para>
289
290 <para>
291 <parameter>-Dppp=false</parameter>: This parameter disables
292 <application>PPP</application> support in
293 <application>NetworkManager</application>.
294 </para>
295
296 <para>
297 <parameter>-Dlibaudit=no</parameter> and
298 <parameter>-Dselinux=false</parameter>: libaudit and SELinux are not used
299 in BLFS.
300 </para>
301
302 <para>
303 <parameter>-Dqt=false</parameter>: disables the
304 <application>QT</application> examples. Omit if you have
305 <application>QT</application> available and wish to install the examples.
306 </para>
307
308 </sect2>
309
310 <sect2 role="configuration">
311 <title>Configuring NetworkManager</title>
312
313 <sect3 id="NetworkManager-config">
314 <title>Config Files</title>
315 <para>
316 <filename>/etc/NetworkManager/NetworkManager.conf</filename>
317 </para>
318
319 <indexterm zone="NetworkManager NetworkManager-config">
320 <primary
321 sortas="e-etc-NetworkManager-NetworkManager.conf">
322 /etc/NetworkManager/NetworkManager.conf</primary>
323 </indexterm>
324
325 </sect3>
326
327 <sect3><title>Configuration Information</title>
328
329 <para>
330 For <application>NetworkManager</application> to work, at least
331 a minimal configuration file must be present. Such file is not
332 installed with <command>make install</command>. Issue the following
333 command as the <systemitem class="username">root</systemitem> user to
334 create minimal <filename>NetworkManager.conf</filename> file:
335 </para>
336
337<screen role="root"><userinput>cat &gt;&gt; /etc/NetworkManager/NetworkManager.conf &lt;&lt; "EOF"
338<literal>[main]
339plugins=keyfile</literal>
340EOF</userinput></screen>
341
342 <para>
343 This file should not be modified directly by users of the system.
344 Instead, system specific changes should be made using configuration
345 files in the
346 <filename class="directory">/etc/NetworkManager/conf.d</filename>
347 direcotry.
348 </para>
349
350 <para>
351 To allow polkit to manage authorizations, add the following
352 configuration file:
353 </para>
354
355<screen role="root"><userinput>cat &gt; /etc/NetworkManager/conf.d/polkit.conf &lt;&lt; "EOF"
356<literal>[main]
357auth-polkit=true</literal>
358EOF</userinput></screen>
359
360 <para>
361 To use something other than the built-in dhcp client (recommended if
362 using only <command>nmcli</command>), use the following configuration
363 (valid values are dhclient, dhcpcd, and internal):
364 </para>
365
366<screen role="nodump"><userinput>cat &gt; /etc/NetworkManager/conf.d/dhcp.conf &lt;&lt; "EOF"
367<literal>[main]
368dhcp=</literal><replaceable>dhclient</replaceable>
369EOF</userinput></screen>
370
371 <para>
372 To prevent <application>NetworkManager</application> from updating the
373 <filename>/etc/resolv.conf</filename> file, add the following
374 configuration file:
375 </para>
376
377<screen role="nodump"><userinput>cat &gt; /etc/NetworkManager/conf.d/no-dns-update.conf &lt;&lt; "EOF"
378<literal>[main]
379dns=none</literal>
380EOF</userinput></screen>
381
382 <para>
383 For additional configuation options, see
384 <command>man 5 NetworkManager.conf</command>.
385 </para>
386
387 <para>
388 To allow regular users permission to configure network connections,
389 you should add them to the
390 <systemitem class="groupname">netdev</systemitem>
391 group, and create a <application>polkit</application> rule that grants
392 access. Run the following commands as the
393 <systemitem class="username">root</systemitem> user:
394 </para>
395
396<screen role="root"><userinput>groupadd -fg 86 netdev &amp;&amp;
397/usr/sbin/usermod -a -G netdev <replaceable>&lt;username&gt;</replaceable>
398
399cat &gt; /usr/share/polkit-1/rules.d/org.freedesktop.NetworkManager.rules &lt;&lt; "EOF"
400<literal>polkit.addRule(function(action, subject) {
401 if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 &amp;&amp; subject.isInGroup("netdev")) {
402 return polkit.Result.YES;
403 }
404});</literal>
405EOF</userinput></screen>
406
407 </sect3>
408
409 <sect3 id="NetworkManager-init">
410 <title><phrase revision="sysv">Boot Script</phrase>
411 <phrase revision="systemd">Systemd Unit</phrase></title>
412
413 <para revision="sysv">
414 To automatically start the <command>NetworkManager</command> daemon
415 when the system is rebooted, install the
416 <filename>/etc/rc.d/init.d/networkmanager</filename>bootscript from the
417 <xref linkend="bootscripts"/> package.
418 </para>
419
420 <para revision="systemd">
421 To start the <command>NetworkManager</command> daemon at boot, enable
422 the previously installed systemd unit by running the following command
423 as the <systemitem class="username">root</systemitem> user:
424 </para>
425
426 <note>
427 <para>
428 If using <application>Network Manager</application> to manage
429 an interface, any previous configuration for that interface should be
430 removed, and the interface brought down prior to starting
431 <application>Network Manager</application>.
432 </para>
433 </note>
434
435 <indexterm zone="NetworkManager NetworkManager-init">
436 <primary sortas="f-NetworkManager">NetworkManager</primary>
437 </indexterm>
438
439<screen role="root" revision="sysv"><userinput>make install-networkmanager</userinput></screen>
440
441<screen role="root" revision="systemd"><userinput>systemctl enable NetworkManager</userinput></screen>
442
443 <para revision="systemd">
444 <application>NetworkManager</application> also ships a systemd unit
445 called <filename>NetworkManager-wait-online.service</filename> which
446 can be used to prevent services that require network connectivity
447 from starting until <application>NetworkManager</application> has
448 established the connection. To enable it, run the following command
449 as the <systemitem class="username">root</systemitem> user:
450 </para>
451
452<screen role="root" revision="systemd"><userinput>systemctl enable NetworkManager-wait-online</userinput></screen>
453
454 </sect3>
455
456 </sect2>
457
458 <sect2 role="content">
459 <title>Contents</title>
460
461 <segmentedlist>
462 <segtitle>Installed Programs</segtitle>
463 <segtitle>Installed Libraries</segtitle>
464 <segtitle>Installed Directories</segtitle>
465
466 <seglistitem>
467 <seg>
468 NetworkManager, nmcli, nm-online, nmtui, and, symlinked to nmtui:
469 nmtui-connect, nmtui-edit, and nmtui-hostname
470 </seg>
471 <seg>
472 libnm.so, libnm-glib.so, libnm-glib-vpn.so, libnm-util.so,
473 and several modules under /usr/lib/NetworkManager
474 </seg>
475 <seg>
476 /etc/NetworkManager,
477 /usr/include/{libnm,libnm-glib,NetworkManager},
478 /usr/lib/NetworkManager,
479 /usr/share/doc/NetworkManager-&NetworkManager-version;,
480 /usr/share/gtk-doc/html/{libnm,NetworkManager}
481 (if the documentation is built),
482 and
483 /var/lib/NetworkManager
484 </seg>
485 <!-- A lot of libraries were removed here. We should verify compatibilty.
486 RESTORED AT 1.18.2 -renodr -->
487 </seglistitem>
488 </segmentedlist>
489
490 <variablelist>
491 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
492 <?dbfo list-presentation="list"?>
493 <?dbhtml list-presentation="table"?>
494
495 <varlistentry id="nmcli">
496 <term><command>nmcli</command></term>
497 <listitem>
498 <para>
499 is a command-line tool for controlling
500 <application>NetworkManager</application>
501 and getting its status.
502 </para>
503 <indexterm zone="NetworkManager nmcli">
504 <primary sortas="b-nmcli">nmcli</primary>
505 </indexterm>
506 </listitem>
507 </varlistentry>
508
509 <varlistentry id="nm-online">
510 <term><command>nm-online</command></term>
511 <listitem>
512 <para>
513 is a utility to find out whether you are online.
514 </para>
515 <indexterm zone="NetworkManager nm-online">
516 <primary sortas="b-nm-online">nm-online</primary>
517 </indexterm>
518 </listitem>
519 </varlistentry>
520
521 <varlistentry id="nmtui">
522 <term><command>nmtui</command></term>
523 <listitem>
524 <para>
525 is an interactive ncurses based interface for
526 <application>nmcli</application>.
527 </para>
528 <indexterm zone="NetworkManager nmtui">
529 <primary sortas="b-nmtui">nmtui</primary>
530 </indexterm>
531 </listitem>
532 </varlistentry>
533
534 <varlistentry id="nmtui-connect">
535 <term><command>nmtui-connect</command></term>
536 <listitem>
537 <para>
538 is an interactive ncurses based interface connection to
539 activate/deactivate connections.
540 </para>
541 <indexterm zone="NetworkManager nmtui-connect">
542 <primary sortas="b-nmtui-connect">nmtui-connect</primary>
543 </indexterm>
544 </listitem>
545 </varlistentry>
546
547 <varlistentry id="nmtui-edit">
548 <term><command>nmtui-edit</command></term>
549 <listitem>
550 <para>
551 is an interactive ncurses based interface connection editor.
552 </para>
553 <indexterm zone="NetworkManager nmtui-edit">
554 <primary sortas="b-nmtui-edit">nmtui-edit</primary>
555 </indexterm>
556 </listitem>
557 </varlistentry>
558
559 <varlistentry id="nmtui-hostname">
560 <term><command>nmtui-hostname</command></term>
561 <listitem>
562 <para>
563 is an interactive ncurses based interface hostname editor.
564 </para>
565 <indexterm zone="NetworkManager nmtui-hostname">
566 <primary sortas="b-nmtui-hostname">nmtui-hostname</primary>
567 </indexterm>
568 </listitem>
569 </varlistentry>
570
571 <varlistentry id="NetworkManager-prog">
572 <term><command>NetworkManager</command></term>
573 <listitem>
574 <para>
575 is the network management daemon.
576 </para>
577 <indexterm zone="NetworkManager NetworkManager-prog">
578 <primary sortas="b-NetworkManager">NetworkManager</primary>
579 </indexterm>
580 </listitem>
581 </varlistentry>
582
583 <varlistentry id="libnm">
584 <term><filename class="libraryfile">libnm.so</filename></term>
585 <listitem>
586 <para>
587 contains functions used by <application>NetworkManager</application>.
588 </para>
589 <indexterm zone="NetworkManager libnm">
590 <primary sortas="c-libnm">libnm.so</primary>
591 </indexterm>
592 </listitem>
593 </varlistentry>
594
595 <varlistentry id="libnm-glib">
596 <term><filename class="libraryfile">libnm-glib.so</filename></term>
597 <listitem>
598 <para>
599 contains the GLib bindings to
600 <application>NetworkManager</application>
601 </para>
602 <indexterm zone="NetworkManager libnm-glib">
603 <primary sortas="c-libnm-glib">libnm-glib.so</primary>
604 </indexterm>
605 </listitem>
606 </varlistentry>
607
608 <varlistentry id="libnm-glib-vpn">
609 <term><filename class="libraryfile">libnm-glib-vpn.so</filename></term>
610 <listitem>
611 <para>
612 contains the VPN portion of the GLib bindings to
613 <application>NetworkManager</application>
614 </para>
615 <indexterm zone="NetworkManager libnm-glib-vpn">
616 <primary sortas="c-libnm-glib-vpn">libnm-glib-vpn.so</primary>
617 </indexterm>
618 </listitem>
619 </varlistentry>
620
621 <varlistentry id="libnm-util">
622 <term><filename class="libraryfile">libnm-util.so</filename></term>
623 <listitem>
624 <para>
625 contains various functions for utilities that use
626 <application>NetworkManager</application>
627 </para>
628 <indexterm zone="NetworkManager libnm-util">
629 <primary sortas="c-libnm-util">libnm-util.so</primary>
630 </indexterm>
631 </listitem>
632 </varlistentry>
633 </variablelist>
634
635 </sect2>
636
637</sect1>
Note: See TracBrowser for help on using the repository browser.