systemd.network.xml revision 9c8ca3f7a69f82ca181b3cd2d5e1d3e621938abb
97a9a944b5887e91042b019776c41d5dd74557aferikabele<?xml version='1.0'?> <!--*-nxml-*-->
97a9a944b5887e91042b019776c41d5dd74557aferikabele<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
97a9a944b5887e91042b019776c41d5dd74557aferikabele "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive<!--
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive This file is part of systemd.
5a58787efeb02a1c3f06569d019ad81fd2efa06end
5a58787efeb02a1c3f06569d019ad81fd2efa06end Copyright 2013 Tom Gundersen
5a58787efeb02a1c3f06569d019ad81fd2efa06end
5a58787efeb02a1c3f06569d019ad81fd2efa06end systemd is free software; you can redistribute it and/or modify it
5a58787efeb02a1c3f06569d019ad81fd2efa06end under the terms of the GNU Lesser General Public License as published by
5a58787efeb02a1c3f06569d019ad81fd2efa06end the Free Software Foundation; either version 2.1 of the License, or
5a58787efeb02a1c3f06569d019ad81fd2efa06end (at your option) any later version.
5a58787efeb02a1c3f06569d019ad81fd2efa06end
5a58787efeb02a1c3f06569d019ad81fd2efa06end systemd is distributed in the hope that it will be useful, but
52fff662005b1866a3ff09bb6c902800c5cc6dedjerenkrantz WITHOUT ANY WARRANTY; without even the implied warranty of
5a58787efeb02a1c3f06569d019ad81fd2efa06end MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5a58787efeb02a1c3f06569d019ad81fd2efa06end Lesser General Public License for more details.
5a58787efeb02a1c3f06569d019ad81fd2efa06end
4b5981e276e93df97c34e4da05ca5cf8bbd937dand You should have received a copy of the GNU Lesser General Public License
5a58787efeb02a1c3f06569d019ad81fd2efa06end along with systemd; If not, see <http://www.gnu.org/licenses/>.
a63f0ab647ad2ab72efc9bea7a66e24e9ebc5cc2nd-->
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd<refentry id="systemd.network" conditional='ENABLE_NETWORKD'>
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd
e1e8390280254f7f0580d701e583f670643d4f3fnilgun <refentryinfo>
e1e8390280254f7f0580d701e583f670643d4f3fnilgun <title>systemd.network</title>
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd <productname>systemd</productname>
5a58787efeb02a1c3f06569d019ad81fd2efa06end
5a58787efeb02a1c3f06569d019ad81fd2efa06end <authorgroup>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <author>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <contrib>Developer</contrib>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <firstname>Tom</firstname>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <surname>Gundersen</surname>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <email>teg@jklm.no</email>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive </author>
ced7ef1f8c0df1805da0e87dbc5a1b6282910573nd </authorgroup>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive </refentryinfo>
ced7ef1f8c0df1805da0e87dbc5a1b6282910573nd
b21197dc8e6b8c764fdcc24d4bae8b0eebb6bc4end <refmeta>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <refentrytitle>systemd.network</refentrytitle>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <manvolnum>5</manvolnum>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive </refmeta>
97a9a944b5887e91042b019776c41d5dd74557aferikabele
f8396ed8364b56ec8adeaa49cac35a929758a29eslive <refnamediv>
ffb01336be79c64046b636e59fa8ddca8ec029edsf <refname>systemd.network</refname>
f8396ed8364b56ec8adeaa49cac35a929758a29eslive <refpurpose>Network configuration</refpurpose>
f8396ed8364b56ec8adeaa49cac35a929758a29eslive </refnamediv>
5a58787efeb02a1c3f06569d019ad81fd2efa06end
5a58787efeb02a1c3f06569d019ad81fd2efa06end <refsynopsisdiv>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <para><filename><replaceable>network</replaceable>.network</filename></para>
5a58787efeb02a1c3f06569d019ad81fd2efa06end </refsynopsisdiv>
deeee6bb6fd94c0ba5f3730b58abd9d299c89ccdnd
4db28ee269aa06f7c6232e11cd01f58c3349af23noodl <refsect1>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd <title>Description</title>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd
4a31db3c3a0202003c1b9f87affa7cc143e120e5sf <para>Network setup is performed by
117c1f888a14e73cdd821dc6c23eb0411144a41cnd <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
ffb01336be79c64046b636e59fa8ddca8ec029edsf </para>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd
117c1f888a14e73cdd821dc6c23eb0411144a41cnd <para>Network files must have the extension
117c1f888a14e73cdd821dc6c23eb0411144a41cnd <filename>.network</filename>; other extensions are ignored.
2bc7f1cf720973a67f8ff7a8d523e40569ae5b6cnd Networks are applied to links whenever the links appear.</para>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd
117c1f888a14e73cdd821dc6c23eb0411144a41cnd <para>The <filename>.network</filename> files are read from the
117c1f888a14e73cdd821dc6c23eb0411144a41cnd files located in the system network directory
117c1f888a14e73cdd821dc6c23eb0411144a41cnd <filename>/usr/lib/systemd/network</filename>, the volatile
117c1f888a14e73cdd821dc6c23eb0411144a41cnd runtime network directory
117c1f888a14e73cdd821dc6c23eb0411144a41cnd <filename>/run/systemd/network</filename> and the local
87ffb6e33f3cbef3b9bb406cc2d27039fa336eaatrawick administration network directory
4db28ee269aa06f7c6232e11cd01f58c3349af23noodl <filename>/etc/systemd/network</filename>. All configuration files
5a58787efeb02a1c3f06569d019ad81fd2efa06end are collectively sorted and processed in lexical order, regardless
5a58787efeb02a1c3f06569d019ad81fd2efa06end of the directories in which they live. However, files with
5a58787efeb02a1c3f06569d019ad81fd2efa06end identical filenames replace each other. Files in
5a58787efeb02a1c3f06569d019ad81fd2efa06end <filename>/etc</filename> have the highest priority, files in
5a58787efeb02a1c3f06569d019ad81fd2efa06end <filename>/run</filename> take precedence over files with the same
5a58787efeb02a1c3f06569d019ad81fd2efa06end name in <filename>/usr/lib</filename>. This can be used to
654d8eb036bedc99e90e11910ee02d3421417697rbowen override a system-supplied configuration file with a local file if
5a58787efeb02a1c3f06569d019ad81fd2efa06end needed; a symlink in <filename>/etc</filename> with the same name
5a58787efeb02a1c3f06569d019ad81fd2efa06end as a configuration file in <filename>/usr/lib</filename>, pointing
5a58787efeb02a1c3f06569d019ad81fd2efa06end to <filename>/dev/null</filename>, disables the configuration file
5a58787efeb02a1c3f06569d019ad81fd2efa06end entirely.</para>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick </refsect1>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <refsect1>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <title>[Match] Section Options</title>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
654d8eb036bedc99e90e11910ee02d3421417697rbowen <para>The network file contains a <literal>[Match]</literal>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive section, which determines if a given network file may be applied
06ba4a61654b3763ad65f52283832ebf058fdf1cslive to a given device; and a <literal>[Network]</literal> section
06ba4a61654b3763ad65f52283832ebf058fdf1cslive specifying how the device should be configured. The first (in
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive lexical order) of the network files that matches a given device
97a9a944b5887e91042b019776c41d5dd74557aferikabele is applied.</para>
654d8eb036bedc99e90e11910ee02d3421417697rbowen
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive <para>A network file is said to match a device if each of the
97a9a944b5887e91042b019776c41d5dd74557aferikabele entries in the <literal>[Match]</literal> section matches, or if
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive the section is empty. The following keys are accepted:</para>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive <variablelist class='network-directives'>
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive <varlistentry>
ffb01336be79c64046b636e59fa8ddca8ec029edsf <term><varname>MACAddress=</varname></term>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <listitem>
ffb01336be79c64046b636e59fa8ddca8ec029edsf <para>The hardware address.</para>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick </listitem>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick </varlistentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <varlistentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <term><varname>Path=</varname></term>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <listitem>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <para>A whitespace-separated list of shell-style globs
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick matching the persistent path, as exposed by the udev
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick property <literal>ID_PATH</literal>.</para>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick </listitem>
ffb01336be79c64046b636e59fa8ddca8ec029edsf </varlistentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <varlistentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <term><varname>Driver=</varname></term>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <listitem>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <para>A whitespace-separated list of shell-style globs
77c77cf89621f21c8e2bbad63058b5eaa5f88d4ajim matching the driver currently bound to the device, as
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick exposed by the udev property <literal>DRIVER</literal>
ced7ef1f8c0df1805da0e87dbc5a1b6282910573nd of its parent device, or if that is not set the driver
ced7ef1f8c0df1805da0e87dbc5a1b6282910573nd as exposed by <literal>ethtool -i</literal> of the
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick device itself.</para>
ffb01336be79c64046b636e59fa8ddca8ec029edsf </listitem>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick </varlistentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <varlistentry>
ced7ef1f8c0df1805da0e87dbc5a1b6282910573nd <term><varname>Type=</varname></term>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <listitem>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <para>A whitespace-separated list of shell-style globs
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick matching the device type, as exposed by the udev property
4a31db3c3a0202003c1b9f87affa7cc143e120e5sf <literal>DEVTYPE</literal>.</para>
4a31db3c3a0202003c1b9f87affa7cc143e120e5sf </listitem>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick </varlistentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <varlistentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <term><varname>Name=</varname></term>
ffb01336be79c64046b636e59fa8ddca8ec029edsf <listitem>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <para>A whitespace-separated list of shell-style globs
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive matching the device name, as exposed by the udev property
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive <literal>INTERFACE</literal>.</para>
97a9a944b5887e91042b019776c41d5dd74557aferikabele </listitem>
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive </varlistentry>
ea8a727ff298d2f5368b55b7ae8d87091ae106e7nd <varlistentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <term><varname>Host=</varname></term>
ea8a727ff298d2f5368b55b7ae8d87091ae106e7nd <listitem>
ffb01336be79c64046b636e59fa8ddca8ec029edsf <para>Matches against the hostname or machine ID of the
ea8a727ff298d2f5368b55b7ae8d87091ae106e7nd host. See <literal>ConditionHost=</literal> in
ea8a727ff298d2f5368b55b7ae8d87091ae106e7nd <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick for details.
ea8a727ff298d2f5368b55b7ae8d87091ae106e7nd </para>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive </listitem>
e8d485701957d5c6de870111c112e168a894d49and </varlistentry>
e8d485701957d5c6de870111c112e168a894d49and <varlistentry>
654d8eb036bedc99e90e11910ee02d3421417697rbowen <term><varname>Virtualization=</varname></term>
654d8eb036bedc99e90e11910ee02d3421417697rbowen <listitem>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <para>Checks whether the system is executed in a virtualized
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive environment and optionally test whether it is a specific
9bcfc3697a91b5215893a7d0206865b13fc72148nd implementation. See <literal>ConditionVirtualization=</literal> in
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive for details.
06ba4a61654b3763ad65f52283832ebf058fdf1cslive </para>
4a31db3c3a0202003c1b9f87affa7cc143e120e5sf </listitem>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive </varlistentry>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <varlistentry>
709e3a21ba73b8433462959cd56c773454b34441trawick <term><varname>KernelCommandLine=</varname></term>
709e3a21ba73b8433462959cd56c773454b34441trawick <listitem>
709e3a21ba73b8433462959cd56c773454b34441trawick <para>Checks whether a specific kernel command line option is
709e3a21ba73b8433462959cd56c773454b34441trawick set (or if prefixed with the exclamation mark unset). See
709e3a21ba73b8433462959cd56c773454b34441trawick <literal>ConditionKernelCommandLine=</literal> in
709e3a21ba73b8433462959cd56c773454b34441trawick <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
709e3a21ba73b8433462959cd56c773454b34441trawick for details.
5a58787efeb02a1c3f06569d019ad81fd2efa06end </para>
5a58787efeb02a1c3f06569d019ad81fd2efa06end </listitem>
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd </varlistentry>
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd <varlistentry>
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd <term><varname>Architecture=</varname></term>
e1e8390280254f7f0580d701e583f670643d4f3fnilgun <listitem>
e1e8390280254f7f0580d701e583f670643d4f3fnilgun <para>Checks whether the system is running on a specific
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd architecture. See <literal>ConditionArchitecture=</literal> in
9c1260efa52c82c2a58e5b5f20cd6902563d95f5rbowen <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
5a58787efeb02a1c3f06569d019ad81fd2efa06end for details.
5a58787efeb02a1c3f06569d019ad81fd2efa06end </para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>[Link] Section Options</title>
<para> The <literal>[Link]</literal> section accepts the following keys:</para>
<variablelist class='network-directives'>
<varlistentry>
<term><varname>MACAddress=</varname></term>
<listitem>
<para>The hardware address.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>MTUBytes=</varname></term>
<listitem>
<para>The maximum transmission unit in bytes to set for the
device. The usual suffixes K, M, G, are supported and are
understood to the base of 1024.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>[Network] Section Options</title>
<para>The <literal>[Network]</literal> section accepts the following keys:</para>
<variablelist class='network-directives'>
<varlistentry>
<term><varname>Description=</varname></term>
<listitem>
<para>A description of the device. This is only used for
presentation purposes.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>DHCP=</varname></term>
<listitem>
<para>Enables DHCPv4 and/or DHCPv6 support. Accepts
<literal>yes</literal>, <literal>no</literal>,
<literal>ipv4</literal>, or <literal>ipv6</literal>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>DHCPServer=</varname></term>
<listitem>
<para>A boolean. Enables a basic DHCPv4 server on the
device. Mostly useful for handing out leases to container
instances.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>LinkLocalAddressing=</varname></term>
<listitem>
<para>Enables link-local address autoconfiguration. Accepts
<literal>yes</literal>, <literal>no</literal>,
<literal>ipv4</literal>, or <literal>ipv6</literal>. Defaults to
<literal>ipv6</literal>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>IPv4LLRoute=</varname></term>
<listitem>
<para>A boolean. When true, sets up the route needed for
non-IPv4LL hosts to communicate with IPv4LL-only hosts. Defaults
to false.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>IPv6Token=</varname></term>
<listitem>
<para>An IPv6 address with the top 64 bits unset. When set, indicates the
64 bits interface part of SLAAC IPv6 addresses for this link. By default
it is autogenerated.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>LLMNR=</varname></term>
<listitem>
<para>A boolean or <literal>resolve</literal>. When true, enables
Link-Local Multicast Name Resolution on the link, when set to
<literal>resolve</literal> only resolution is enabled, but not
announcement. Defaults to true.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>LLDP=</varname></term>
<listitem>
<para>A boolean. When true, enables LLDP link receive support.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>BindCarrier=</varname></term>
<listitem>
<para>A port or a list of ports. When set, controls the
behaviour of the current interface. When all ports in the list
are in an operational down state, the current interface is brought
down. When at least one port has carrier, the current interface
is brought up.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>Address=</varname></term>
<listitem>
<para>A static IPv4 or IPv6 address and its prefix length,
separated by a <literal>/</literal> character. Specify
this key more than once to configure several addresses.
The format of the address must be as described in
<citerefentry><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
This is a short-hand for an [Address] section only
containing an Address key (see below). This option may be
specified more than once.
</para>
<para>If the specified address is 0.0.0.0 (for IPv4) or
[::] (for IPv6), a new address range of the requested size
is automatically allocated from a system-wide pool of
unused ranges. The allocated range is checked against all
current network interfaces and all known network
configuration files to avoid address range conflicts. The
default system-wide pool consists of 192.168.0.0/16,
172.16.0.0/12 and 10.0.0.0/8 for IPv4, and fc00::/7 for
IPv6. This functionality is useful to manage a large
number of dynamically created network interfaces with the
same network configuration and automatic address range
assignment.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>Gateway=</varname></term>
<listitem>
<para>The gateway address, which must be in the format
described in
<citerefentry><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
This is a short-hand for a [Route] section only containing
a Gateway key. This option may be specified more than
once.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>DNS=</varname></term>
<listitem>
<para>A DNS server address, which must be in the format
described in
<citerefentry><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
This option may be specified more than once.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>Domains=</varname></term>
<listitem>
<para>The domains used for DNS resolution over this link.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>NTP=</varname></term>
<listitem>
<para>An NTP server address. This option may be specified more than once.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>IPForward=</varname></term>
<listitem><para>Configures IP forwarding for the network
interface. If enabled incoming packets on the network
interface will be forwarded to other interfaces according to
the routing table. Takes either a boolean argument, or the
values <literal>ipv4</literal> or <literal>ipv6</literal>,
which only enables IP forwarding for the specified address
family.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>IPMasquerade=</varname></term>
<listitem><para>Configures IP masquerading for the network
interface. If enabled packets forwarded from the network
interface will be appear as coming from the local host.
Takes a boolean argument. Implies
<varname>IPForward=yes</varname>.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>Bridge=</varname></term>
<listitem>
<para>The name of the bridge to add the link to.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>Bond=</varname></term>
<listitem>
<para>The name of the bond to add the link to.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>VLAN=</varname></term>
<listitem>
<para>The name of a VLAN to create on the link. This
option may be specified more than once.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>MACVLAN=</varname></term>
<listitem>
<para>The name of a MACVLAN to create on the link. This
option may be specified more than once.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>VXLAN=</varname></term>
<listitem>
<para>The name of a VXLAN to create on the link. This
option may be specified more than once.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>Tunnel=</varname></term>
<listitem>
<para>The name of a Tunnel to create on the link. This
option may be specified more than once.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>[Address] Section Options</title>
<para>An <literal>[Address]</literal> section accepts the
following keys. Specify several <literal>[Address]</literal>
sections to configure several addresses.</para>
<variablelist class='network-directives'>
<varlistentry>
<term><varname>Address=</varname></term>
<listitem>
<para>As in the <literal>[Network]</literal> section. This
key is mandatory.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>Peer=</varname></term>
<listitem>
<para>The peer address in a point-to-point connection.
Accepts the same format as the <literal>Address</literal>
key.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>Broadcast=</varname></term>
<listitem>
<para>The broadcast address, which must be in the format
described in
<citerefentry><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
This key only applies to IPv4 addresses. If it is not
given, it is derived from the <literal>Address</literal>
key.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>Label=</varname></term>
<listitem>
<para>An address label.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>[Route] Section Options</title>
<para>The <literal>[Route]</literal> section accepts the
following keys. Specify several <literal>[Route]</literal>
sections to configure several routes.</para>
<variablelist class='network-directives'>
<varlistentry>
<term><varname>Gateway=</varname></term>
<listitem>
<para>As in the <literal>[Network]</literal> section.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>Destination=</varname></term>
<listitem>
<para>The destination prefix of the route. Possibly
followed by a slash and the prefixlength. If omitted, a
full-length host route is assumed.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>Source=</varname></term>
<listitem>
<para>The source prefix of the route. Possibly followed by
a slash and the prefixlength. If omitted, a full-length
host route is assumed.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>Metric=</varname></term>
<listitem>
<para>The metric of the route. An unsigned integer</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>Scope=</varname></term>
<listitem>
<para>The scope of the route. One of the values <literal>global</literal>,
<literal>link</literal> or <literal>host</literal>. Defaults to
<literal>global</literal>.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>[DHCP] Section Options</title>
<para>The <literal>[DHCP]</literal> section accepts the following keys:</para>
<variablelist class='network-directives'>
<varlistentry>
<term><varname>UseDNS=</varname></term>
<listitem>
<para>When true (the default), the DNS servers received
from the DHCP server will be used and take precedence over
any statically configured ones.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>UseMTU=</varname></term>
<listitem>
<para>When true, the interface maximum transmission unit
from the DHCP server will be used on the current link.
Defaults to false.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>SendHostname=</varname></term>
<listitem>
<para>When true (the default), the machine's hostname will be sent to the DHCP
server</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>UseHostname=</varname></term>
<listitem>
<para>When true (the default), the hostname received from
the DHCP server will be used as the transient
hostname.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>UseDomains=</varname></term>
<listitem>
<para>When true (not the default), the domain name
received from the DHCP server will be used for DNS
resolution over this link.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>UseRoutes=</varname></term>
<listitem>
<para>When true (the default), the static routes will be
requested from the DHCP server and added to the routing
table with metric of 1024.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>CriticalConnection=</varname></term>
<listitem>
<para>When true, the connection will never be torn down
even if the DHCP lease expires. This is contrary to the
DHCP specification, but may be the best choice if, say,
the root filesystem relies on this connection. Defaults to
false.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>ClientIdentifier=</varname></term>
<listitem>
<para>DHCP client identifier to use. Either <literal>mac</literal>
to use the MAC address of the link or <literal>duid</literal>
(the default) to use a RFC4361-compliant Client ID.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>VendorClassIdentifier=</varname></term>
<listitem>
<para>The vendor class identifier used to identify vendor
type and configuration.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>RequestBroadcast=</varname></term>
<listitem>
<para>Request the server to use broadcast messages before
the IP address has been configured. This is necessary for
devices that cannot receive RAW packets, or that cannot
receive packets at all before an IP address has been
configured. On the other hand, this must not be enabled on
networks where broadcasts are filtered out.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>RouteMetric=</varname></term>
<listitem>
<para>Set the routing metric for routes specified by the
DHCP server.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>[Bridge] Section Options</title>
<para>The <literal>[Bridge]</literal> section accepts the
following keys.</para>
<variablelist class='network-directives'>
<varlistentry>
<term><varname>Cost=</varname></term>
<listitem>
<para>Each port in a bridge may have different speed. Cost
is used to decide which link to use. Faster interfaces
should have lower costs</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>[BridgeFDB] Section Options</title>
<para>The <literal>[BridgeFDB]</literal> section manages the
forwarding database table of a port and accepts the following
keys. Specify several <literal>[BridgeFDB]</literal> sections to
configure several static MAC table entries.</para>
<variablelist class='network-directives'>
<varlistentry>
<term><varname>MACAddress=</varname></term>
<listitem>
<para>As in the <literal>[Network]</literal> section. This
key is mandatory.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>VLANId=</varname></term>
<listitem>
<para>The VLAN Id for the new static MAC table entry. If
omitted, no VLAN Id info is appended to the new static MAC
table entry.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Example</title>
<example>
<title>/etc/systemd/network/50-static.network</title>
<programlisting>[Match]
Name=enp2s0
[Network]
Address=192.168.0.15/24
Gateway=192.168.0.1</programlisting>
</example>
<example>
<title>/etc/systemd/network/80-dhcp.network</title>
<programlisting>[Match]
Name=en*
[Network]
DHCP=yes</programlisting>
</example>
<example>
<title>/etc/systemd/network/bridge-static.network</title>
<programlisting>[Match]
Name=bridge0
[Network]
Address=192.168.0.15/24
Gateway=192.168.0.1
DNS=192.168.0.1</programlisting>
</example>
<example>
<title>/etc/systemd/network/bridge-slave-interface.network</title>
<programlisting>[Match]
Name=enp2s0
[Network]
Bridge=bridge0</programlisting>
</example>
<example>
<title>/etc/systemd/network/ipip.network</title>
<programlisting>[Match]
Name=em1
[Network]
Tunnel=ipip-tun</programlisting>
</example>
<example>
<title>/etc/systemd/network/sit.network</title>
<programlisting>[Match]
Name=em1
[Network]
Tunnel=sit-tun</programlisting>
</example>
<example>
<title>/etc/systemd/network/gre.network</title>
<programlisting>[Match]
Name=em1
[Network]
Tunnel=gre-tun</programlisting>
</example>
<example>
<title>/etc/systemd/network/vti.network</title>
<programlisting>[Match]
Name=em1
[Network]
Tunnel=vti-tun</programlisting>
</example>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>
</para>
</refsect1>
</refentry>