chiark / gitweb /
bus: introduce concept of a default bus for each thread and make use of it everywhere
[elogind.git] / man / systemd-networkd.service.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3         "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <!--
6   This file is part of systemd.
7
8   Copyright 2013 Tom Gundersen
9
10   systemd is free software; you can redistribute it and/or modify it
11   under the terms of the GNU Lesser General Public License as published by
12   the Free Software Foundation; either version 2.1 of the License, or
13   (at your option) any later version.
14
15   systemd is distributed in the hope that it will be useful, but
16   WITHOUT ANY WARRANTY; without even the implied warranty of
17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18   Lesser General Public License for more details.
19
20   You should have received a copy of the GNU Lesser General Public License
21   along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 -->
23
24 <refentry id="systemd-networkd.service">
25
26         <refentryinfo>
27                 <title>systemd-networkd.service</title>
28                 <productname>systemd</productname>
29
30                 <authorgroup>
31                         <author>
32                                 <contrib>Developer</contrib>
33                                 <firstname>Tom</firstname>
34                                 <surname>Gundersen</surname>
35                                 <email>teg@jklm.no</email>
36                         </author>
37                 </authorgroup>
38         </refentryinfo>
39
40         <refmeta>
41                 <refentrytitle>systemd-networkd.service</refentrytitle>
42                 <manvolnum>8</manvolnum>
43         </refmeta>
44
45         <refnamediv>
46                 <refname>systemd-networkd.service</refname>
47                 <refname>systemd-networkd</refname>
48                 <refpurpose>Network manager</refpurpose>
49         </refnamediv>
50
51         <refsynopsisdiv>
52                 <para><filename>systemd-networkd.service</filename></para>
53                 <para><filename>/usr/lib/systemd/systemd-networkd</filename></para>
54         </refsynopsisdiv>
55
56         <refsect1>
57                 <title>Description</title>
58
59                 <para><command>systemd-networkd</command> is a system
60                 service that manages networks. It detects and configures
61                 network devices as they appear.</para>
62
63                 <para>Network devices are managed by networkd only if they
64                 have the udev tag <literal>systemd-networkd</literal>.</para>
65
66                 <para>Network configurations applied before networkd is started
67                 are not removed, and configuration applied by networkd are not
68                 removed when networkd exits. This ensures restarting networkd
69                 does not cut the network connection, and in particular that it
70                 is safe to transition between the initrd and the real root,
71                 and back.</para>
72         </refsect1>
73
74         <refsect1><title>Network Configuration</title>
75                 <para>The network files are read from the files located in the
76                 system network directory <filename>/usr/lib/systemd/network</filename>,
77                 the volatile runtime network directory
78                 <filename>/run/systemd/network</filename> and the local administration
79                 network directory <filename>/etc/systemd/network</filename>.
80                 All link files are collectively sorted and processed in lexical order,
81                 regardless of the directories in which they live. However, files with
82                 identical filenames replace each other. Files in
83                 <filename>/etc</filename> have the highest priority, files in
84                 <filename>/run</filename> take precedence over files with the same
85                 name in <filename>/lib</filename>. This can be used to override a
86                 system-supplied network file with a local file if needed; a symlink in
87                 <filename>/etc</filename> with the same name as a network file in
88                 <filename>/lib</filename>, pointing to <filename>/dev/null</filename>,
89                 disables the network file entirely. Network files must have the extension
90                 <filename>.network</filename>; other extensions are ignored.</para>
91
92                 <para>The network file contains a <literal>[Match]</literal> section,
93                 which determines if a given network file may be applied to a given device;
94                 and a <literal>[Network]</literal> section specifying how the device should
95                 be configured. The first (in lexical order) of the network files that
96                 matches a given device is applied.</para>
97
98                 <para>A network file is said to match a device if each of the entries in the
99                 <literal>[Match]</literal> section matches, or if the section is empty.
100                 The following keys are accepted:</para>
101
102                 <variablelist class='network-directives'>
103                         <varlistentry>
104                                 <term><varname>MACAddress</varname></term>
105                                 <listitem>
106                                         <para>The hardware address.</para>
107                                 </listitem>
108                         </varlistentry>
109                         <varlistentry>
110                                 <term><varname>Path</varname></term>
111                                 <listitem>
112                                         <para>The persistent path, as exposed by the udev
113                                         property <literal>ID_PATH</literal>.</para>
114                                 </listitem>
115                         </varlistentry>
116                         <varlistentry>
117                                 <term><varname>Driver</varname></term>
118                                 <listitem>
119                                         <para>The driver currently bound to the device, as
120                                         exposed by the udev property <literal>DRIVER</literal>.
121                                         </para>
122                                 </listitem>
123                         </varlistentry>
124                         <varlistentry>
125                                 <term><varname>Type</varname></term>
126                                 <listitem>
127                                         <para>The device type, as exposed by the udev property
128                                         <literal>DEVTYPE</literal>.</para>
129                                 </listitem>
130                         </varlistentry>
131                         <varlistentry>
132                                 <term><varname>Name</varname></term>
133                                 <listitem>
134                                         <para>The device name, as exposed by the udev property
135                                         <literal>INTERFACE</literal>.</para>
136                                 </listitem>
137                         </varlistentry>
138                 </variablelist>
139
140                 <para>The <literal>[Network]</literal> section accepts the following keys:</para>
141
142                 <variablelist class='network-directives'>
143                         <varlistentry>
144                                 <term><varname>Description</varname></term>
145                                 <listitem>
146                                         <para>A description of the device. This is only used for
147                                         presentation purposes.</para>
148                                 </listitem>
149                         </varlistentry>
150                         <varlistentry>
151                                 <term><varname>Address</varname></term>
152                                 <listitem>
153                                         <para>A static IPv4 or IPv6 address and its prefix length,
154                                         separated by a '/' character. The format of the address must
155                                         be as described in
156                                         <citerefentry><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>
157                                         .</para>
158                                 </listitem>
159                         </varlistentry>
160                         <varlistentry>
161                                 <term><varname>Gateway</varname></term>
162                                 <listitem>
163                                         <para>The gateway address, which must be in the format described in
164                                         <citerefentry><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>
165                                         .</para>
166                                 </listitem>
167                         </varlistentry>
168                </variablelist>
169         </refsect1>
170
171         <refsect1>
172                 <title>See Also</title>
173                 <para>
174                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
175                         <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
176                 </para>
177         </refsect1>
178
179 </refentry>