chiark / gitweb /
bus: internalize a lot of protocol definitions
[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" conditional='ENABLE_NETWORKD'>
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, as well as creating virtual
62                 network devices.</para>
63
64                 <para>Network configurations applied before networkd is started
65                 are not removed, and configuration applied by networkd are not
66                 removed when networkd exits. This ensures restarting networkd
67                 does not cut the network connection, and in particular that it
68                 is safe to transition between the initrd and the real root,
69                 and back.</para>
70         </refsect1>
71
72         <refsect1><title>Configuration Files</title>
73                 <para>The configuration files are read from the files located in the
74                 system network directory <filename>/usr/lib/systemd/network</filename>,
75                 the volatile runtime network directory
76                 <filename>/run/systemd/network</filename> and the local administration
77                 network directory <filename>/etc/systemd/network</filename>.
78                 All configuration files are collectively sorted and processed in lexical order,
79                 regardless of the directories in which they live. However, files with
80                 identical filenames replace each other. Files in
81                 <filename>/etc</filename> have the highest priority, files in
82                 <filename>/run</filename> take precedence over files with the same
83                 name in <filename>/lib</filename>. This can be used to override a
84                 system-supplied configuration file with a local file if needed; a symlink in
85                 <filename>/etc</filename> with the same name as a configuration file in
86                 <filename>/lib</filename>, pointing to <filename>/dev/null</filename>,
87                 disables the configuration file entirely.</para>
88
89                 <refsect2><title>Virtual Network Devices</title>
90                         <para>Netdev files must have the extension <filename>.netdev</filename>;
91                         other extensions are ignored. Virtual network devices are created as soon
92                         as networkd is started.</para>
93
94                         <para>The <literal>[Bridge]</literal> section accepts the following
95                         keys:</para>
96
97                         <variablelist class='network-directives'>
98                                 <varlistentry>
99                                         <term><varname>Name</varname></term>
100                                         <listitem>
101                                                 <para>The interface name used when creating the
102                                                 bridge. This option is compulsory.</para>
103                                         </listitem>
104                                 </varlistentry>
105                         </variablelist>
106                 </refsect2>
107
108                 <refsect2><title>Networks</title>
109                         <para>Network files must have the extension <filename>.network</filename>;
110                         other extensions are ignored. Networks are applied to links whenever the links
111                         appear.</para>
112
113                         <para>The network file contains a <literal>[Match]</literal> section,
114                         which determines if a given network file may be applied to a given device;
115                         and a <literal>[Network]</literal> section specifying how the device should
116                         be configured. The first (in lexical order) of the network files that
117                         matches a given device is applied.</para>
118
119                         <para>A network file is said to match a device if each of the entries in the
120                         <literal>[Match]</literal> section matches, or if the section is empty.
121                         The following keys are accepted:</para>
122
123                         <variablelist class='network-directives'>
124                                 <varlistentry>
125                                         <term><varname>MACAddress</varname></term>
126                                         <listitem>
127                                                 <para>The hardware address.</para>
128                                         </listitem>
129                                 </varlistentry>
130                                 <varlistentry>
131                                         <term><varname>Path</varname></term>
132                                         <listitem>
133                                                 <para>The persistent path, as exposed by the udev
134                                                 property <literal>ID_PATH</literal>.</para>
135                                         </listitem>
136                                 </varlistentry>
137                                 <varlistentry>
138                                         <term><varname>Driver</varname></term>
139                                         <listitem>
140                                                 <para>The driver currently bound to the device, as
141                                                 exposed by the udev property <literal>DRIVER</literal>.
142                                                 </para>
143                                         </listitem>
144                                 </varlistentry>
145                                 <varlistentry>
146                                         <term><varname>Type</varname></term>
147                                         <listitem>
148                                                 <para>The device type, as exposed by the udev property
149                                                 <literal>DEVTYPE</literal>.</para>
150                                         </listitem>
151                                 </varlistentry>
152                                 <varlistentry>
153                                         <term><varname>Name</varname></term>
154                                         <listitem>
155                                                 <para>The device name, as exposed by the udev property
156                                                 <literal>INTERFACE</literal>.</para>
157                                         </listitem>
158                                 </varlistentry>
159                         </variablelist>
160
161                         <para>The <literal>[Network]</literal> section accepts the following keys:</para>
162
163                         <variablelist class='network-directives'>
164                                 <varlistentry>
165                                         <term><varname>Description</varname></term>
166                                         <listitem>
167                                                 <para>A description of the device. This is only used for
168                                                 presentation purposes.</para>
169                                         </listitem>
170                                 </varlistentry>
171                                 <varlistentry>
172                                         <term><varname>Address</varname></term>
173                                         <listitem>
174                                                 <para>A static IPv4 or IPv6 address and its prefix length,
175                                                 separated by a '/' character. The format of the address must
176                                                 be as described in
177                                                 <citerefentry><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>
178                                                 .</para>
179                                         </listitem>
180                                 </varlistentry>
181                                 <varlistentry>
182                                         <term><varname>Gateway</varname></term>
183                                         <listitem>
184                                                 <para>The gateway address, which must be in the format described in
185                                                 <citerefentry><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>
186                                                 .</para>
187                                         </listitem>
188                                 </varlistentry>
189                                 <varlistentry>
190                                         <term><varname>Bridge</varname></term>
191                                         <listitem>
192                                                 <para>The name of the bridge to add the configured link to.</para>
193                                         </listitem>
194                                 </varlistentry>
195                         </variablelist>
196
197                         <para>The <literal>[Address]</literal> section accepts the following keys:</para>
198
199                         <variablelist class='network-directives'>
200                                 <varlistentry>
201                                         <term><varname>Address</varname></term>
202                                         <listitem>
203                                                 <para>As in the <literal>[Network]</literal> section.</para>
204                                         </listitem>
205                                 </varlistentry>
206                                 <varlistentry>
207                                         <term><varname>Label</varname></term>
208                                         <listitem>
209                                                 <para>An address label.</para>
210                                         </listitem>
211                                 </varlistentry>
212                        </variablelist>
213                 </refsect2>
214         </refsect1>
215
216         <refsect1>
217                 <title>See Also</title>
218                 <para>
219                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
220                         <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
221                 </para>
222         </refsect1>
223
224 </refentry>