<
variablelist class='network-directives'>
<
term><
varname>MACAddress=</
varname></
term>
<
para>The hardware address.</
para>
<
term><
varname>Path=</
varname></
term>
<
para>A whitespace-separated list of shell-style globs
matching the persistent path, as exposed by the udev
property <
literal>ID_PATH</
literal>.</
para>
<
term><
varname>Driver=</
varname></
term>
<
para>A whitespace-separated list of shell-style globs
matching the driver currently bound to the device, as
exposed by the udev property <
literal>DRIVER</
literal>
of its parent device, or if that is not set the driver
as exposed by <
literal>ethtool -i</
literal> of the
<
term><
varname>Type=</
varname></
term>
<
para>A whitespace-separated list of shell-style globs
matching the device type, as exposed by the udev property
<
literal>DEVTYPE</
literal>.</
para>
<
term><
varname>Name=</
varname></
term>
<
para>A whitespace-separated list of shell-style globs
matching the device name, as exposed by the udev property
<
literal>INTERFACE</
literal>.</
para>
<
term><
varname>Host=</
varname></
term>
<
para>Matches against the hostname or machine ID of the
host. See <
literal>ConditionHost=</
literal> in
<
citerefentry><
refentrytitle>
systemd.unit</
refentrytitle><
manvolnum>5</
manvolnum></
citerefentry>
<
term><
varname>Virtualization=</
varname></
term>
<
para>Checks whether the system is executed in a virtualized
environment and optionally test whether it is a specific
implementation. See <
literal>ConditionVirtualization=</
literal> in
<
citerefentry><
refentrytitle>
systemd.unit</
refentrytitle><
manvolnum>5</
manvolnum></
citerefentry>
<
term><
varname>KernelCommandLine=</
varname></
term>
<
para>Checks whether a specific kernel command line option is
set (or if prefixed with the exclamation mark unset). See
<
literal>ConditionKernelCommandLine=</
literal> in
<
citerefentry><
refentrytitle>
systemd.unit</
refentrytitle><
manvolnum>5</
manvolnum></
citerefentry>
<
term><
varname>Architecture=</
varname></
term>
<
para>Checks whether the system is running on a specific
architecture. See <
literal>ConditionArchitecture=</
literal> in
<
citerefentry><
refentrytitle>
systemd.unit</
refentrytitle><
manvolnum>5</
manvolnum></
citerefentry>
<
title>[Link] Section Options</
title>
<
para> The <
literal>[Link]</
literal> section accepts the following keys:</
para>
<
variablelist class='network-directives'>
<
term><
varname>MACAddress=</
varname></
term>
<
para>The hardware address.</
para>
<
term><
varname>MTUBytes=</
varname></
term>
<
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>
<
title>[Network] Section Options</
title>
<
para>The <
literal>[Network]</
literal> section accepts the following keys:</
para>
<
variablelist class='network-directives'>
<
term><
varname>Description=</
varname></
term>
<
para>A description of the device. This is only used for
presentation purposes.</
para>
<
term><
varname>DHCP=</
varname></
term>
<
para>Enables DHCPv4
and/
or DHCPv6 support. Accepts
<
literal>yes</
literal>, <
literal>no</
literal>,
<
literal>ipv4</
literal>, or <
literal>ipv6</
literal>.</
para>
<
term><
varname>DHCPServer=</
varname></
term>
<
para>A boolean. Enables a basic DHCPv4 server on the
device. Mostly useful for handing out leases to container
<
term><
varname>LinkLocalAddressing=</
varname></
term>
<
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>
<
term><
varname>IPv4LLRoute=</
varname></
term>
<
para>A boolean. When true, sets up the route needed for
non-IPv4LL hosts to communicate with IPv4LL-only hosts. Defaults
<
term><
varname>IPv6Token=</
varname></
term>
<
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>
<
term><
varname>LLMNR=</
varname></
term>
<
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>
<
term><
varname>LLDP=</
varname></
term>
<
para>A boolean. When true, enables LLDP link receive support.
<
term><
varname>BindCarrier=</
varname></
term>
<
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
<
term><
varname>Address=</
varname></
term>
<
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 project='man-pages'><
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>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
IPv6. This functionality is useful to manage a large
number of dynamically created network interfaces with the
same network configuration and automatic address range
<
term><
varname>Gateway=</
varname></
term>
<
para>The gateway address, which must be in the format
<
citerefentry project='man-pages'><
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
<
term><
varname>DNS=</
varname></
term>
<
para>A DNS server address, which must be in the format
<
citerefentry project='man-pages'><
refentrytitle>inet_pton</
refentrytitle><
manvolnum>3</
manvolnum></
citerefentry>.
This option may be specified more than once.</
para>
<
term><
varname>Domains=</
varname></
term>
<
para>The domains used for DNS resolution over this link.</
para>
<
term><
varname>NTP=</
varname></
term>
<
para>An NTP server address. This option may be specified more than once.</
para>
<
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>
<
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>
<
term><
varname>Bridge=</
varname></
term>
<
para>The name of the bridge to add the link to.</
para>
<
term><
varname>Bond=</
varname></
term>
<
para>The name of the bond to add the link to.</
para>
<
term><
varname>VLAN=</
varname></
term>
<
para>The name of a VLAN to create on the link. This
option may be specified more than once.</
para>
<
term><
varname>MACVLAN=</
varname></
term>
<
para>The name of a MACVLAN to create on the link. This
option may be specified more than once.</
para>
<
term><
varname>VXLAN=</
varname></
term>
<
para>The name of a VXLAN to create on the link. This
option may be specified more than once.</
para>
<
term><
varname>Tunnel=</
varname></
term>
<
para>The name of a Tunnel to create on the link. This
option may be specified more than once.</
para>
<
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'>
<
term><
varname>Address=</
varname></
term>
<
para>As in the <
literal>[Network]</
literal> section. This
<
term><
varname>Peer=</
varname></
term>
<
para>The peer address in a point-to-point connection.
Accepts the same format as the <
literal>Address</
literal>
<
term><
varname>Broadcast=</
varname></
term>
<
para>The broadcast address, which must be in the format
<
citerefentry project='man-pages'><
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>
<
term><
varname>Label=</
varname></
term>
<
para>An address label.</
para>
<
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'>
<
term><
varname>Gateway=</
varname></
term>
<
para>As in the <
literal>[Network]</
literal> section.</
para>
<
term><
varname>Destination=</
varname></
term>
<
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>
<
term><
varname>Source=</
varname></
term>
<
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>
<
term><
varname>Metric=</
varname></
term>
<
para>The metric of the route. An unsigned integer</
para>
<
term><
varname>Scope=</
varname></
term>
<
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>
<
title>[DHCP] Section Options</
title>
<
para>The <
literal>[DHCP]</
literal> section accepts the following keys:</
para>
<
variablelist class='network-directives'>
<
term><
varname>UseDNS=</
varname></
term>
<
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>
<
term><
varname>UseMTU=</
varname></
term>
<
para>When true, the interface maximum transmission unit
from the DHCP server will be used on the current link.
Defaults to false.</
para>
<
term><
varname>SendHostname=</
varname></
term>
<
para>When true (the default), the machine's hostname will be sent to the DHCP
<
term><
varname>UseHostname=</
varname></
term>
<
para>When true (the default), the hostname received from
the DHCP server will be used as the transient
<
term><
varname>UseDomains=</
varname></
term>
<
para>When true (not the default), the domain name
received from the DHCP server will be used for DNS
resolution over this link.</
para>
<
term><
varname>UseRoutes=</
varname></
term>
<
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>
<
term><
varname>CriticalConnection=</
varname></
term>
<
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
<
term><
varname>ClientIdentifier=</
varname></
term>
<
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>
<
term><
varname>VendorClassIdentifier=</
varname></
term>
<
para>The vendor class identifier used to identify vendor
type and configuration.</
para>
<
term><
varname>RequestBroadcast=</
varname></
term>
<
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>
<
term><
varname>RouteMetric=</
varname></
term>
<
para>Set the routing metric for routes specified by the
<
title>[Bridge] Section Options</
title>
<
para>The <
literal>[Bridge]</
literal> section accepts the
<
variablelist class='network-directives'>
<
term><
varname>Cost=</
varname></
term>
<
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>
<
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'>
<
term><
varname>MACAddress=</
varname></
term>
<
para>As in the <
literal>[Network]</
literal> section. This
<
term><
varname>VLANId=</
varname></
term>
<
para>The VLAN Id for the new static MAC table entry. If
omitted, no VLAN Id info is appended to the new static MAC
Gateway=192.168.0.1</
programlisting>
DHCP=yes</
programlisting>
DNS=192.168.0.1</
programlisting>
Bridge=bridge0</
programlisting>
Tunnel=ipip-tun</
programlisting>
Tunnel=sit-tun</
programlisting>
Tunnel=gre-tun</
programlisting>
Tunnel=vti-tun</
programlisting>
<
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>