1NETWORKMANAGER.CONF(5) Configuration NETWORKMANAGER.CONF(5)
2
3
4
6 NetworkManager.conf - NetworkManager configuration file
7
9 /etc/NetworkManager/NetworkManager.conf,
10 /etc/NetworkManager/conf.d/name.conf,
11 /run/NetworkManager/conf.d/name.conf,
12 /usr/lib/NetworkManager/conf.d/name.conf,
13 /var/lib/NetworkManager/NetworkManager-intern.conf
14
16 NetworkManager.conf is the configuration file for NetworkManager. It is
17 used to set up various aspects of NetworkManager's behavior. The
18 location of the main file and configuration directories may be changed
19 through use of the --config, --config-dir, --system-config-dir, and
20 --intern-config argument for NetworkManager, respectively.
21
22 If a default NetworkManager.conf is provided by your distribution's
23 packages, you should not modify it, since your changes may get
24 overwritten by package updates. Instead, you can add additional .conf
25 files to the /etc/NetworkManager/conf.d directory. These will be read
26 in order, with later files overriding earlier ones. Packages might
27 install further configuration snippets to
28 /usr/lib/NetworkManager/conf.d. This directory is parsed first, even
29 before NetworkManager.conf. Scripts can also put per-boot configuration
30 into /run/NetworkManager/conf.d. This directory is parsed second, also
31 before NetworkManager.conf. The loading of a file
32 /run/NetworkManager/conf.d/name.conf can be prevented by adding a file
33 /etc/NetworkManager/conf.d/name.conf. Likewise, a file
34 /usr/lib/NetworkManager/conf.d/name.conf can be shadowed by putting a
35 file of the same name to either /etc/NetworkManager/conf.d or
36 /run/NetworkManager/conf.d.
37
38 NetworkManager can overwrite certain user configuration options via
39 D-Bus or other internal operations. In this case it writes those
40 changes to /var/lib/NetworkManager/NetworkManager-intern.conf. This
41 file is not intended to be modified by the user, but it is read last
42 and can shadow user configuration from NetworkManager.conf.
43
44 Certain settings from the configuration can be reloaded at runtime
45 either by sending SIGHUP signal or via D-Bus' Reload call.
46
47 NetworkManager does not require any configuration in
48 NetworkManager.conf. Depending on your use case, you may remove all
49 files to restore the default configuration (factory reset). But note
50 that your distribution or other packages may drop configuration
51 snippets for NetworkManager, such that they are part of the factory
52 default.
53
55 The configuration file format is so-called key file (sort of ini-style
56 format). It consists of sections (groups) of key-value pairs. Lines
57 beginning with a '#' and blank lines are considered comments. Sections
58 are started by a header line containing the section enclosed in '[' and
59 ']', and ended implicitly by the start of the next section or the end
60 of the file. Each key-value pair must be contained in a section.
61
62 For keys that take a list of devices as their value, you can specify
63 devices by their MAC addresses or interface names, or "*" to specify
64 all devices. See the section called “Device List Format” below.
65
66 A simple configuration file looks like this:
67
68 [main]
69 plugins=keyfile
70
71 As an extension to the normal keyfile format, you can also append a
72 value to a previously-set list-valued key by doing:
73
74 plugins+=another-plugin
75 plugins-=remove-me
76
77
79 plugins
80 Lists system settings plugin names separated by ','. These plugins
81 are used to read and write system-wide connection profiles. When
82 multiple plugins are specified, the connections are read from all
83 listed plugins. When writing connections, the plugins will be asked
84 to save the connection in the order listed here; if the first
85 plugin cannot write out that connection type (or can't write out
86 any connections) the next plugin is tried, etc. If none of the
87 plugins can save the connection, an error is returned to the user.
88
89 The default value and the number of available plugins is
90 distro-specific. See the section called “PLUGINS” below for the
91 available plugins. Note that NetworkManager's native keyfile plugin
92 is always appended to the end of this list (if it doesn't already
93 appear earlier in the list).
94
95 monitor-connection-files
96 This setting is deprecated and has no effect. Profiles from disk
97 are never automatically reloaded. Use for example nmcli connection
98 (re)load for that.
99
100 auth-polkit
101 Whether the system uses PolicyKit for authorization. If true,
102 non-root requests are authorized using PolicyKit. Requests from
103 root (user ID zero) are always granted without asking PolicyKit. If
104 false, all requests will be allowed and PolicyKit is not used. If
105 set to root-only PolicyKit is not used and all requests except root
106 are denied. The default value is true.
107
108 dhcp
109 This key sets up what DHCP client NetworkManager will use. Allowed
110 values are dhclient, dhcpcd, and internal. The dhclient and dhcpcd
111 options require the indicated clients to be installed. The internal
112 option uses a built-in DHCP client which is not currently as
113 featureful as the external clients.
114
115 If this key is missing, it defaults to internal. If the chosen
116 plugin is not available, clients are looked for in this order:
117 dhclient, dhcpcd, internal.
118
119 no-auto-default
120 Specify devices for which NetworkManager shouldn't create default
121 wired connection (Auto eth0). By default, NetworkManager creates a
122 temporary wired connection for any Ethernet device that is managed
123 and doesn't have a connection configured. List a device in this
124 option to inhibit creating the default connection for the device.
125 May have the special value * to apply to all devices.
126
127 When the default wired connection is deleted or saved to a new
128 persistent connection by a plugin, the device is added to a list in
129 the file /var/lib/NetworkManager/no-auto-default.state to prevent
130 creating the default connection for that device again.
131
132 See the section called “Device List Format” for the syntax how to
133 specify a device.
134
135 Example:
136
137 no-auto-default=00:22:68:5c:5d:c4,00:1e:65:ff:aa:ee
138 no-auto-default=eth0,eth1
139 no-auto-default=*
140
141
142 ignore-carrier
143 This setting is deprecated for the per-device setting
144 ignore-carrier which overwrites this setting if specified (See
145 ignore-carrier). Otherwise, it is a list of matches to specify for
146 which device carrier should be ignored. See the section called
147 “Device List Format” for the syntax how to specify a device. Note
148 that master types like bond, bridge, and team ignore carrier by
149 default. You can however revert that default using the "except:"
150 specifier (or better, use the per-device setting instead of the
151 deprecated setting).
152
153 assume-ipv6ll-only
154 Specify devices for which NetworkManager will try to generate a
155 connection based on initial configuration when the device only has
156 an IPv6 link-local address.
157
158 See the section called “Device List Format” for the syntax how to
159 specify a device.
160
161 configure-and-quit
162 This option is no longer useful to configure in NetworkManager.conf
163 file. It can however also be configured on the command line with
164 the same values, where it has some use.
165
166 When set to 'initrd', NetworkManager does not connect to D-Bus and
167 quits after configuring the network. This is an implementation
168 detail how the NetworkManager module of dracut can run
169 NetworkManager. An alternative to this is having NetworkManager as
170 a systemd service with D-Bus in initrd.
171
172 The value 'true' is unsupported since version 1.36. Previously this
173 was a mode where NetworkManager would quit after configuring the
174 network and run helper processes for DHCP and SLAAC.
175
176 Otherwise, NetworkManager runs a system service with D-Bus and does
177 not quit during normal operation.
178
179 hostname-mode
180 Set the management mode of the hostname. This parameter will affect
181 only the transient hostname. If a valid static hostname is set,
182 NetworkManager will skip the update of the hostname despite the
183 value of this option. An hostname empty or equal to 'localhost',
184 'localhost6', 'localhost.localdomain' or 'localhost6.localdomain'
185 is considered invalid.
186
187 default: NetworkManager will update the hostname with the one
188 provided via DHCP or reverse DNS lookup of the IP address on the
189 connection with the default route or on any connection with the
190 property hostname.only-from-default set to 'false'. Connections are
191 considered in order of increasing value of the hostname.priority
192 property. In case multiple connections have the same priority,
193 connections activated earlier are considered first. If no hostname
194 can be determined in such way, the hostname will be updated to the
195 last one set outside NetworkManager or to 'localhost.localdomain'.
196
197 dhcp: this is similar to 'default', with the difference that after
198 trying to get the DHCP hostname, reverse DNS lookup is not done.
199 Note that selecting this option is equivalent to setting the
200 property 'hostname.from-dns-lookup' to 'false' globally for all
201 connections in NetworkManager.conf.
202
203 none: NetworkManager will not manage the transient hostname and
204 will never set it.
205
206 dns
207 Set the DNS processing mode.
208
209 If the key is unspecified, default is used, unless /etc/resolv.conf
210 is a symlink to /run/systemd/resolve/stub-resolv.conf,
211 /run/systemd/resolve/resolv.conf, /lib/systemd/resolv.conf or
212 /usr/lib/systemd/resolv.conf. In that case, systemd-resolved is
213 chosen automatically.
214
215 default: NetworkManager will update /etc/resolv.conf to reflect the
216 nameservers provided by currently active connections. The
217 rc-manager setting (below) controls how this is done.
218
219 dnsmasq: NetworkManager will run dnsmasq as a local caching
220 nameserver, using "Conditional Forwarding" if you are connected to
221 a VPN, and then update resolv.conf to point to the local
222 nameserver. It is possible to pass custom options to the dnsmasq
223 instance by adding them to files in the
224 "/etc/NetworkManager/dnsmasq.d/" directory. Note that when multiple
225 upstream servers are available, dnsmasq will initially contact them
226 in parallel and then use the fastest to respond, probing again
227 other servers after some time. This behavior can be modified
228 passing the 'all-servers' or 'strict-order' options to dnsmasq (see
229 the manual page for more details).
230
231 systemd-resolved: NetworkManager will push the DNS configuration to
232 systemd-resolved
233
234 none: NetworkManager will not modify resolv.conf. This implies
235 rc-manager unmanaged
236
237 Note that the plugins dnsmasq and systemd-resolved are caching
238 local nameservers. Hence, when NetworkManager writes
239 /run/NetworkManager/resolv.conf and /etc/resolv.conf (according to
240 rc-manager setting below), the name server there will be localhost
241 only. NetworkManager also writes a file
242 /run/NetworkManager/no-stub-resolv.conf that contains the original
243 name servers pushed to the DNS plugin.
244
245 When using dnsmasq and systemd-resolved per-connection added dns
246 servers will always be queried using the device the connection has
247 been activated on.
248
249 rc-manager
250 Set the resolv.conf management mode. This option is about how
251 NetworkManager writes to /etc/resolv.conf, if at all. The default
252 value depends on NetworkManager build options, and this version of
253 NetworkManager was build with a default of "auto". Regardless of
254 this setting, NetworkManager will always write its version of
255 resolv.conf to its runtime state directory as
256 /run/NetworkManager/resolv.conf.
257
258 If you configure dns=none or make /etc/resolv.conf immutable with
259 chattr +i, NetworkManager will ignore this setting and always
260 choose unmanaged (below).
261
262 auto: if systemd-resolved plugin is configured via the dns setting
263 or if it gets detected as main DNS plugin, NetworkManager will
264 update systemd-resolved without touching /etc/resolv.conf.
265 Alternatively, if resolvconf or netconfig are enabled at compile
266 time and the respective binary is found, NetworkManager will
267 automatically use it. Note that if you install or uninstall these
268 binaries, you need to reload the rc-manager setting with SIGHUP or
269 systemctl reload NetworkManager. As last fallback it uses the
270 symlink option (see next).
271
272 symlink: If /etc/resolv.conf is a regular file or does not exist,
273 NetworkManager will write the file directly. If /etc/resolv.conf is
274 instead a symlink, NetworkManager will leave it alone. Unless the
275 symlink points to the internal file
276 /run/NetworkManager/resolv.conf, in which case the symlink will be
277 updated to emit an inotify notification. This allows the user to
278 conveniently instruct NetworkManager not to manage /etc/resolv.conf
279 by replacing it with a symlink.
280
281 file: NetworkManager will write /etc/resolv.conf as regular file.
282 If it finds a symlink to an existing target, it will follow the
283 symlink and update the target instead. In no case will an existing
284 symlink be replaced by a file. Note that older versions of
285 NetworkManager behaved differently and would replace dangling
286 symlinks with a plain file.
287
288 resolvconf: NetworkManager will run resolvconf to update the DNS
289 configuration.
290
291 netconfig: NetworkManager will run netconfig to update the DNS
292 configuration.
293
294 unmanaged: don't touch /etc/resolv.conf.
295
296 none: deprecated alias for symlink.
297
298 systemd-resolved
299 Send the connection DNS configuration to systemd-resolved. Defaults
300 to "true".
301
302 Note that this setting is complementary to the dns setting. You can
303 keep this enabled while using dns set to another DNS plugin
304 alongside systemd-resolved, or dns set to systemd-resolved to
305 configure the system resolver to use systemd-resolved.
306
307 If systemd-resolved is enabled, the connectivity check resolves the
308 hostname per-device.
309
310 debug
311 Comma separated list of options to aid debugging. This value will
312 be combined with the environment variable NM_DEBUG. Currently, the
313 following values are supported:
314
315 RLIMIT_CORE: set ulimit -c unlimited to write out core dumps.
316 Beware, that a core dump can contain sensitive information such as
317 passwords or configuration settings.
318
319 fatal-warnings: set g_log_set_always_fatal() to core dump on
320 warning messages from glib. This is equivalent to the
321 --g-fatal-warnings command line option.
322
323 autoconnect-retries-default
324 The number of times a connection activation should be automatically
325 tried before switching to another one. This value applies only to
326 connections that can auto-connect and have a
327 connection.autoconnect-retries property set to -1. If not
328 specified, connections will be tried 4 times. Setting this value to
329 1 means to try activation once, without retry.
330
331 slaves-order
332 This key specifies in which order slave connections are
333 auto-activated on boot or when the master activates them. Allowed
334 values are name (order connection by interface name, the default),
335 or index (order slaves by their kernel index).
336
337 firewall-backend
338 The firewall backend for configuring masquerading with shared mode.
339 Set to either iptables, nftables or none. iptables and nftables
340 require iptables and nft application, respectively. none means to
341 skip firewall configuration if the users wish to manage firewall
342 themselves. If unspecified, it will be auto detected.
343
344 iwd-config-path
345 If the value is "auto" (the default), IWD is queried for its
346 current state directory when it appears on D-Bus -- the directory
347 where IWD keeps its network configuration files -- usually
348 /var/lib/iwd. NetworkManager will then attempt to write copies of
349 new or modified Wi-Fi connection profiles, converted into the IWD
350 format, into this directory thus making IWD connection properties
351 editable. NM will overwrite existing files without preserving their
352 contents.
353
354 The path can also be overriden by pointing to a specific existing
355 and writable directory. On the other hand setting this to an empty
356 string or any other value disables the profile conversion
357 mechanism.
358
359 This mechanism allows editing connection profile settings such as
360 the 802.1x configuration using NetworkManager clients. Without it
361 such changes have no effect in IWD.
362
364 This section contains keyfile-plugin-specific options, and is normally
365 only used when you are not using any other distro-specific plugin.
366
367 hostname
368 This key is deprecated and has no effect since the hostname is now
369 stored in /etc/hostname or other system configuration files
370 according to build options.
371
372 path
373 The location where keyfiles are read and stored. This defaults to
374 "/etc/NetworkManager/system-connections".
375
376 unmanaged-devices
377 Set devices that should be ignored by NetworkManager.
378
379 A device unmanaged due to this option is strictly unmanaged and
380 cannot be overruled by using the API like nmcli device set $IFNAME
381 managed yes. Also, a device that is unmanaged for other reasons,
382 like an udev rule, cannot be made managed with this option (e.g. by
383 using an except: specifier). These two points make it different
384 from the device*.managed option which for that reason may be a
385 better choice.
386
387 See the section called “Device List Format” for the syntax on how
388 to specify a device.
389
390 Example:
391
392 unmanaged-devices=interface-name:em4
393 unmanaged-devices=mac:00:22:68:1c:59:b1;mac:00:1E:65:30:D1:C4;interface-name:eth2
394
395
397 This section contains ifupdown-specific options and thus only has
398 effect when using the ifupdown plugin.
399
400 managed
401 If set to true, then interfaces listed in /etc/network/interfaces
402 are managed by NetworkManager. If set to false, then any interface
403 listed in /etc/network/interfaces will be ignored by
404 NetworkManager. Remember that NetworkManager controls the default
405 route, so because the interface is ignored, NetworkManager may
406 assign the default route to some other interface.
407
408 The default value is false.
409
411 This section controls NetworkManager's logging. Logging is very
412 important to understand what NetworkManager is doing. When you report a
413 bug, do not unnecessarily filter or limit the log file. Just enable
414 level=TRACE and domains=ALL to collect everything.
415
416 The recommended way for enabling logging is with a file
417 /etc/NetworkManager/conf.d/95-logging.conf that contains
418
419 [logging]
420 level=TRACE
421 domains=ALL
422
423 and restart the daemon with systemctl restart NetworkManager. Then
424 reproduce the problem. You can find the logs in syslog (for example
425 journalctl).
426
427 Any settings here are overridden by the --log-level and --log-domains
428 command-line options. Logging can also be reconfigured at runtime with
429 nmcli general logging level "$LEVEL" domains "$DOMAINS". However, often
430 it is interesting to get a complete log from the start. Especially,
431 when debugging an issue, enable debug logging in NetworkManager.conf
432 and restart the service to enable verbose logging early on.
433
434 By setting nm.debug on the kernel command line (either from
435 /run/NetworkManager/proc-cmdline or /proc/cmdline), debug logging is
436 enabled. This overrides both the command-line options and the settings
437 from NetworkManager.conf.
438
439 NetworkManager's logging aims not to contain private sensitive data and
440 you should be fine sharing the debug logs. Still, there will be IP
441 addresses and your network setup, if you consider that private then
442 review the log before sharing. However, try not to mangle the logfile
443 in a way that distorts the meaning too much.
444
445 NetworkManager uses syslog or systemd-journald, depending on
446 configuration. In any case, debug logs are verbose and might be rate
447 limited or filtered by the logging daemon. For systemd-journald, see
448 RateLimitIntervalSec and RateLimitBurst in journald.conf manual for how
449 to disable that.
450
451 level
452 The default logging verbosity level. One of OFF, ERR, WARN, INFO,
453 DEBUG, TRACE, in order of verbosity.
454
455 OFF disables all logging. INFO is the default verbosity for
456 regular operation. TRACE is for debugging.
457
458 The other levels are in most cases not useful. For example, DEBUG
459 is between TRACE and INFO, but it's too verbose for regular
460 operation and lacks possibly interesting messages for debugging.
461 Almost always, when debugging an issue or reporting a bug, collect
462 full level TRACE logs to get the full picture.
463
464 domains
465 Filter the messages by their topic. When debugging an issue, it's
466 better to collect all logs (ALL domain) upfront. The unnecessary
467 parts can always be ignored later.
468
469 In the uncommon case to tune out certain topics, the following log
470 domains are available: PLATFORM, RFKILL, ETHER, WIFI, BT, MB,
471 DHCP4, DHCP6, PPP, WIFI_SCAN, IP4, IP6, AUTOIP4, DNS, VPN, SHARING,
472 SUPPLICANT, AGENTS, SETTINGS, SUSPEND, CORE, DEVICE, OLPC, WIMAX,
473 INFINIBAND, FIREWALL, ADSL, BOND, VLAN, BRIDGE, DBUS_PROPS, TEAM,
474 CONCHECK, DCB, DISPATCH, AUDIT, SYSTEMD, VPN_PLUGIN, PROXY.
475
476 In addition, these special domains can be used: NONE, ALL, DEFAULT,
477 DHCP, IP.
478
479 You can specify per-domain log level overrides by adding a colon
480 and a log level to any domain. E.g., "WIFI:DEBUG,WIFI_SCAN:OFF".
481 Another example is ALL,VPN_PLUGIN:TRACE to enable all the logging
482 there is (see about VPN_PLUGIN below).
483
484 Domain descriptions:
485 PLATFORM : OS (platform) operations
486 RFKILL : RFKill subsystem operations
487 ETHER : Ethernet device operations
488 WIFI : Wi-Fi device operations
489 BT : Bluetooth operations
490 MB : Mobile broadband operations
491 DHCP4 : DHCP for IPv4
492 DHCP6 : DHCP for IPv6
493 PPP : Point-to-point protocol operations
494 WIFI_SCAN : Wi-Fi scanning operations
495 IP4 : IPv4-related operations
496 IP6 : IPv6-related operations
497 AUTOIP4 : AutoIP operations
498 DNS : Domain Name System related operations
499 VPN : Virtual Private Network connections and
500 operations
501 SHARING : Connection sharing. With TRACE level log queries
502 for dnsmasq instance
503 SUPPLICANT : WPA supplicant related operations
504 AGENTS : Secret agents operations and communication
505 SETTINGS : Settings/config service operations
506 SUSPEND : Suspend/resume
507 CORE : Core daemon and policy operations
508 DEVICE : Activation and general interface operations
509 OLPC : OLPC Mesh device operations
510 WIMAX : WiMAX device operations
511 INFINIBAND : InfiniBand device operations
512 FIREWALL : FirewallD related operations
513 ADSL : ADSL device operations
514 BOND : Bonding operations
515 VLAN : VLAN operations
516 BRIDGE : Bridging operations
517 DBUS_PROPS : D-Bus property changes
518 TEAM : Teaming operations
519 CONCHECK : Connectivity check
520 DCB : Data Center Bridging (DCB) operations
521 DISPATCH : Dispatcher scripts
522 AUDIT : Audit records
523 SYSTEMD : Messages from internal libsystemd
524 VPN_PLUGIN : logging messages from VPN plugins
525 PROXY : logging messages for proxy handling
526
527 NONE : when given by itself logging is disabled
528 ALL : all log domains
529 DEFAULT : default log domains
530 DHCP : shortcut for "DHCP4,DHCP6"
531 IP : shortcut for "IP4,IP6"
532
533 HW : deprecated alias for "PLATFORM"
534
535 In general, the logfile should not contain passwords or private
536 data. However, you are always advised to check the file before
537 posting it online or attaching to a bug report. VPN_PLUGIN is
538 special as it might reveal private information of the VPN plugins
539 with verbose levels. Therefore this domain will be excluded when
540 setting ALL or DEFAULT to more verbose levels then INFO.
541
542 backend
543 The logging backend. Supported values are "syslog" and "journal".
544 When NetworkManager is started with "--debug" in addition all
545 messages will be printed to stderr. If unspecified, the default is
546 "journal".
547
548 audit
549 Whether the audit records are delivered to auditd, the audit
550 daemon. If false, audit records will be sent only to the
551 NetworkManager logging system. If set to true, they will be also
552 sent to auditd. The default value is false.
553
555 Specify default values for connections.
556
557 Such default values are only consulted if the corresponding
558 per-connection property explicitly allows for that. That means, all
559 these properties correspond to a property of the connection profile
560 (for example connection.mud-url). Only if the per-profile property is
561 set to a special value that indicates to use the default, the default
562 value from NetworkManager.conf is consulted. It depends on the
563 property, which is the special value that indicates fallback to the
564 default, but it usually is something like empty, unset values or
565 special numeric values like 0 or -1. That means the effectively used
566 value can first always be configured for each profile, and these
567 default values only matter if the per-profile values explicitly
568 indicates to use the default from NetworkManager.conf.
569
570 Example:
571
572 [connection]
573 ipv6.ip6-privacy=0
574
575
576 Supported Properties
577 Not all properties can be overwritten, only the following properties
578 are supported to have their default values configured (see nm-
579 settings(5) for details).
580
581 802-1x.auth-timeout
582
583 cdma.mtu
584
585 connection.auth-retries
586 If left unspecified, the default value is 3 tries before failing
587 the connection.
588
589 connection.autoconnect-slaves
590
591 connection.mud-url
592 If unspecified, MUD URL defaults to "none".
593
594 connection.lldp
595
596 connection.llmnr
597 If unspecified, the ultimate default values depends on the DNS
598 plugin. With systemd-resolved the default currently is "yes" (2)
599 and for all other plugins "no" (0).
600
601 connection.mdns
602 If unspecified, the ultimate default values depends on the DNS
603 plugin. With systemd-resolved the default currently is "no" (0) and
604 for all other plugins also "no" (0).
605
606 connection.mptcp-flags
607 If unspecified, the fallback is 0x22 ("enabled,subflow"). Note that
608 if sysctl /proc/sys/net/mptcp/enabled is disabled, NetworkManager
609 will still not configure endpoints.
610
611 connection.dns-over-tls
612 If unspecified, the ultimate default values depends on the DNS
613 plugin. With systemd-resolved the default currently is global
614 setting and for all other plugins "no" (0).
615
616 connection.stable-id
617
618 ethernet.cloned-mac-address
619 If left unspecified, it defaults to "preserve".
620
621 ethernet.generate-mac-address-mask
622
623 ethernet.mtu
624 If configured explicitly to 0, the MTU is not reconfigured during
625 device activation unless it is required due to IPv6 constraints. If
626 left unspecified, a DHCP/IPv6 SLAAC provided value is used or the
627 MTU is not reconfigured during activation.
628
629 ethernet.wake-on-lan
630
631 gsm.mtu
632
633 hostname.from-dhcp
634
635 hostname.from-dns-lookup
636
637 hostname.only-from-default
638
639 hostname.priority
640
641 infiniband.mtu
642 If configured explicitly to 0, the MTU is not reconfigured during
643 device activation unless it is required due to IPv6 constraints. If
644 left unspecified, a DHCP/IPv6 SLAAC provided value is used or the
645 MTU is left unspecified on activation.
646
647 ip-tunnel.mtu
648 If configured explicitly to 0, the MTU is not reconfigured during
649 device activation unless it is required due to IPv6 constraints. If
650 left unspecified, a DHCP/IPv6 SLAAC provided value is used or a
651 default of 1500.
652
653 ipv4.dad-timeout
654
655 ipv4.dhcp-client-id
656
657 ipv4.dhcp-iaid
658 If left unspecified, it defaults to "ifname".
659
660 ipv4.dhcp-hostname-flags
661 If left unspecified, the value 3 (fqdn-encoded,fqdn-serv-update) is
662 used.
663
664 ipv4.dhcp-timeout
665 If left unspecified, the default value for the interface type is
666 used.
667
668 ipv4.dhcp-vendor-class-identifier
669 If left unspecified, the default is to not send the DHCP option to
670 the server.
671
672 ipv4.dns-priority
673 If unspecified or zero, use 50 for VPN profiles and 100 for other
674 profiles.
675
676 ipv4.required-timeout
677
678 ipv4.link-local
679 If left unspecified, fallback to "auto" which makes it dependent on
680 "ipv4.method" setting.
681
682 ipv4.route-metric
683
684 ipv4.route-table
685 If left unspecified, routes are only added to the main table. Note
686 that this is different from explicitly selecting the main table
687 254, because of how NetworkManager removes extraneous routes from
688 the tables.
689
690 ipv6.addr-gen-mode
691 If the per-profile setting is either "default" or
692 "default-or-eui64", the global default is used. If the default is
693 unspecified, the fallback value is either "stable-privacy" or
694 "eui64", depending on whether the per-profile setting is "default"
695 or "default-or-eui64, respectively.
696
697 ipv6.ra-timeout
698 If left unspecified, the default value depends on the sysctl
699 solicitation settings.
700
701 ipv6.dhcp-duid
702 If left unspecified, it defaults to "lease".
703
704 ipv6.dhcp-iaid
705 If left unspecified, it defaults to "ifname".
706
707 ipv6.dhcp-hostname-flags
708 If left unspecified, the value 1 (fqdn-serv-update) is used.
709
710 ipv6.dhcp-timeout
711 If left unspecified, the default value for the interface type is
712 used.
713
714 ipv6.dns-priority
715 If unspecified or zero, use 50 for VPN profiles and 100 for other
716 profiles.
717
718 ipv6.ip6-privacy
719 If ipv6.ip6-privacy is unset, use the content of
720 "/proc/sys/net/ipv6/conf/default/use_tempaddr" as last fallback.
721
722 ipv6.required-timeout
723
724 ipv6.route-metric
725
726 ipv6.route-table
727 If left unspecified, routes are only added to the main table. Note
728 that this is different from explicitly selecting the main table
729 254, because of how NetworkManager removes extraneous routes from
730 the tables.
731
732 sriov.autoprobe-drivers
733 If left unspecified, drivers are autoprobed when the SR-IOV VF gets
734 created.
735
736 vpn.timeout
737 If left unspecified, default value of 60 seconds is used.
738
739 wifi.ap-isolation
740 If left unspecified, AP isolation is disabled.
741
742 wifi.cloned-mac-address
743 If left unspecified, it defaults to "preserve".
744
745 wifi.generate-mac-address-mask
746
747 wifi.mac-address-randomization
748 If left unspecified, MAC address randomization is disabled. This
749 setting is deprecated for wifi.cloned-mac-address.
750
751 wifi.mtu
752 If configured explicitly to 0, the MTU is not reconfigured during
753 device activation unless it is required due to IPv6 constraints. If
754 left unspecified, a DHCP/IPv6 SLAAC provided value is used or a
755 default of 1500.
756
757 wifi.powersave
758 If left unspecified, the default value "ignore" will be used.
759
760 wifi-sec.pmf
761 If left unspecified, the default value "optional" will be used.
762
763 wifi-sec.fils
764 If left unspecified, the default value "optional" will be used.
765
766 wifi.wake-on-wlan
767
768 wireguard.mtu
769
770
771 Sections
772 You can configure multiple connection sections, by having different
773 sections with a name that all start with "connection". Example:
774
775 [connection]
776 ipv6.ip6-privacy=0
777 connection.autoconnect-slaves=1
778 vpn.timeout=120
779
780 [connection-wifi-wlan0]
781 match-device=interface-name:wlan0
782 ipv4.route-metric=50
783
784 [connection-wifi-other]
785 match-device=type:wifi
786 ipv4.route-metric=55
787 ipv6.ip6-privacy=1
788
789 The sections within one file are considered in order of appearance,
790 with the exception that the [connection] section is always considered
791 last. In the example above, this order is [connection-wifi-wlan0],
792 [connection-wlan-other], and [connection]. When checking for a default
793 configuration value, the sections are searched until the requested
794 value is found. In the example above, "ipv4.route-metric" for wlan0
795 interface is set to 50, and for all other Wi-Fi typed interfaces to 55.
796 Also, Wi-Fi devices would have IPv6 private addresses enabled by
797 default, but other devices would have it disabled. Note that also
798 "wlan0" gets "ipv6.ip6-privacy=1", because although the section
799 "[connection-wifi-wlan0]" matches the device, it does not contain that
800 property and the search continues.
801
802 When having different sections in multiple files, sections from files
803 that are read later have higher priority. So within one file the
804 priority of the sections is top-to-bottom. Across multiple files later
805 definitions take precedence.
806
807 The following properties further control how a connection section
808 applies.
809
810 match-device
811 An optional device spec that restricts when the section applies.
812 See the section called “Device List Format” for the possible
813 values.
814
815 stop-match
816 An optional boolean value which defaults to no. If the section
817 matches (based on match-device), further sections will not be
818 considered even if the property in question is not present. In the
819 example above, if [connection-wifi-wlan0] would have stop-match set
820 to yes, the device wlan0 would have ipv6.ip6-privacy property
821 unspecified. That is, the search for the property would not
822 continue in the connection sections [connection-wifi-other] or
823 [connection].
824
826 Contains per-device persistent configuration.
827
828 Example:
829
830 [device]
831 match-device=interface-name:eth3
832 managed=1
833
834
835 Supported Properties
836 The following properties can be configured per-device.
837
838 managed
839 Whether the device is managed or not. A device can be marked as
840 managed via udev rules (ENV{NM_UNMANAGED}), or via setting plugins
841 (keyfile.unmanaged-devices). This is yet another way. Note that
842 this configuration can be overruled at runtime via D-Bus. Also, it
843 has higher priority then udev rules.
844
845 carrier-wait-timeout
846 Specify the timeout for waiting for carrier in milliseconds. The
847 default is 5000 milliseconds. This setting exists because certain
848 drivers/hardware can take a long time to detect whether the cable
849 is plugged in.
850
851 When the device loses carrier, NetworkManager does not react
852 immediately. Instead, it waits for this timeout before considering
853 the link lost.
854
855 Also, on startup, NetworkManager considers the device as busy for
856 this time, as long as the device has no carrier. This delays
857 startup-complete signal and NetworkManager-wait-online. Configuring
858 this too high means to block NetworkManager-wait-online longer than
859 necessary when booting with cable unplugged. Configuring it too
860 low, means that NetworkManager will declare startup-complete too
861 soon, although carrier is about to come and auto-activation to kick
862 in. Note that if a profile only has static IP configuration or
863 Layer 3 configuration disabled, then it can already autoconnect
864 without carrier on the device. Once such a profile reaches full
865 activated state, startup-complete is considered as reached even if
866 the device has no carrier yet.
867
868 ignore-carrier
869 Specify devices for which NetworkManager will (partially) ignore
870 the carrier state. Normally, for device types that support
871 carrier-detect, such as Ethernet and InfiniBand, NetworkManager
872 will only allow a connection to be activated on the device if
873 carrier is present (ie, a cable is plugged in), and it will
874 deactivate the device if carrier drops for more than a few seconds.
875
876 A device with carrier ignored will allow activating connections on
877 that device even when it does not have carrier, provided that the
878 connection uses only statically-configured IP addresses.
879 Additionally, it will allow any active connection (whether static
880 or dynamic) to remain active on the device when carrier is lost.
881
882 Note that the "carrier" property of NMDevices and device D-Bus
883 interfaces will still reflect the actual device state; it's just
884 that NetworkManager will not make use of that information.
885
886 Master types like bond, bridge and team ignore carrier by default,
887 while other device types react on carrier changes by default.
888
889 This setting overwrites the deprecated main.ignore-carrier setting
890 above.
891
892 keep-configuration
893 On startup, NetworkManager tries to not interfere with interfaces
894 that are already configured. It does so by generating a in-memory
895 connection based on the interface current configuration.
896
897 If this generated connection matches one of the existing persistent
898 connections, the persistent connection gets activated. If there is
899 no match, the generated connection gets activated as "external",
900 which means that the connection is considered as active, but
901 NetworkManager doesn't actually touch the interface.
902
903 It is possible to disable this behavior by setting
904 keep-configuration to no. In this way, on startup NetworkManager
905 always tries to activate the most suitable persistent connection
906 (the one with highest autoconnect-priority or, in case of a tie,
907 the one activated most recently).
908
909 Note that when NetworkManager gets restarted, it stores the
910 previous state in /run/NetworkManager; in particular it saves the
911 UUID of the connection that was previously active so that it can be
912 activated again after the restart. Therefore, keep-configuration
913 does not have any effect on service restart.
914
915 allowed-connections
916 A list of connections that can be activated on the device. See the
917 section called “Connection List Format” for the syntax to specify a
918 connection. If this option is not specified, all connections can be
919 potentially activated on the device, provided that the connection
920 type and other settings match.
921
922 A notable use case for this is to filter which connections can be
923 activated based on how they were created; see the origin keyword in
924 the section called “Connection List Format”.
925
926 wifi.scan-rand-mac-address
927 Configures MAC address randomization of a Wi-Fi device during
928 scanning. This defaults to yes in which case a random,
929 locally-administered MAC address will be used. The setting
930 wifi.scan-generate-mac-address-mask allows to influence the
931 generated MAC address to use certain vendor OUIs. If disabled, the
932 MAC address during scanning is left unchanged to whatever is
933 configured. For the configured MAC address while the device is
934 associated, see instead the per-connection setting
935 wifi.cloned-mac-address.
936
937 wifi.backend
938 Specify the Wi-Fi backend used for the device. Currently, supported
939 are wpa_supplicant and iwd (experimental). If unspecified, the
940 default is "wpa_supplicant".
941
942 wifi.scan-generate-mac-address-mask
943 Like the per-connection settings ethernet.generate-mac-address-mask
944 and wifi.generate-mac-address-mask, this allows to configure the
945 generated MAC addresses during scanning. See nm-settings(5) for
946 details.
947
948 wifi.iwd.autoconnect
949 If wifi.backend is iwd, setting this to false forces IWD's
950 autoconnect mechanism to be disabled for this device and
951 connections will only be initiated by NetworkManager whether
952 commanded by a client or automatically. Leaving it true (default)
953 stops NetworkManager from automatically initiating connections and
954 allows IWD to use its network ranking and scanning logic to decide
955 the best networks to autoconnect to next. Connections'
956 autoconnect-priority, autoconnect-retries settings will be ignored.
957 Other settings like permissions or multi-connect may interfere with
958 IWD connection attempts.
959
960 sriov-num-vfs
961 Specify the number of virtual functions (VF) to enable for a PCI
962 physical device that supports single-root I/O virtualization
963 (SR-IOV).
964
965 Sections
966 The [device] section works the same as the [connection] section. That
967 is, multiple sections that all start with the prefix "device" can be
968 specified. The settings "match-device" and "stop-match" are available
969 to match a device section on a device. The order of multiple sections
970 is also top-down within the file and later files overwrite previous
971 settings. See “Sections” under the section called “CONNECTION SECTION”
972 for details.
973
975 This section controls NetworkManager's optional connectivity checking
976 functionality. This allows NetworkManager to detect whether or not the
977 system can actually access the internet or whether it is behind a
978 captive portal.
979
980 Connectivity checking serves two purposes. For one, it exposes a
981 connectivity state on D-Bus, which other applications may use. For
982 example, Gnome's portal helper uses this as signal to show a captive
983 portal login page. The other use is that default-route of devices
984 without global connectivity get a penalty of +20000 to the
985 route-metric. This has the purpose to give a better default-route to
986 devices that have global connectivity. For example, when being
987 connected to WWAN and to a Wi-Fi network which is behind a captive
988 portal, WWAN still gets preferred until login.
989
990 Note that your distribution might set
991 /proc/sys/net/ipv4/conf/*/rp_filter to strict filtering. That works
992 badly with per-device connectivity checking, which uses SO_BINDDEVICE
993 to send requests on all devices. A strict rp_filter setting will reject
994 any response and the connectivity check on all but the best route will
995 fail.
996
997 enabled
998 Whether connectivity check is enabled. Note that to enable
999 connectivity check, a valid uri must also be configured. The value
1000 defaults to true, but since the uri is unset by default,
1001 connectivity check may be disabled. The main purpose of this option
1002 is to have a single flag to disable connectivity check. Note that
1003 this setting can also be set via D-Bus API at runtime. In that
1004 case, the value gets stored in
1005 /var/lib/NetworkManager/NetworkManager-intern.conf file.
1006
1007 uri
1008 The URI of a web page to periodically request when connectivity is
1009 being checked. This page should return the header
1010 "X-NetworkManager-Status" with a value of "online". Alternatively,
1011 its body content should be set to "NetworkManager is online". The
1012 body content check can be controlled by the response option. If
1013 this option is blank or missing, connectivity checking is disabled.
1014
1015 interval
1016 Specified in seconds; controls how often connectivity is checked
1017 when a network connection exists. If set to 0 connectivity checking
1018 is disabled. If missing, the default is 300 seconds.
1019
1020 response
1021 If set, controls what body content NetworkManager checks for when
1022 requesting the URI for connectivity checking. Note that this only
1023 compares that the HTTP response starts with the specifid text, it
1024 does not compare the exact string. This behavior might change in
1025 the future, so avoid relying on it. If missing, the response
1026 defaults to "NetworkManager is online". If set to empty, the HTTP
1027 server is expected to answer with status code 204 or send no data.
1028
1030 This section specifies global DNS settings that override
1031 connection-specific configuration.
1032
1033 searches
1034 A list of search domains to be used during hostname lookup.
1035
1036 options
1037 A list of options to be passed to the hostname resolver.
1038
1040 Sections with a name starting with the "global-dns-domain-" prefix
1041 allow to define global DNS configuration for specific domains. The part
1042 of section name after "global-dns-domain-" specifies the domain name a
1043 section applies to. More specific domains have the precedence over less
1044 specific ones and the default domain is represented by the wildcard
1045 "*". A default domain section is mandatory.
1046
1047 servers
1048 A list of addresses of DNS servers to be used for the given domain.
1049
1050 options
1051 A list of domain-specific DNS options. Not used at the moment.
1052
1054 This is a special section that contains options which apply to the
1055 configuration file that contains the option.
1056
1057 enable
1058 Defaults to "true". If "false", the configuration file will be
1059 skipped during loading. Note that the main configuration file
1060 NetworkManager.conf cannot be disabled.
1061
1062 # always skip loading the config file
1063 [.config]
1064 enable=false
1065
1066 You can also match against the version of NetworkManager. For
1067 example the following are valid configurations:
1068
1069 # only load on version 1.0.6
1070 [.config]
1071 enable=nm-version:1.0.6
1072
1073 # load on all versions 1.0.x, but not 1.2.x
1074 [.config]
1075 enable=nm-version:1.0
1076
1077 # only load on versions >= 1.1.6. This does not match
1078 # with version 1.2.0 or 1.4.4. Only the last digit is considered.
1079 [.config]
1080 enable=nm-version-min:1.1.6
1081
1082 # only load on versions >= 1.2. Contrary to the previous
1083 # example, this also matches with 1.2.0, 1.2.10, 1.4.4, etc.
1084 [.config]
1085 enable=nm-version-min:1.2
1086
1087 # Match against the maximum allowed version. The example matches
1088 # versions 1.2.0, 1.2.2, 1.2.4. Again, only the last version digit
1089 # is allowed to be smaller. So this would not match on 1.1.10.
1090 [.config]
1091 enable=nm-version-max:1.2.6
1092
1093 You can also match against the value of the environment variable
1094 NM_CONFIG_ENABLE_TAG, like:
1095
1096 # always skip loading the file when running NetworkManager with
1097 # environment variable "NM_CONFIG_ENABLE_TAG=TAG1"
1098 [.config]
1099 enable=env:TAG1
1100
1101 More then one match can be specified. The configuration will be
1102 enabled if one of the predicates matches ("or"). The special prefix
1103 "except:" can be used to negate the match. Note that if one
1104 except-predicate matches, the entire configuration will be
1105 disabled. In other words, a except predicate always wins over other
1106 predicates. If the setting only consists of "except:" matches and
1107 none of the negative conditions are satisfied, the configuration is
1108 still enabled.
1109
1110 # enable the configuration either when the environment variable
1111 # is present or the version is at least 1.2.0.
1112 [.config]
1113 enable=env:TAG2,nm-version-min:1.2
1114
1115 # enable the configuration for version >= 1.2.0, but disable
1116 # it when the environment variable is set to "TAG3"
1117 [.config]
1118 enable=except:env:TAG3,nm-version-min:1.2
1119
1120 # enable the configuration on >= 1.3, >= 1.2.6, and >= 1.0.16.
1121 # Useful if a certain feature is only present since those releases.
1122 [.config]
1123 enable=nm-version-min:1.3,nm-version-min:1.2.6,nm-version-min:1.0.16
1124
1125
1127 Settings plugins for reading and writing connection profiles. The
1128 number of available plugins is distribution specific.
1129
1130 keyfile
1131 The keyfile plugin is the generic plugin that supports all the
1132 connection types and capabilities that NetworkManager has. It
1133 writes files out in an .ini-style format in
1134 /etc/NetworkManager/system-connections. See nm-settings-keyfile(5)
1135 for details about the file format.
1136
1137 The stored connection file may contain passwords, secrets and
1138 private keys in plain text, so it will be made readable only to
1139 root, and the plugin will ignore files that are readable or
1140 writable by any user or group other than root. See "Secret flag
1141 types" in nm-settings(5) for how to avoid storing passwords in
1142 plain text.
1143
1144 This plugin is always active, and will automatically be used to
1145 store any connections that aren't supported by any other active
1146 plugin.
1147
1148 ifcfg-rh
1149 This plugin is used on the Fedora and Red Hat Enterprise Linux
1150 distributions to read and write configuration from the standard
1151 /etc/sysconfig/network-scripts/ifcfg-* files. It currently supports
1152 reading Ethernet, Wi-Fi, InfiniBand, VLAN, Bond, Bridge, and Team
1153 connections. Enabling ifcfg-rh implicitly enables ibft plugin, if
1154 it is available. This can be disabled by adding no-ibft. See
1155 /usr/share/doc/initscripts/sysconfig.txt and nm-settings-ifcfg-
1156 rh(5) for more information about the ifcfg file format.
1157
1158 ifupdown
1159 This plugin is used on the Debian and Ubuntu distributions, and
1160 reads Ethernet and Wi-Fi connections from /etc/network/interfaces.
1161
1162 This plugin is read-only; any connections (of any type) added from
1163 within NetworkManager when you are using this plugin will be saved
1164 using the keyfile plugin instead.
1165
1166 ibft, no-ibft
1167 These plugins are deprecated and their selection has no effect.
1168 This is now handled by nm-initrd-generator.
1169
1170 ifcfg-suse, ifnet
1171 These plugins are deprecated and their selection has no effect. The
1172 keyfile plugin should be used instead.
1173
1175 Device List Format
1176 The configuration options main.no-auto-default, main.ignore-carrier,
1177 keyfile.unmanaged-devices, connection*.match-device and
1178 device*.match-device select devices based on a list of matchings.
1179 Devices can be specified using the following format:
1180
1181 *
1182 Matches every device.
1183
1184 IFNAME
1185 Case sensitive match of interface name of the device. Globbing is
1186 not supported.
1187
1188 HWADDR
1189 Match the permanent MAC address of the device. Globbing is not
1190 supported
1191
1192 interface-name:IFNAME, interface-name:~IFNAME
1193 Case sensitive match of interface name of the device. Simple
1194 globbing is supported with * and ?. Ranges and escaping is not
1195 supported.
1196
1197 interface-name:=IFNAME
1198 Case sensitive match of interface name of the device. Globbing is
1199 disabled and IFNAME is taken literally.
1200
1201 mac:HWADDR
1202 Match the permanent MAC address of the device. Globbing is not
1203 supported
1204
1205 s390-subchannels:HWADDR
1206 Match the device based on the subchannel address. Globbing is not
1207 supported
1208
1209 type:TYPE
1210 Match the device type. Valid type names are as reported by "nmcli
1211 -f GENERAL.TYPE device show". Globbing is not supported.
1212
1213 driver:DRIVER
1214 Match the device driver as reported by "nmcli -f
1215 GENERAL.DRIVER,GENERAL.DRIVER-VERSION device show". "DRIVER" must
1216 match the driver name exactly and does not support globbing.
1217 Optionally, a driver version may be specified separated by '/'.
1218 Globbing is supported for the version.
1219
1220 dhcp-plugin:DHCP
1221 Match the configured DHCP plugin "main.dhcp".
1222
1223 except:SPEC
1224 Negative match of a device. SPEC must be explicitly qualified with
1225 a prefix such as interface-name:. A negative match has higher
1226 priority then the positive matches above.
1227
1228 If there is a list consisting only of negative matches, the
1229 behavior is the same as if there is also match-all. That means, if
1230 none of all the negative matches is satisfied, the overall result
1231 is still a positive match. That means, "except:interface-name:eth0"
1232 is the same as "*,except:interface-name:eth0".
1233
1234 SPEC[,;]SPEC
1235 Multiple specs can be concatenated with commas or semicolons. The
1236 order does not matter as matches are either inclusive or negative
1237 (except:), with negative matches having higher priority.
1238
1239 Backslash is supported to escape the separators ';' and ',', and to
1240 express special characters such as newline ('\n'), tabulator
1241 ('\t'), whitespace ('\s') and backslash ('\\'). The globbing of
1242 interface names cannot be escaped. Whitespace is not a separator
1243 but will be trimmed between two specs (unless escaped as '\s').
1244
1245 Example:
1246
1247 interface-name:em4
1248 mac:00:22:68:1c:59:b1;mac:00:1E:65:30:D1:C4;interface-name:eth2
1249 interface-name:vboxnet*,except:interface-name:vboxnet2
1250 *,except:mac:00:22:68:1c:59:b1
1251
1252
1253 Connection List Format
1254 Connections can be specified using the following format:
1255
1256 *
1257 Matches every connection.
1258
1259 uuid:UUID
1260 Match the connection by UUID, for example
1261 "uuid:83037490-1d17-4986-a397-01f1db3a7fc2"
1262
1263 id=ID
1264 Match the connection by name.
1265
1266 origin:ORIGIN
1267 Match the connection by origin, stored in the
1268 org.freedesktop.NetworkManager.origin tag of the user setting. For
1269 example, use "except:origin:nm-initrd-generator" to forbid
1270 activation of connections created by the initrd generator.
1271
1272 except:SPEC
1273 Negative match of a connection. A negative match has higher
1274 priority then the positive matches above.
1275
1276 If there is a list consisting only of negative matches, the
1277 behavior is the same as if there is also match-all. That means, if
1278 none of all the negative matches is satisfied, the overall result
1279 is still a positive match.
1280
1281 SPEC[,;]SPEC
1282 Multiple specs can be concatenated with commas or semicolons. The
1283 order does not matter as matches are either inclusive or negative
1284 (except:), with negative matches having higher priority.
1285
1286 Backslash is supported to escape the separators ';' and ',', and to
1287 express special characters such as newline ('\n'), tabulator
1288 ('\t'), whitespace ('\s') and backslash ('\\'). Whitespace is not a
1289 separator but will be trimmed between two specs (unless escaped as
1290 '\s').
1291
1293 NetworkManager(8), nmcli(1), nmcli-examples(7), nm-online(1), nm-
1294 settings(5), nm-applet(1), nm-connection-editor(1)
1295
1296
1297
1298NetworkManager 1.40.10 NETWORKMANAGER.CONF(5)