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