Debian Codegraph @

man/NetworkManager.xml

raw
1 <?xml version='1.0'?>
2 <?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
4 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
5 <!ENTITY % entities SYSTEM "common.ent" >
6 %entities;
7 ]>
8
9 <!--
10 SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
11
12 NetworkManager(8) manual page
13
14 Copyright 2005 - 2016 Red Hat, Inc.
15 Copyright 2005 - 2009 Novell, Inc.
16 Copyright 2005 Robert Love
17 -->
18
19 <refentry id="NetworkManager">
20 <refentryinfo>
21 <title>NetworkManager</title>
22 <author>NetworkManager developers</author>
23 </refentryinfo>
24 <refmeta>
25 <refentrytitle>NetworkManager</refentrytitle>
26 <manvolnum>8</manvolnum>
27 <refmiscinfo class="source">NetworkManager</refmiscinfo>
28 <refmiscinfo class="manual">Network management daemons</refmiscinfo>
29 <refmiscinfo class="version">&NM_VERSION;</refmiscinfo>
30 </refmeta>
31
32 <refnamediv>
33 <refname>NetworkManager</refname>
34 <refpurpose>network management daemon</refpurpose>
35 </refnamediv>
36
37 <refsynopsisdiv>
38 <cmdsynopsis>
39 <command>NetworkManager <arg choice="opt" rep="repeat">OPTIONS</arg></command>
40 </cmdsynopsis>
41 </refsynopsisdiv>
42
43 <refsect1>
44 <title>Description</title>
45 <para>
46 The NetworkManager daemon attempts to make networking
47 configuration and operation as painless and automatic as
48 possible by managing the primary network connection and other
49 network interfaces, like Ethernet, Wi-Fi, and Mobile Broadband
50 devices. NetworkManager will connect any network device when a
51 connection for that device becomes available, unless that
52 behavior is disabled. Information about networking is exported
53 via a D-Bus interface to any interested application, providing a
54 rich API with which to inspect and control network settings and
55 operation.
56 </para>
57 </refsect1>
58
59 <refsect1>
60 <title>Dispatcher scripts</title>
61 <para>
62 NetworkManager-dispatcher service can execute scripts for the user
63 in response to network events. See
64 <link linkend='NetworkManager-dispatcher'><citerefentry><refentrytitle>NetworkManager-dispatcher</refentrytitle><manvolnum>8</manvolnum></citerefentry></link> manual.
65 </para>
66 </refsect1>
67
68 <refsect1>
69 <title>Options</title>
70
71 <para>The following options are understood:</para>
72
73 <variablelist>
74 <varlistentry>
75 <term><option>--version</option> | <option>-V</option></term>
76 <listitem><para>Print the NetworkManager software version and exit.
77 </para></listitem>
78 </varlistentry>
79 <varlistentry>
80 <term><option>--help</option> | <option>-h</option></term>
81 <listitem><para>Print NetworkManager's available options and exit.
82 </para></listitem>
83 </varlistentry>
84 <varlistentry>
85 <term><option>--no-daemon</option> | <option>-n</option></term>
86 <listitem><para>Do not daemonize.
87 </para></listitem>
88 </varlistentry>
89 <varlistentry>
90 <term><option>--debug</option> | <option>-d</option></term>
91 <listitem><para>Do not daemonize, and direct log output to the
92 controlling terminal in addition to syslog.
93 </para></listitem>
94 </varlistentry>
95 <varlistentry>
96 <term><option>--pid-file</option> | <option>-p</option></term>
97 <listitem><para>Specify location of a PID file. The PID file
98 is used for storing PID of the running process and prevents
99 running multiple instances.
100 </para></listitem>
101 </varlistentry>
102 <varlistentry>
103 <term><option>--state-file</option></term>
104 <listitem><para>Specify file for storing state of the
105 NetworkManager persistently. If not specified, the default
106 value of <filename>/var/lib/NetworkManager/NetworkManager.state</filename>
107 is used.
108 </para></listitem>
109 </varlistentry>
110 <varlistentry>
111 <term><option>--config</option></term>
112 <listitem><para> Specify configuration file to set up various
113 settings for NetworkManager. If not specified, the default
114 value of <filename>/etc/NetworkManager/NetworkManager.conf</filename>
115 is used with
116 a fallback to the older 'nm-system-settings.conf' if located
117 in the same directory. See
118 <link linkend='NetworkManager.conf'><citerefentry><refentrytitle>NetworkManager.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>
119 for more information on configuration file.
120 </para></listitem>
121 </varlistentry>
122 <varlistentry>
123 <term><arg choice='plain'><option>--configure-and-quit</option></arg><arg>initrd</arg></term>
124 <listitem><para>Quit after all devices reach a stable state.
125 The optional <literal>initrd</literal> parameter enables mode, where no
126 processes are left running after NetworkManager stops, which is useful
127 for running from an initial ramdisk on rearly boot.</para></listitem>
128 </varlistentry>
129 <varlistentry>
130 <term><option>--plugins</option></term>
131 <listitem><para>List plugins used to manage system-wide
132 connection settings. This list has preference over plugins
133 specified in the configuration file. See <literal>main.plugins</literal>
134 setting in <link linkend='NetworkManager.conf'><citerefentry><refentrytitle>NetworkManager.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>
135 for supported options.
136 </para></listitem>
137 </varlistentry>
138 <varlistentry>
139 <term><option>--log-level</option></term>
140 <listitem><para>
141 Sets how much information NetworkManager sends to the log destination (usually
142 syslog's "daemon" facility). By default, only informational, warning, and error
143 messages are logged. See the section on <literal>logging</literal> in
144 <link linkend='NetworkManager.conf'><citerefentry><refentrytitle>NetworkManager.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>
145 for more information.
146 </para></listitem>
147 </varlistentry>
148 <varlistentry>
149 <term><option>--log-domains</option></term>
150 <listitem><para>
151 A comma-separated list specifying which operations are logged to the log
152 destination (usually syslog). By default, most domains are logging-enabled.
153 See the section on <literal>logging</literal> in
154 <link linkend='NetworkManager.conf'><citerefentry><refentrytitle>NetworkManager.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>
155 for more information.
156 </para></listitem>
157 </varlistentry>
158 <varlistentry>
159 <term><option>--print-config</option></term>
160 <listitem>
161 <para>
162 Print the NetworkManager configuration to stdout and exit. See
163 <link linkend='NetworkManager.conf'><citerefentry><refentrytitle>NetworkManager.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>.
164 This does not include connection profiles. View them with <command>nmcli connection</command>.
165 </para>
166 <para>
167 This reads configuration files from disk. If NetworkManager is currently running,
168 make sure that it has the same configuration loaded.
169 </para>
170 </listitem>
171 </varlistentry>
172 </variablelist>
173 </refsect1>
174
175 <refsect1>
176 <title>Udev Properties</title>
177
178 <para>
179 <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>
180 device manager is used for the network device discovery. The following
181 property influences how NetworkManager manages the devices:
182 </para>
183
184 <variablelist>
185 <varlistentry>
186 <term><varname>NM_UNMANAGED</varname></term>
187 <listitem><para>
188 If set to <literal>"1"</literal> or <literal>"true"</literal>, the device is
189 configured as unmanaged by NetworkManager. Note that the user still can
190 explicitly overrule this configuration via means like
191 <command>nmcli device set "$DEVICE" managed yes</command> or
192 <literal>"device*.managed=1"</literal> in NetworkManager.conf.
193 </para>
194 </listitem>
195 </varlistentry>
196 <varlistentry>
197 <term><varname>ID_NET_MANAGED_BY</varname></term>
198 <listitem><para>
199 If <varname>NM_UNMANAGED</varname> is set, this has no effect. Otherwise,
200 if the attribute is set to anything but
201 <literal>"org.freedesktop.NetworkManager"</literal>, the device is unmanaged.
202 </para>
203 </listitem>
204 </varlistentry>
205 <varlistentry>
206 <term><varname>NM_AUTO_DEFAULT_LINK_LOCAL_ONLY</varname></term>
207 <listitem><para>
208 If set to <literal>"1"</literal> or <literal>"true"</literal>, the
209 automatically generated connections "Wired connection N" will only
210 enable link local addressing for IPv4 and IPv6. This can be useful
211 on thunderbolt devices or host-to-host USB devices.
212 </para>
213 </listitem>
214 </varlistentry>
215 <varlistentry>
216 <term><varname>ID_NET_AUTO_LINK_LOCAL_ONLY</varname></term>
217 <listitem><para>
218 Honored and treated the same as if <varname>NM_AUTO_DEFAULT_LINK_LOCAL_ONLY</varname>
219 were set.
220 </para>
221 </listitem>
222 </varlistentry>
223 <varlistentry>
224 <term><varname>ID_NET_DHCP_BROADCAST</varname></term>
225 <listitem><para>
226 If set to <literal>"1"</literal> or <literal>"true"</literal>, use
227 broadcast requests for DHCPv4 offers. This can make sense of devices
228 that can't handle unicast messages until being configured.
229 </para>
230 </listitem>
231 </varlistentry>
232 </variablelist>
233 </refsect1>
234
235 <refsect1>
236 <title>SIGNALS</title>
237 <para>
238 NetworkManager process handles the following signals:
239 <variablelist>
240 <varlistentry>
241 <term><varname>SIGHUP</varname></term>
242 <listitem><para>
243 The signal causes a reload of NetworkManager's configuration.
244 Note that not all configuration parameters can be changed at
245 runtime and therefore some changes may be applied only after
246 the next restart of the daemon.
247 A SIGHUP also involves further reloading actions, like doing
248 a DNS update and restarting the DNS plugin. The latter can be
249 useful for example when using the dnsmasq plugin and changing
250 its configuration in <filename>/etc/NetworkManager/dnsmasq.d</filename>.
251 However, it also means this will shortly interrupt name resolution.
252 In the future, there may be further actions added.
253 A SIGHUP means to update NetworkManager configuration and reload
254 everything that is supported. Note that this does not reload
255 connections from disk. For that there is a D-Bus API and
256 nmcli's reload action
257 </para></listitem>
258 </varlistentry>
259 <varlistentry>
260 <term><varname>SIGUSR1</varname></term>
261 <listitem><para>
262 The signal forces a rewrite of DNS configuration. Contrary
263 to SIGHUP, this does not restart the DNS plugin and will not
264 interrupt name resolution.
265
266 When NetworkManager is not managing DNS, the signal forces
267 a restart of operations that depend on the DNS
268 configuration (like the resolution of the system hostname
269 via reverse DNS, or the resolution of WireGuard peers);
270 therefore, it can be used to tell NetworkManager that the
271 content of resolv.conf was changed externally.
272
273 In the future, further actions may be added. A SIGUSR1
274 means to write out data like resolv.conf, or refresh a cache.
275 It is a subset of what is done for SIGHUP without reloading
276 configuration from disk.
277 </para></listitem>
278 </varlistentry>
279 <varlistentry>
280 <term><varname>SIGUSR2</varname></term>
281 <listitem><para>
282 The signal has no effect at the moment but is reserved for future
283 use.
284 </para></listitem>
285 </varlistentry>
286 </variablelist>
287 </para>
288 <para>
289 An alternative to a signal to reload configuration is the Reload D-Bus call.
290 It allows for more fine-grained selection of what to reload, it only returns
291 after the reload is complete, and it is guarded by PolicyKit.
292 </para>
293 </refsect1>
294
295 <refsect1>
296 <title>Debugging</title>
297 <para>
298 NetworkManager only configures your system. So when your networking setup doesn't
299 work as expected, the first step is to look at your system to understand what is actually
300 configured, and whether that is correct. The second step is to find out how to tell
301 NetworkManager to do the right thing.
302 </para>
303 <para>
304 You can for example try to <command>ping</command> hosts (by
305 IP address or DNS name), look at <command>ip link show</command>, <command>ip address show</command> and <command>ip route show</command>,
306 and look at <filename>/etc/resolv.conf</filename> for name resolution issues.
307 Also look at the connection profiles that you have configured in NetworkManager (<command>nmcli connection</command>
308 and <command>nmcli connection show "$PROFILE"</command>)
309 and the configured interfaces (<command>nmcli device</command>).
310 </para>
311 <para>
312 If that does not suffice, look at the logfiles of NetworkManager. NetworkManager
313 logs to syslog, so depending on your system configuration you can call <command>journalctl</command>
314 to get the logs.
315 By default, NetworkManager logs are not verbose and thus not very helpful for investigating
316 a problem in detail. You can change the logging level at runtime with <command>nmcli general logging level TRACE domains ALL</command>.
317 But usually a better way is to collect full logs from the start, by configuring
318 <literal>level=TRACE</literal> in NetworkManager.conf. See
319 <link linkend='NetworkManager.conf'><citerefentry><refentrytitle>NetworkManager.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>
320 manual. Note that trace logs of NetworkManager are verbose and systemd-journald might rate limit
321 some lines. Possibly disable rate limiting first with the <literal>RateLimitIntervalSec</literal> and
322 <literal>RateLimitBurst</literal> options of journald (see
323 <link linkend='journald.conf'><citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></link> manual).
324 </para>
325 <para>
326 NetworkManager does not log any secrets. However, you are advised to check whether anything
327 private sensitive gets logged before posting. When reporting an issue, provide complete
328 logs and avoid modifications (for privacy) that distort the meaning.
329 </para>
330 </refsect1>
331
332 <refsect1>
333 <title>/var/lib/NetworkManager/secret_key and /etc/machine-id</title>
334
335 <para>
336 The identity of a machine is important as various settings depend on it. For example,
337 <literal>ipv6.addr-gen-mode=stable</literal> and <literal>ethernet.cloned-mac-address=stable</literal>
338 generate identifiers by hashing the machine's identity. See also the
339 <literal>connection.stable-id</literal> connection property which is a per-profile seed
340 that gets hashed with the machine identity for generating such addresses and identifiers.
341 </para>
342 <para>
343 If you backup and restore a machine, the identity of the machine probably should be preserved.
344 In that case, preserve the files <filename>/var/lib/NetworkManager/secret_key</filename> and
345 <literal>/etc/machine-id</literal>. On the other hand, if you clone a virtual machine, you
346 probably want that the clone has a different identity. There is already existing tooling on Linux for
347 handling <literal>/etc/machine-id</literal> (see
348 <link linkend='machine-id'><citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>).
349 </para>
350 <para>
351 The identity of the machine is determined by the <filename>/var/lib/NetworkManager/secret_key</filename>.
352 If such a file does not exist, NetworkManager will create a file with random content. To generate
353 a new identity just delete the file and after restart a new file will be created.
354 The file should be read-only to root and contain at least 16 bytes that will be used to seed the various places
355 where a stable identifier is used.
356 </para>
357 <para>
358 Since 1.16.0, NetworkManager supports a version 2 of secret-keys. For such keys
359 <filename>/var/lib/NetworkManager/secret_key</filename> starts with ASCII <literal>"nm-v2:"</literal>
360 followed by at least 32 bytes of random data.
361 Also, recent versions of NetworkManager always create such kinds of secret-keys, when
362 the file does not yet exist.
363 With version 2 of the secret-key, <literal>/etc/machine-id</literal> is also hashed as part
364 of the generation for addresses and identifiers. The advantage is that you can keep <filename>/var/lib/NetworkManager/secret_key</filename>
365 stable, and only regenerate <literal>/etc/machine-id</literal> when cloning a VM.
366 </para>
367 </refsect1>
368
369 <refsect1>
370 <title>Bugs</title>
371 <para>
372 Please report any bugs you find in NetworkManager at the
373 <ulink url="https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues">NetworkManager issue tracker</ulink>.
374 </para>
375 </refsect1>
376
377 <refsect1>
378 <title>See Also</title>
379 <para>
380 <ulink url="https://networkmanager.dev">NetworkManager home page</ulink>,
381 <link linkend='NetworkManager.conf'><citerefentry><refentrytitle>NetworkManager.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
382 <link linkend='NetworkManager-dispatcher'><citerefentry><refentrytitle>NetworkManager-dispatcher</refentrytitle><manvolnum>8</manvolnum></citerefentry></link>,
383 <link linkend='NetworkManager-wait-online.service'><citerefentry><refentrytitle>NetworkManager-wait-online.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></link>,
384 <link linkend='nmcli'><citerefentry><refentrytitle>nmcli</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>,
385 <link linkend='nmcli-examples'><citerefentry><refentrytitle>nmcli-examples</refentrytitle><manvolnum>7</manvolnum></citerefentry></link>,
386 <link linkend='nm-online'><citerefentry><refentrytitle>nm-online</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>,
387 <link linkend='nm-settings-nmcli'><citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
388 <citerefentry><refentrytitle>nm-applet</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
389 <citerefentry><refentrytitle>nm-connection-editor</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
390 <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>
391 </para>
392 </refsect1>
393 </refentry>