systemd.network.xml revision 9c8ca3f7a69f82ca181b3cd2d5e1d3e621938abb
97a9a944b5887e91042b019776c41d5dd74557aferikabele<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
97a9a944b5887e91042b019776c41d5dd74557aferikabele "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive This file is part of systemd.
5a58787efeb02a1c3f06569d019ad81fd2efa06end Copyright 2013 Tom Gundersen
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 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.
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/>.
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd<refentry id="systemd.network" conditional='ENABLE_NETWORKD'>
e1e8390280254f7f0580d701e583f670643d4f3fnilgun <refentryinfo>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <authorgroup>
ced7ef1f8c0df1805da0e87dbc5a1b6282910573nd </authorgroup>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive </refentryinfo>
f8396ed8364b56ec8adeaa49cac35a929758a29eslive <refnamediv>
f8396ed8364b56ec8adeaa49cac35a929758a29eslive </refnamediv>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <refsynopsisdiv>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <para><filename><replaceable>network</replaceable>.network</filename></para>
5a58787efeb02a1c3f06569d019ad81fd2efa06end </refsynopsisdiv>
4a31db3c3a0202003c1b9f87affa7cc143e120e5sf <para>Network setup is performed by
117c1f888a14e73cdd821dc6c23eb0411144a41cnd <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
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 <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
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 </refsect1>
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>
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>
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive <varlistentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick </listitem>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick </varlistentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <varlistentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <para>A whitespace-separated list of shell-style globs
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick matching the persistent path, as exposed by the udev
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick </listitem>
ffb01336be79c64046b636e59fa8ddca8ec029edsf </varlistentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <varlistentry>
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
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick device itself.</para>
ffb01336be79c64046b636e59fa8ddca8ec029edsf </listitem>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick </varlistentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <varlistentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <para>A whitespace-separated list of shell-style globs
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick matching the device type, as exposed by the udev property
4a31db3c3a0202003c1b9f87affa7cc143e120e5sf </listitem>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick </varlistentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <varlistentry>
ffb01336be79c64046b636e59fa8ddca8ec029edsf <listitem>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <para>A whitespace-separated list of shell-style globs
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive matching the device name, as exposed by the udev property
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive </varlistentry>
ea8a727ff298d2f5368b55b7ae8d87091ae106e7nd <varlistentry>
ea8a727ff298d2f5368b55b7ae8d87091ae106e7nd <listitem>
ffb01336be79c64046b636e59fa8ddca8ec029edsf <para>Matches against the hostname or machine ID of the
ea8a727ff298d2f5368b55b7ae8d87091ae106e7nd <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick for details.
06ba4a61654b3763ad65f52283832ebf058fdf1cslive </listitem>
e8d485701957d5c6de870111c112e168a894d49and </varlistentry>
e8d485701957d5c6de870111c112e168a894d49and <varlistentry>
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.
4a31db3c3a0202003c1b9f87affa7cc143e120e5sf </listitem>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive </varlistentry>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <varlistentry>
709e3a21ba73b8433462959cd56c773454b34441trawick <para>Checks whether a specific kernel command line option is
709e3a21ba73b8433462959cd56c773454b34441trawick set (or if prefixed with the exclamation mark unset). See
709e3a21ba73b8433462959cd56c773454b34441trawick <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
709e3a21ba73b8433462959cd56c773454b34441trawick for details.
5a58787efeb02a1c3f06569d019ad81fd2efa06end </listitem>
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd </varlistentry>
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd <varlistentry>
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.