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">
6 This file is part of systemd.
8 Copyright 2013 Tom Gundersen
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.
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.
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/>.
24 <refentry id="systemd-networkd.service" conditional='ENABLE_NETWORKD'>
27 <title>systemd-networkd.service</title>
28 <productname>systemd</productname>
32 <contrib>Developer</contrib>
33 <firstname>Tom</firstname>
34 <surname>Gundersen</surname>
35 <email>teg@jklm.no</email>
41 <refentrytitle>systemd-networkd.service</refentrytitle>
42 <manvolnum>8</manvolnum>
46 <refname>systemd-networkd.service</refname>
47 <refname>systemd-networkd</refname>
48 <refpurpose>Network manager</refpurpose>
52 <para><filename>systemd-networkd.service</filename></para>
53 <para><filename>/usr/lib/systemd/systemd-networkd</filename></para>
57 <title>Description</title>
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>
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,
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>
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>
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>
99 <variablelist class='network-directives'>
101 <term><varname>MACAddress</varname></term>
103 <para>The hardware address.</para>
107 <term><varname>Path</varname></term>
109 <para>The persistent path, as exposed by the udev
110 property <literal>ID_PATH</literal>.</para>
114 <term><varname>Driver</varname></term>
116 <para>The driver currently bound to the device, as
117 exposed by the udev property <literal>DRIVER</literal>.
122 <term><varname>Type</varname></term>
124 <para>The device type, as exposed by the udev property
125 <literal>DEVTYPE</literal>.</para>
129 <term><varname>Name</varname></term>
131 <para>The device name, as exposed by the udev property
132 <literal>INTERFACE</literal>.</para>
137 <para>The <literal>[Network]</literal> section accepts the following keys:</para>
139 <variablelist class='network-directives'>
141 <term><varname>Description</varname></term>
143 <para>A description of the device. This is only used for
144 presentation purposes.</para>
148 <term><varname>Address</varname></term>
150 <para>A static IPv4 or IPv6 address and its prefix length,
151 separated by a '/' character. The format of the address must
153 <citerefentry><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>
158 <term><varname>Gateway</varname></term>
160 <para>The gateway address, which must be in the format described in
161 <citerefentry><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>
169 <title>See Also</title>
171 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
172 <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>,