mirror of
https://git.proxmox.com/git/systemd
synced 2026-01-21 18:44:07 +00:00
86 lines
9.7 KiB
HTML
86 lines
9.7 KiB
HTML
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd.netdev</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
|
||
a.headerlink {
|
||
color: #c60f0f;
|
||
font-size: 0.8em;
|
||
padding: 0 4px 0 4px;
|
||
text-decoration: none;
|
||
visibility: hidden;
|
||
}
|
||
|
||
a.headerlink:hover {
|
||
background-color: #c60f0f;
|
||
color: white;
|
||
}
|
||
|
||
h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
|
||
visibility: visible;
|
||
}
|
||
</style><a href="index.html">Index </a>·
|
||
<a href="systemd.directives.html">Directives </a>·
|
||
<a href="../python-systemd/index.html">Python </a>·
|
||
<a href="../libudev/index.html">libudev </a>·
|
||
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 214</span><hr><div class="refentry"><a name="systemd.netdev"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.netdev — Virtual Network Device configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>netdev</code></em>.netdev</code></p></div><div class="refsect1"><a name="idm214188018224"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Network setup is performed by
|
||
<a href="systemd-networkd.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd</span>(8)</span></a>.
|
||
</p><p>Virtual Network Device files must have the extension
|
||
<code class="filename">.netdev</code>; other extensions are ignored. Virtual
|
||
network devices are created as soon as networkd is started.</p><p>The <code class="filename">.netdev</code> files are read from the files located in the
|
||
system network directory <code class="filename">/usr/lib/systemd/network</code>,
|
||
the volatile runtime network directory
|
||
<code class="filename">/run/systemd/network</code> and the local administration
|
||
network directory <code class="filename">/etc/systemd/network</code>.
|
||
All configuration files are collectively sorted and processed in lexical order,
|
||
regardless of the directories in which they live. However, files with
|
||
identical filenames replace each other. Files in
|
||
<code class="filename">/etc</code> have the highest priority, files in
|
||
<code class="filename">/run</code> take precedence over files with the same
|
||
name in <code class="filename">/usr/lib</code>. This can be used to override a
|
||
system-supplied configuration file with a local file if needed; a symlink in
|
||
<code class="filename">/etc</code> with the same name as a configuration file in
|
||
<code class="filename">/usr/lib</code>, pointing to <code class="filename">/dev/null</code>,
|
||
disables the configuration file entirely.</p><p>A virtual network device is only created if the
|
||
"<code class="literal">[Match]</code>" section matches the current
|
||
environment, or if the section is empty. The following keys are accepted:</p><div class="variablelist"><dl class="variablelist"><dt id="Host="><span class="term"><code class="varname">Host=</code></span><a class="headerlink" title="Permalink to this term" href="#Host=">¶</a></dt><dd><p>Matches against the hostname or machine ID of the
|
||
host. See "<code class="literal">ConditionHost=</code>" in
|
||
<a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>
|
||
for details.
|
||
</p></dd><dt id="Virtualization="><span class="term"><code class="varname">Virtualization=</code></span><a class="headerlink" title="Permalink to this term" href="#Virtualization=">¶</a></dt><dd><p>Checks whether the system is executed in a virtualized
|
||
environment and optionally test whether it is a specific
|
||
implementation. See "<code class="literal">ConditionVirtualization=</code>" in
|
||
<a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>
|
||
for details.
|
||
</p></dd><dt id="KernelCommandLine="><span class="term"><code class="varname">KernelCommandLine=</code></span><a class="headerlink" title="Permalink to this term" href="#KernelCommandLine=">¶</a></dt><dd><p>Checks whether a specific kernel command line option is
|
||
set (or if prefixed with the exclamation mark unset). See
|
||
"<code class="literal">ConditionKernelCommandLine=</code>" in
|
||
<a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>
|
||
for details.
|
||
</p></dd><dt id="Architecture="><span class="term"><code class="varname">Architecture=</code></span><a class="headerlink" title="Permalink to this term" href="#Architecture=">¶</a></dt><dd><p>Checks whether the system is running on a specific
|
||
architecture. See "<code class="literal">ConditionArchitecture=</code>" in
|
||
<a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>
|
||
for details.
|
||
</p></dd></dl></div><p>The "<code class="literal">[NetDev]</code>" section accepts the following
|
||
keys:</p><div class="variablelist"><dl class="variablelist"><dt id="Name="><span class="term"><code class="varname">Name=</code></span><a class="headerlink" title="Permalink to this term" href="#Name=">¶</a></dt><dd><p>The interface name used when creating the
|
||
netdev. This option is compulsory.</p></dd><dt id="Kind="><span class="term"><code class="varname">Kind=</code></span><a class="headerlink" title="Permalink to this term" href="#Kind=">¶</a></dt><dd><p>The netdev kind. Currently, "<code class="literal">bridge</code>",
|
||
"<code class="literal">bond</code>", "<code class="literal">vlan</code>" and
|
||
"<code class="literal">macvlan</code>" are supported. This option
|
||
is compulsory.</p></dd></dl></div><p>The "<code class="literal">[VLAN]</code>" section only applies for netdevs of kind "<code class="literal">vlan</code>",
|
||
and accepts the following key:</p><div class="variablelist"><dl class="variablelist"><dt id="Id="><span class="term"><code class="varname">Id=</code></span><a class="headerlink" title="Permalink to this term" href="#Id=">¶</a></dt><dd><p>The VLAN ID to use. An integer in the range 0–4094.
|
||
This option is compulsory.</p></dd></dl></div><p>The "<code class="literal">[MACVLAN]</code>" section only applies for netdevs of kind
|
||
"<code class="literal">macvlan</code>", and accepts the following key:</p><div class="variablelist"><dl class="variablelist"><dt id="Mode="><span class="term"><code class="varname">Mode=</code></span><a class="headerlink" title="Permalink to this term" href="#Mode=">¶</a></dt><dd><p>The MACVLAN mode to use. The supported options are
|
||
"<code class="literal">private</code>", "<code class="literal">vepa</code>",
|
||
"<code class="literal">bridge</code>" and "<code class="literal">passthru</code>".
|
||
</p></dd></dl></div></div><div class="refsect1"><a name="idm214190871728"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214190871056"></a><p class="title"><b>Example 1. /etc/systemd/network/bridge.netdev</b></p><div class="example-contents"><pre class="programlisting">[NetDev]
|
||
Name=bridge0
|
||
Kind=bridge</pre></div></div><br class="example-break"><div class="example"><a name="idm214190869536"></a><p class="title"><b>Example 2. /etc/systemd/network/vlan1.netdev</b></p><div class="example-contents"><pre class="programlisting">[Match]
|
||
Virtualization=no
|
||
|
||
[NetDev]
|
||
Name=vlan1
|
||
Kind=vlan
|
||
|
||
[VLAN]
|
||
Id=1</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214190867856"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
|
||
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
|
||
<a href="systemd-networkd.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd</span>(8)</span></a>,
|
||
<a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>
|
||
</p></div></div></body></html>
|