1 <?xml version='1.0'?> <!--*-nxml-*-->
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.2//EN"
4 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
7 Copyright 2005 - 2014 Red Hat, Inc.
8 Copyright 2005 - 2009 Novell, Inc.
9 Copyright 2005 Robert Love
12 <refentry id="NetworkManager">
14 <title>NetworkManager</title>
15 <author>NetworkManager developers</author>
18 <refentrytitle>NetworkManager</refentrytitle>
19 <manvolnum>8</manvolnum>
20 <refmiscinfo class="source">NetworkManager</refmiscinfo>
21 <refmiscinfo class="manual">Network management daemons</refmiscinfo>
22 <refmiscinfo class="version">1.2</refmiscinfo>
26 <refname>NetworkManager</refname>
27 <refpurpose>network management daemon</refpurpose>
32 <command>NetworkManager <arg choice="opt" rep="repeat">OPTIONS</arg></command>
37 <title>Description</title>
39 The NetworkManager daemon attempts to make networking
40 configuration and operation as painless and automatic as
41 possible by managing the primary network connection and other
42 network interfaces, like Ethernet, WiFi, and Mobile Broadband
43 devices. NetworkManager will connect any network device when a
44 connection for that device becomes available, unless that
45 behavior is disabled. Information about networking is exported
46 via a D-Bus interface to any interested application, providing a
47 rich API with which to inspect and control network settings and
53 <title>Dispatcher scripts</title>
55 NetworkManager will execute scripts in the
56 /etc/NetworkManager/dispatcher.d directory or subdirectories in
57 alphabetical order in response to network events. Each script should
58 be a regular executable file owned by root. Furthermore, it must not be
59 writable by group or other, and not setuid.
62 Each script receives two arguments, the first being the interface name of the
63 device an operation just happened on, and second the action. For device actions,
64 the interface is the name of the kernel interface suitable for IP configuration.
65 Thus it is either VPN_IP_IFACE, DEVICE_IP_IFACE, or DEVICE_IFACE, as applicable.
66 For the <varname>hostname</varname> action it is always "none".
68 <para>The actions are:</para>
69 <variablelist class="dispatcher-options">
71 <term><varname>pre-up</varname></term>
72 <listitem><para>The interface is connected to the network but is not
73 yet fully activated. Scripts acting on this event must be placed or
74 symlinked into the /etc/NetworkManager/dispatcher.d/pre-up.d directory,
75 and NetworkManager will wait for script execution to complete before
76 indicating to applications that the interface is fully activated.
80 <term><varname>up</varname></term>
81 <listitem><para>The interface has been activated.</para></listitem>
84 <term><varname>pre-down</varname></term>
85 <listitem><para>The interface will be deactivated but has not yet been
86 disconnected from the network. Scripts acting on this event must be
87 placed or symlinked into the /etc/NetworkManager/dispatcher.d/pre-down.d
88 directory, and NetworkManager will wait for script execution to complete
89 before disconnecting the interface from its network. Note that this
90 event is not emitted for forced disconnections, like when carrier is
91 lost or a wireless signal fades. It is only emitted when there is
92 an opportunity to cleanly handle a network disconnection event.
96 <term><varname>down</varname></term>
98 The interface has been deactivated.
102 <term><varname>vpn-pre-up</varname></term>
103 <listitem><para>The VPN is connected to the network but is not yet
104 fully activated. Scripts acting on this event must be placed or
105 symlinked into the /etc/NetworkManager/dispatcher.d/pre-up.d directory,
106 and NetworkManager will wait for script execution to complete before
107 indicating to applications that the VPN is fully activated.
111 <term><varname>vpn-up</varname></term>
113 A VPN connection has been activated.
117 <term><varname>vpn-pre-down</varname></term>
118 <listitem><para>The VPN will be deactivated but has not yet been
119 disconnected from the network. Scripts acting on this event must be
120 placed or symlinked into the /etc/NetworkManager/dispatcher.d/pre-down.d
121 directory, and NetworkManager will wait for script execution to complete
122 before disconnecting the VPN from its network. Note that this
123 event is not emitted for forced disconnections, like when the VPN
124 terminates unexpectedly or general connectivity is lost. It is only
125 emitted when there is an opportunity to cleanly handle a VPN
130 <term><varname>vpn-down</varname></term>
132 A VPN connection has been deactivated.
136 <term><varname>hostname</varname></term>
138 The system hostname has been updated. Use gethostname(2) to retrieve it.
139 The interface name (first argument) is empty and no environment variable is
144 <term><varname>dhcp4-change</varname></term>
146 The DHCPv4 lease has changed (renewed, rebound, etc).
150 <term><varname>dhcp6-change</varname></term>
152 The DHCPv6 lease has changed (renewed, rebound, etc).
157 The environment contains more information about the interface and the connection.
158 The following variables are available for the use in the dispatcher scripts:
159 <variablelist class="dispatcher-environment">
161 <term><varname>CONNECTION_UUID</varname></term>
163 The UUID of the connection profile.
167 <term><varname>CONNECTION_ID</varname></term>
169 The name (ID) of the connection profile.
173 <term><varname>CONNECTION_DBUS_PATH</varname></term>
175 The NetworkManager D-Bus path of the connection.
179 <term><varname>CONNECTION_FILENAME</varname></term>
181 The backing file name of the connection profile (if any).
185 <term><varname>CONNECTION_EXTERNAL</varname></term>
187 If "1", this indicates that the connection describes a
188 network configuration created outside of NetworkManager.
192 <term><varname>DEVICE_IFACE</varname></term>
194 The interface name of the control interface of the device.
195 Depending on the device type, this differs from
196 <varname>DEVICE_IP_IFACE</varname>. For example for
197 ADSL devices, this could be 'atm0' or for WWAN devices
198 it might be 'ttyUSB0'.
202 <term><varname>DEVICE_IP_IFACE</varname></term>
204 The IP interface name of the device. This is the network
205 interface on which IP addresses and routes will be configured.
209 <term><varname>IP4_ADDRESS_N</varname></term>
211 The IPv4 address in the format "address/prefix gateway", where N is a number
212 from 0 to (# IPv4 addresses - 1). gateway item in this variable is deprecated,
213 use IP4_GATEWAY instead.
217 <term><varname>IP4_NUM_ADDRESSES</varname></term>
219 The variable contains the number of IPv4 addresses the script may expect.
223 <term><varname>IP4_GATEWAY</varname></term>
225 The gateway IPv4 address in traditional numbers-and-dots notation.
229 <term><varname>IP4_ROUTE_N</varname></term>
231 The IPv4 route in the format "address/prefix next-hop metric", where N is a number
232 from 0 to (# IPv4 routes - 1).
236 <term><varname>IP4_NUM_ROUTES</varname></term>
238 The variable contains the number of IPv4 routes the script may expect.
242 <term><varname>IP4_NAMESERVERS</varname></term>
244 The variable contains a space-separated list of the DNS servers.
248 <term><varname>IP4_DOMAINS</varname></term>
250 The variable contains a space-separated list of the search domains.
254 <term><varname>DHCP4_<dhcp-option-name></varname></term>
256 If the connection used DHCP for address configuration, the received DHCP
257 configuration is passed in the environment using standard DHCP
258 option names, prefixed with "DHCP4_", like "DHCP4_HOST_NAME=foobar".
262 <term><varname>IP6_<name> and DHCP6_<name></varname></term>
264 The same variables as for IPv4 are available for IPv6, but the prefixes are IP6_
271 In case of VPN, VPN_IP_IFACE is set, and IP4_*, IP6_* variables with VPN prefix are
272 exported too, like VPN_IP4_ADDRESS_0, VPN_IP4_NUM_ADDRESSES.
275 Dispatcher scripts are run one at a time, but asynchronously from the main
276 NetworkManager process, and will be killed if they run for too long. If your script
277 might take arbitrarily long to complete, you should spawn a child process and have the
278 parent return immediately. Scripts that are symbolic links pointing inside the
279 /etc/NetworkManager/dispatcher.d/no-wait.d/ directory are run immediately, without
280 waiting for the termination of previous scripts, and in parallel. Also beware that
281 once a script is queued, it will always be run, even if a later event renders it
282 obsolete. (Eg, if an interface goes up, and then back down again quickly, it is
283 possible that one or more "up" scripts will be run after the interface has gone down.)
288 <title>Options</title>
290 <para>The following options are understood:</para>
294 <term><option>--version</option> | <option>-V</option></term>
295 <listitem><para>Print the NetworkManager software version and exit.
299 <term><option>--help</option> | <option>-h</option></term>
300 <listitem><para>Print NetworkManager's available options and exit.
304 <term><option>--no-daemon</option> | <option>-n</option></term>
305 <listitem><para>Do not daemonize.
309 <term><option>--debug</option> | <option>-d</option></term>
310 <listitem><para>Do not daemonize, and direct log output to the
311 controlling terminal in addition to syslog.
315 <term><option>--pid-file</option> | <option>-p</option></term>
316 <listitem><para>Specify location of a PID file. The PID file
317 is used for storing PID of the running process and prevents
318 running multiple instances.
322 <term><option>--state-file</option></term>
323 <listitem><para>Specify file for storing state of the
324 NetworkManager persistently. If not specified, the default
325 value of /var/lib/NetworkManager/NetworkManager.state is used.
329 <term><option>--config</option></term>
330 <listitem><para> Specify configuration file to set up various
331 settings for NetworkManager. If not specified, the default
332 value of /etc/NetworkManager/NetworkManager.conf is used with
333 a fallback to the older 'nm-system-settings.conf' if located
334 in the same directory. See
335 <citerefentry><refentrytitle>NetworkManager.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
336 for more information on configuration file.
340 <term><option>--plugins</option></term>
341 <listitem><para>List plugins used to manage system-wide
342 connection settings. This list has preference over plugins
343 specified in the configuration file. Currently supported
344 plugins are: keyfile, <option>ifcfg-rh</option>,
345 <option>ifcfg-suse</option>, <option>ifupdown</option>.
349 <term><option>--log-level</option></term>
351 Sets how much information NetworkManager sends to the log destination (usually
352 syslog's "daemon" facility). By default, only informational, warning, and error
353 messages are logged. See the section on <literal>logging</literal> in
354 <citerefentry><refentrytitle>NetworkManager.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
355 for more information.
359 <term><option>--log-domains</option></term>
361 A comma-separated list specifying which operations are logged to the log
362 destination (usually syslog). By default, most domains are logging-enabled.
363 See the section on <literal>logging</literal> in
364 <citerefentry><refentrytitle>NetworkManager.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
365 for more information.
369 <term><option>--print-config</option></term>
371 Print the NetworkManager configuration to stdout and exit.
378 <title>UDEV PROPERTIES</title>
381 <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>
382 device manager is used for the network device discovery. The following
383 property influences how NetworkManager manages the devices:
388 <term><varname>NM_UNMANAGED</varname></term>
390 No default connection will be created and automatic activation
391 will not be attempted when this property of a device is set to a
392 true value ("1" or "true"). You will still be able to attach a
393 connection to the device manually or observe externally added
394 configuration such as addresses or routes.
396 Create an udev rule that sets this property to prevent NetworkManager
397 from interfering with virtual Ethernet device interfaces that are
398 managed by virtualization tools.
405 <title>SIGNALS</title>
407 NetworkManager process handles the following signals:
410 <term><varname>SIGHUP</varname></term>
412 The signal causes a reload of NetworkManager's configuration.
413 Note that not all configuration parameters can be changed at
414 runtime and therefore some changes may be applied only after
415 the next restart of the daemon. The signal also forces a
416 rewrite of DNS configuration.
420 <term><varname>SIGUSR1</varname></term>
422 The signal forces a rewrite of DNS configuration.
426 <term><varname>SIGUSR2</varname></term>
428 The signal has no effect at the moment.
436 <title>DEBUGGING</title>
438 The following environment variables are supported to help
439 debugging. When used in conjunction with the
440 <option>--no-daemon</option> option (thus echoing PPP and DHCP
441 helper output to stdout) these can quickly help pinpoint the
442 source of connection issues. Also see the
443 <option>--log-level</option> and <option>--log-domains</option>
444 to enable debug logging inside NetworkManager itself.
447 <option>NM_PPP_DEBUG</option>: When set to anything, causes
448 NetworkManager to turn on PPP debugging in pppd, which logs
449 all PPP and PPTP frames and client/server exchanges.
454 <title>See Also</title>
456 <citerefentry><refentrytitle>NetworkManager.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
457 <citerefentry><refentrytitle>nmcli</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
458 <citerefentry><refentrytitle>nmcli-examples</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
459 <citerefentry><refentrytitle>nm-online</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
460 <citerefentry><refentrytitle>nm-settings</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
461 <citerefentry><refentrytitle>nm-applet</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
462 <citerefentry><refentrytitle>nm-connection-editor</refentrytitle><manvolnum>1</manvolnum></citerefentry>
463 <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>