%PDF- %PDF-
Direktori : /usr/share/doc/netplan/ |
Current File : //usr/share/doc/netplan/netplan.html |
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang=""> <head> <meta charset="utf-8" /> <meta name="generator" content="pandoc" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <title>"Netplan reference"</title> <style> code{white-space: pre-wrap;} span.smallcaps{font-variant: small-caps;} span.underline{text-decoration: underline;} div.column{display: inline-block; vertical-align: top; width: 50%;} div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} ul.task-list{list-style: none;} pre > code.sourceCode { white-space: pre; position: relative; } pre > code.sourceCode > span { display: inline-block; line-height: 1.25; } pre > code.sourceCode > span:empty { height: 1.2em; } code.sourceCode > span { color: inherit; text-decoration: inherit; } div.sourceCode { margin: 1em 0; } pre.sourceCode { margin: 0; } @media screen { div.sourceCode { overflow: auto; } } @media print { pre > code.sourceCode { white-space: pre-wrap; } pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; } } pre.numberSource code { counter-reset: source-line 0; } pre.numberSource code > span { position: relative; left: -4em; counter-increment: source-line; } pre.numberSource code > span > a:first-child::before { content: counter(source-line); position: relative; left: -1em; text-align: right; vertical-align: baseline; border: none; display: inline-block; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; padding: 0 4px; width: 4em; color: #aaaaaa; } pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; } div.sourceCode { } @media screen { pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; } } code span.al { color: #ff0000; font-weight: bold; } /* Alert */ code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */ code span.at { color: #7d9029; } /* Attribute */ code span.bn { color: #40a070; } /* BaseN */ code span.bu { } /* BuiltIn */ code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */ code span.ch { color: #4070a0; } /* Char */ code span.cn { color: #880000; } /* Constant */ code span.co { color: #60a0b0; font-style: italic; } /* Comment */ code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */ code span.do { color: #ba2121; font-style: italic; } /* Documentation */ code span.dt { color: #902000; } /* DataType */ code span.dv { color: #40a070; } /* DecVal */ code span.er { color: #ff0000; font-weight: bold; } /* Error */ code span.ex { } /* Extension */ code span.fl { color: #40a070; } /* Float */ code span.fu { color: #06287e; } /* Function */ code span.im { } /* Import */ code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */ code span.kw { color: #007020; font-weight: bold; } /* Keyword */ code span.op { color: #666666; } /* Operator */ code span.ot { color: #007020; } /* Other */ code span.pp { color: #bc7a00; } /* Preprocessor */ code span.sc { color: #4070a0; } /* SpecialChar */ code span.ss { color: #bb6688; } /* SpecialString */ code span.st { color: #4070a0; } /* String */ code span.va { color: #19177c; } /* Variable */ code span.vs { color: #4070a0; } /* VerbatimString */ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ </style> </head> <body> <header id="title-block-header"> <h1 class="title">"Netplan reference"</h1> </header> <nav id="TOC" role="doc-toc"> <ul> <li><a href="#top-level-configuration-structure">Top-level configuration structure</a></li> <li><a href="#properties-for-physical-device-types">Properties for physical device types</a></li> <li><a href="#properties-for-all-device-types">Properties for all device types</a></li> <li><a href="#dhcp-overrides">DHCP Overrides</a></li> <li><a href="#routing">Routing</a> <ul> <li><a href="#default-routes">Default routes</a></li> </ul></li> <li><a href="#authentication">Authentication</a></li> <li><a href="#properties-for-device-type-ethernets">Properties for device type <code>ethernets:</code></a></li> <li><a href="#properties-for-device-type-modems">Properties for device type <code>modems:</code></a></li> <li><a href="#properties-for-device-type-wifis">Properties for device type <code>wifis:</code></a></li> <li><a href="#properties-for-device-type-bridges">Properties for device type <code>bridges:</code></a></li> <li><a href="#properties-for-device-type-bonds">Properties for device type <code>bonds:</code></a></li> <li><a href="#properties-for-device-type-tunnels">Properties for device type <code>tunnels:</code></a></li> <li><a href="#properties-for-device-type-vlans">Properties for device type <code>vlans:</code></a></li> <li><a href="#properties-for-device-type-vrfs">Properties for device type <code>vrfs:</code></a></li> <li><a href="#properties-for-device-type-nm-devices">Properties for device type <code>nm-devices:</code></a></li> <li><a href="#backend-specific-configuration-parameters">Backend-specific configuration parameters</a></li> </ul> </nav> <h2 id="top-level-configuration-structure">Top-level configuration structure</h2> <p>The general structure of a Netplan YAML file is shown below.</p> <div class="sourceCode" id="cb1"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb1-2"><a href="#cb1-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">version</span><span class="kw">:</span><span class="at"> NUMBER</span></span> <span id="cb1-3"><a href="#cb1-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">renderer</span><span class="kw">:</span><span class="at"> STRING</span></span> <span id="cb1-4"><a href="#cb1-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">bonds</span><span class="kw">:</span><span class="at"> MAPPING</span></span> <span id="cb1-5"><a href="#cb1-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">bridges</span><span class="kw">:</span><span class="at"> MAPPING</span></span> <span id="cb1-6"><a href="#cb1-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">ethernets</span><span class="kw">:</span><span class="at"> MAPPING</span></span> <span id="cb1-7"><a href="#cb1-7" aria-hidden="true"></a><span class="at"> </span><span class="fu">modems</span><span class="kw">:</span><span class="at"> MAPPING</span></span> <span id="cb1-8"><a href="#cb1-8" aria-hidden="true"></a><span class="at"> </span><span class="fu">tunnels</span><span class="kw">:</span><span class="at"> MAPPING</span></span> <span id="cb1-9"><a href="#cb1-9" aria-hidden="true"></a><span class="at"> </span><span class="fu">vlans</span><span class="kw">:</span><span class="at"> MAPPING</span></span> <span id="cb1-10"><a href="#cb1-10" aria-hidden="true"></a><span class="at"> </span><span class="fu">vrfs</span><span class="kw">:</span><span class="at"> MAPPING</span></span> <span id="cb1-11"><a href="#cb1-11" aria-hidden="true"></a><span class="at"> </span><span class="fu">wifis</span><span class="kw">:</span><span class="at"> MAPPING</span></span> <span id="cb1-12"><a href="#cb1-12" aria-hidden="true"></a><span class="at"> </span><span class="fu">nm-devices</span><span class="kw">:</span><span class="at"> MAPPING</span></span></code></pre></div> <ul> <li><p><strong>version</strong> (number)</p> <blockquote> <p>Defines what version of the configuration format is used. The only value supported is <code>2</code>. Defaults to <code>2</code> if not defined.</p> </blockquote></li> <li><p><strong>renderer</strong> (scalar)</p> <blockquote> <p>Defines what network configuration tool will be used to set up your configuration. Valid values are <code>networkd</code> and <code>NetworkManager</code>. Defaults to <code>networkd</code> if not defined.</p> </blockquote></li> <li><p><a href="#properties-for-device-type-bonds"><strong>bonds</strong></a> (mapping)</p> <blockquote> <p>Creates and configures link aggregation (bonding) devices.</p> </blockquote></li> <li><p><a href="#properties-for-device-type-bridges"><strong>bridges</strong></a> (mapping)</p> <blockquote> <p>Creates and configures bridge devices.</p> </blockquote></li> <li><p><a href="#properties-for-device-type-ethernets"><strong>ethernets</strong></a> (mapping)</p> <blockquote> <p>Configures physical Ethernet interfaces.</p> </blockquote></li> <li><p><a href="#properties-for-device-type-modems"><strong>modems</strong></a> (mapping)</p> <blockquote> <p>Configures modems</p> </blockquote></li> <li><p><a href="#properties-for-device-type-tunnels"><strong>tunnels</strong></a> (mapping)</p> <blockquote> <p>Creates and configures different types of virtual tunnels.</p> </blockquote></li> <li><p><a href="#properties-for-device-type-vlans"><strong>vlans</strong></a> (mapping)</p> <blockquote> <p>Creates and configures VLANs.</p> </blockquote></li> <li><p><a href="#properties-for-device-type-vrfs"><strong>vrfs</strong></a> (mapping)</p> <blockquote> <p>Configures Virtual Routing and Forwarding (VRF) devices.</p> </blockquote></li> <li><p><a href="#properties-for-device-type-wifis"><strong>wifis</strong></a> (mapping)</p> <blockquote> <p>Configures physical Wifi interfaces as client, adhoc or access point.</p> </blockquote></li> <li><p><a href="#properties-for-device-type-nm-devices"><strong>nm-devices</strong></a> (mapping)</p> <blockquote> <p><code>nm-devices</code> are used in situations where Netplan doesn’t support the connection type. The raw configuration expected by NetworkManager can be defined and will be passed as is (passthrough) to the <code>.nmconnection</code> file. Users will not normally use this type of device.</p> </blockquote></li> </ul> <p>All the properties for all the device types will be described in the next sections.</p> <h2 id="properties-for-physical-device-types">Properties for physical device types</h2> <p>These properties are used with physical devices such as Ethernet and Wifi network interfaces.</p> <p><strong>Note:</strong> Some options will not work reliably for devices matched by name only and rendered by networkd, due to interactions with device renaming in udev. Match devices by MAC when setting options like: <code>wakeonlan</code> or <code>*-offload</code>.</p> <ul> <li><p><strong>match</strong> (mapping)</p> <blockquote> <p>This selects a subset of available physical devices by various hardware properties. The following configuration will then apply to all matching devices, as soon as they appear. <em>All</em> specified properties must match.</p> </blockquote> <ul> <li><p><strong>name</strong> (scalar)</p> <blockquote> <p>Current interface name. Globs are supported, and the primary use case for matching on names, as selecting one fixed name can be more easily achieved with having no <code>match:</code> at all and just using the ID (see above). (<code>NetworkManager</code>: as of v1.14.0)</p> </blockquote></li> <li><p><strong>macaddress</strong> (scalar)</p> <blockquote> <p>Device’s 6-byte permanent MAC address in the form “XX:XX:XX:XX:XX:XX” or 20 bytes for InfiniBand devices (IPoIB). Globs are not allowed. This doesn’t match virtual MAC addresses for veth, bridge, bond, vlan, …</p> </blockquote></li> <li><p><strong>driver</strong> (scalar or sequence of scalars) – sequence since <strong>0.104</strong></p> <blockquote> <p>Kernel driver name, corresponding to the <code>DRIVER</code> udev property. A sequence of globs is supported, any of which must match. Matching on driver is <em>only</em> supported with networkd.</p> </blockquote></li> </ul> <p>Examples:</p> <ul> <li><p>All cards on second PCI bus:</p> <div class="sourceCode" id="cb2"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb2-2"><a href="#cb2-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">ethernets</span><span class="kw">:</span></span> <span id="cb2-3"><a href="#cb2-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">myinterface</span><span class="kw">:</span></span> <span id="cb2-4"><a href="#cb2-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">match</span><span class="kw">:</span></span> <span id="cb2-5"><a href="#cb2-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">name</span><span class="kw">:</span><span class="at"> enp2*</span></span></code></pre></div></li> <li><p>Fixed MAC address:</p> <div class="sourceCode" id="cb3"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb3-2"><a href="#cb3-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">ethernets</span><span class="kw">:</span></span> <span id="cb3-3"><a href="#cb3-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">interface0</span><span class="kw">:</span></span> <span id="cb3-4"><a href="#cb3-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">match</span><span class="kw">:</span></span> <span id="cb3-5"><a href="#cb3-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">macaddress</span><span class="kw">:</span><span class="at"> 11:22:33:AA:BB:FF</span></span></code></pre></div></li> <li><p>First card of driver <code>ixgbe</code>:</p> <div class="sourceCode" id="cb4"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb4-2"><a href="#cb4-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">ethernets</span><span class="kw">:</span></span> <span id="cb4-3"><a href="#cb4-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">nic0</span><span class="kw">:</span></span> <span id="cb4-4"><a href="#cb4-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">match</span><span class="kw">:</span></span> <span id="cb4-5"><a href="#cb4-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">driver</span><span class="kw">:</span><span class="at"> ixgbe</span></span> <span id="cb4-6"><a href="#cb4-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">name</span><span class="kw">:</span><span class="at"> en*s0</span></span></code></pre></div></li> <li><p>First card with a driver matching <code>bcmgenet</code> or <code>smsc*</code>:</p> <div class="sourceCode" id="cb5"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb5-2"><a href="#cb5-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">ethernets</span><span class="kw">:</span></span> <span id="cb5-3"><a href="#cb5-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">nic0</span><span class="kw">:</span></span> <span id="cb5-4"><a href="#cb5-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">match</span><span class="kw">:</span></span> <span id="cb5-5"><a href="#cb5-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">driver</span><span class="kw">:</span><span class="at"> </span><span class="kw">[</span><span class="st">"bcmgenet"</span><span class="kw">,</span><span class="at"> </span><span class="st">"smsc*"</span><span class="kw">]</span></span> <span id="cb5-6"><a href="#cb5-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">name</span><span class="kw">:</span><span class="at"> en*</span></span></code></pre></div></li> </ul></li> <li><p><strong>set-name</strong> (scalar)</p> <blockquote> <p>When matching on unique properties such as path or MAC, or with additional assumptions such as “there will only ever be one wifi device”, match rules can be written so that they only match one device. Then this property can be used to give that device a more specific/desirable/nicer name than the default from udev’s ifnames. Any additional device that satisfies the match rules will then fail to get renamed and keep the original kernel name (and dmesg will show an error).</p> </blockquote></li> <li><p><strong>wakeonlan</strong> (bool)</p> <blockquote> <p>Enable wake on LAN. Off by default.</p> </blockquote></li> <li><p><strong>emit-lldp</strong> (bool) – since <strong>0.99</strong></p> <blockquote> <p>(networkd backend only) Whether to emit LLDP packets. Off by default.</p> </blockquote></li> <li><p><strong>receive-checksum-offload</strong> (bool) – since <strong>0.104</strong></p> <blockquote> <p>(networkd backend only) If set to true (false), the hardware offload for checksumming of ingress network packets is enabled (disabled). When unset, the kernel’s default will be used.</p> </blockquote></li> <li><p><strong>transmit-checksum-offload</strong> (bool) – since <strong>0.104</strong></p> <blockquote> <p>(networkd backend only) If set to true (false), the hardware offload for checksumming of egress network packets is enabled (disabled). When unset, the kernel’s default will be used.</p> </blockquote></li> <li><p><strong>tcp-segmentation-offload</strong> (bool) – since <strong>0.104</strong></p> <blockquote> <p>(networkd backend only) If set to true (false), the TCP Segmentation Offload (TSO) is enabled (disabled). When unset, the kernel’s default will be used.</p> </blockquote></li> <li><p><strong>tcp6-segmentation-offload</strong> (bool) – since <strong>0.104</strong></p> <blockquote> <p>(networkd backend only) If set to true (false), the TCP6 Segmentation Offload (tx-tcp6-segmentation) is enabled (disabled). When unset, the kernel’s default will be used.</p> </blockquote></li> <li><p><strong>generic-segmentation-offload</strong> (bool) – since <strong>0.104</strong></p> <blockquote> <p>(networkd backend only) If set to true (false), the Generic Segmentation Offload (GSO) is enabled (disabled). When unset, the kernel’s default will be used.</p> </blockquote></li> <li><p><strong>generic-receive-offload</strong> (bool) – since <strong>0.104</strong></p> <blockquote> <p>(networkd backend only) If set to true (false), the Generic Receive Offload (GRO) is enabled (disabled). When unset, the kernel’s default will be used.</p> </blockquote></li> <li><p><strong>large-receive-offload</strong> (bool) – since <strong>0.104</strong></p> <blockquote> <p>(networkd backend only) If set to true (false), the Large Receive Offload (LRO) is enabled (disabled). When unset, the kernel’s default will be used.</p> </blockquote></li> <li><p><strong>openvswitch</strong> (mapping) – since <strong>0.100</strong></p> <blockquote> <p>This provides additional configuration for the openvswitch network device. If Open vSwitch is not available on the system, netplan treats the presence of <code>openvswitch</code> configuration as an error.</p> <p>Any supported network device that is declared with the <code>openvswitch</code> mapping (or any bond/bridge that includes an interface with an openvswitch configuration) will be created in openvswitch instead of the defined renderer. In the case of a <code>vlan</code> definition declared the same way, netplan will create a fake VLAN bridge in openvswitch with the requested <code>vlan</code> properties.</p> </blockquote> <ul> <li><p><strong>external-ids</strong> (mapping) – since <strong>0.100</strong></p> <blockquote> <p>Passed-through directly to Open vSwitch</p> </blockquote></li> <li><p><strong>other-config</strong> (mapping) – since <strong>0.100</strong></p> <blockquote> <p>Passed-through directly to Open vSwitch</p> </blockquote></li> <li><p><strong>lacp</strong> (scalar) – since <strong>0.100</strong></p> <blockquote> <p>Valid for bond interfaces. Accepts <code>active</code>, <code>passive</code> or <code>off</code> (the default).</p> </blockquote></li> <li><p><strong>fail-mode</strong> (scalar) – since <strong>0.100</strong></p> <blockquote> <p>Valid for bridge interfaces. Accepts <code>secure</code> or <code>standalone</code> (the default).</p> </blockquote></li> <li><p><strong>mcast-snooping</strong> (bool) – since <strong>0.100</strong></p> <blockquote> <p>Valid for bridge interfaces. False by default.</p> </blockquote></li> <li><p><strong>protocols</strong> (sequence of scalars) – since <strong>0.100</strong></p> <blockquote> <p>Valid for bridge interfaces or the network section. List of protocols to be used when negotiating a connection with the controller. Accepts <code>OpenFlow10</code>, <code>OpenFlow11</code>, <code>OpenFlow12</code>, <code>OpenFlow13</code>, <code>OpenFlow14</code>, and <code>OpenFlow15</code>.</p> </blockquote></li> <li><p><strong>rstp</strong> (bool) – since <strong>0.100</strong></p> <blockquote> <p>Valid for bridge interfaces. False by default.</p> </blockquote></li> <li><p><strong>controller</strong> (mapping) – since <strong>0.100</strong></p> <blockquote> <p>Valid for bridge interfaces. Specify an external OpenFlow controller.</p> </blockquote> <ul> <li><p><strong>addresses</strong> (sequence of scalars)</p> <blockquote> <p>Set the list of addresses to use for the controller targets. The syntax of these addresses is as defined in ovs-vsctl(8). Example: addresses: <code>[tcp:127.0.0.1:6653, "ssl:[fe80::1234%eth0]:6653"]</code></p> </blockquote></li> <li><p><strong>connection-mode</strong> (scalar)</p> <blockquote> <p>Set the connection mode for the controller. Supported options are <code>in-band</code> and <code>out-of-band</code>. The default is <code>in-band</code>.</p> </blockquote></li> </ul></li> <li><p><strong>ports</strong> (sequence of sequence of scalars) – since <strong>0.100</strong></p> <blockquote> <p>Open vSwitch patch ports. Each port is declared as a pair of names which can be referenced as interfaces in dependent virtual devices (bonds, bridges).</p> </blockquote> <p>Example:</p> <div class="sourceCode" id="cb6"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true"></a><span class="fu">openvswitch</span><span class="kw">:</span></span> <span id="cb6-2"><a href="#cb6-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">ports</span><span class="kw">:</span></span> <span id="cb6-3"><a href="#cb6-3" aria-hidden="true"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="kw">[</span><span class="at">patch0</span><span class="dv">-1</span><span class="kw">,</span><span class="at"> patch1-</span><span class="dv">0</span><span class="kw">]</span></span></code></pre></div></li> <li><p><strong>ssl</strong> (mapping) – since <strong>0.100</strong></p> <blockquote> <p>Valid for global <code>openvswitch</code> settings. Options for configuring SSL server endpoint for the switch.</p> </blockquote> <ul> <li><p><strong>ca-cert</strong> (scalar)</p> <blockquote> <p>Path to a file containing the CA certificate to be used.</p> </blockquote></li> <li><p><strong>certificate</strong> (scalar)</p> <blockquote> <p>Path to a file containing the server certificate.</p> </blockquote></li> <li><p><strong>private-key</strong> (scalar)</p> <blockquote> <p>Path to a file containing the private key for the server.</p> </blockquote></li> </ul></li> </ul></li> </ul> <h2 id="properties-for-all-device-types">Properties for all device types</h2> <ul> <li><p><strong>renderer</strong> (scalar)</p> <blockquote> <p>Use the given networking backend for this definition. Currently supported are <code>networkd</code> and <code>NetworkManager</code>. This property can be specified globally in <code>network:</code>, for a device type (in e. g. <code>ethernets:</code>) or for a particular device definition. Default is <code>networkd</code>.</p> <p>(Since 0.99) The <code>renderer</code> property has one additional acceptable value for vlan objects (i. e. defined in <code>vlans:</code>): <code>sriov</code>. If a vlan is defined with the <code>sriov</code> renderer for an SR-IOV Virtual Function interface, this causes netplan to set up a hardware VLAN filter for it. There can be only one defined per VF.</p> </blockquote></li> <li><p><strong>dhcp4</strong> (bool)</p> <blockquote> <p>Enable DHCP for IPv4. Off by default.</p> </blockquote></li> <li><p><strong>dhcp6</strong> (bool)</p> <blockquote> <p>Enable DHCP for IPv6. Off by default. This covers both stateless DHCP - where the DHCP server supplies information like DNS nameservers but not the IP address - and stateful DHCP, where the server provides both the address and the other information.</p> <p>If you are in an IPv6-only environment with completely stateless auto-configuration (SLAAC with RDNSS), this option can be set to cause the interface to be brought up. (Setting accept-ra alone is not sufficient.) Auto-configuration will still honor the contents of the router advertisement and only use DHCP if requested in the RA.</p> <p>Note that <strong><code>rdnssd</code></strong>(8) is required to use RDNSS with networkd. No extra software is required for NetworkManager.</p> </blockquote></li> <li><p><strong>ipv6-mtu</strong> (scalar) – since <strong>0.98</strong> > Set the IPv6 MTU (only supported with <code>networkd</code> backend). Note > that needing to set this is an unusual requirement. > > <strong>Requires feature: ipv6-mtu</strong></p></li> <li><p><strong>ipv6-privacy</strong> (bool)</p> <blockquote> <p>Enable IPv6 Privacy Extensions (RFC 4941) for the specified interface, and prefer temporary addresses. Defaults to false - no privacy extensions. There is currently no way to have a private address but prefer the public address.</p> </blockquote></li> <li><p><strong>link-local</strong> (sequence of scalars)</p> <blockquote> <p>Configure the link-local addresses to bring up. Valid options are ‘ipv4’ and ‘ipv6’, which respectively allow enabling IPv4 and IPv6 link local addressing. If this field is not defined, the default is to enable only IPv6 link-local addresses. If the field is defined but configured as an empty set, IPv6 link-local addresses are disabled as well as IPv4 link- local addresses.</p> <p>This feature enables or disables link-local addresses for a protocol, but the actual implementation differs per backend. On networkd, this directly changes the behavior and may add an extra address on an interface. When using the NetworkManager backend, enabling link-local has no effect if the interface also has DHCP enabled.</p> </blockquote> <p>Examples:</p> <ul> <li>Enable only IPv4 link-local: <code>link-local: [ ipv4 ]</code></li> <li>Enable all link-local addresses: <code>link-local: [ ipv4, ipv6 ]</code></li> <li>Disable all link-local addresses: <code>link-local: [ ]</code></li> </ul></li> <li><p><strong>ignore-carrier</strong> (bool) – since <strong>0.104</strong></p> <blockquote> <p>(networkd backend only) Allow the specified interface to be configured even if it has no carrier.</p> </blockquote></li> <li><p><strong>critical</strong> (bool)</p> <blockquote> <p>Designate the connection as “critical to the system”, meaning that special care will be taken by to not release the assigned IP when the daemon is restarted. (not recognized by NetworkManager)</p> </blockquote></li> <li><p><strong>dhcp-identifier</strong> (scalar)</p> <blockquote> <p>(networkd backend only) Sets the source of DHCPv4 client identifier. If <code>mac</code> is specified, the MAC address of the link is used. If this option is omitted, or if <code>duid</code> is specified, networkd will generate an RFC4361-compliant client identifier for the interface by combining the link’s IAID and DUID.</p> </blockquote></li> <li><p><strong>dhcp4-overrides</strong> (mapping)</p> <blockquote> <p>(networkd backend only) Overrides default DHCP behavior; see the <code>DHCP Overrides</code> section below.</p> </blockquote></li> <li><p><strong>dhcp6-overrides</strong> (mapping)</p> <blockquote> <p>(networkd backend only) Overrides default DHCP behavior; see the <code>DHCP Overrides</code> section below.</p> </blockquote></li> <li><p><strong>accept-ra</strong> (bool)</p> <blockquote> <p>Accept Router Advertisement that would have the kernel configure IPv6 by itself. When enabled, accept Router Advertisements. When disabled, do not respond to Router Advertisements. If unset use the host kernel default setting.</p> </blockquote></li> <li><p><strong>addresses</strong> (sequence of scalars and mappings)</p> <blockquote> <p>Add static addresses to the interface in addition to the ones received through DHCP or RA. Each sequence entry is in CIDR notation, i. e. of the form <code>addr/prefixlen</code>. <code>addr</code> is an IPv4 or IPv6 address as recognized by <strong><code>inet_pton</code></strong>(3) and <code>prefixlen</code> the number of bits of the subnet.</p> <p>For virtual devices (bridges, bonds, vlan) if there is no address configured and DHCP is disabled, the interface may still be brought online, but will not be addressable from the network.</p> <p>In addition to the addresses themselves one can specify configuration parameters as mappings. Current supported options are:</p> </blockquote> <ul> <li><p><strong>lifetime</strong> (scalar) – since <strong>0.100</strong></p> <blockquote> <p>Default: <code>forever</code>. This can be <code>forever</code> or <code>0</code> and corresponds to the <code>PreferredLifetime</code> option in <code>systemd-networkd</code>’s Address section. Currently supported on the <code>networkd</code> backend only.</p> </blockquote></li> <li><p><strong>label</strong> (scalar) – since <strong>0.100</strong></p> <blockquote> <p>An IP address label, equivalent to the <code>ip address label</code> command. Currently supported on the <code>networkd</code> backend only.</p> </blockquote></li> </ul> <p>Examples:</p> <ul> <li><p>Simple: <code>addresses: [192.168.14.2/24, "2001:1::1/64"]</code></p></li> <li><p>Advanced:</p> <div class="sourceCode" id="cb7"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb7-2"><a href="#cb7-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">ethernets</span><span class="kw">:</span></span> <span id="cb7-3"><a href="#cb7-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">eth0</span><span class="kw">:</span></span> <span id="cb7-4"><a href="#cb7-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">addresses</span><span class="kw">:</span></span> <span id="cb7-5"><a href="#cb7-5" aria-hidden="true"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="st">"10.0.0.15/24"</span><span class="kw">:</span></span> <span id="cb7-6"><a href="#cb7-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">lifetime</span><span class="kw">:</span><span class="at"> </span><span class="dv">0</span></span> <span id="cb7-7"><a href="#cb7-7" aria-hidden="true"></a><span class="at"> </span><span class="fu">label</span><span class="kw">:</span><span class="at"> </span><span class="st">"maas"</span></span> <span id="cb7-8"><a href="#cb7-8" aria-hidden="true"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="st">"2001:1::1/64"</span></span></code></pre></div></li> </ul></li> <li><p><strong>ipv6-address-generation</strong> (scalar) – since <strong>0.99</strong></p> <blockquote> <p>Configure method for creating the address for use with RFC4862 IPv6 Stateless Address Auto-configuration (only supported with <code>NetworkManager</code> backend). Possible values are <code>eui64</code> or <code>stable-privacy</code>.</p> </blockquote></li> <li><p><strong>ipv6-address-token</strong> (scalar) – since <strong>0.100</strong></p> <blockquote> <p>Define an IPv6 address token for creating a static interface identifier for IPv6 Stateless Address Auto-configuration. This is mutually exclusive with <code>ipv6-address-generation</code>.</p> </blockquote></li> <li><p><strong>gateway4</strong>, <strong>gateway6</strong> (scalar)</p> <blockquote> <p>Deprecated, see <code>Default routes</code>. Set default gateway for IPv4/6, for manual address configuration. This requires setting <code>addresses</code> too. Gateway IPs must be in a form recognized by <strong><code>inet_pton</code></strong>(3). There should only be a single gateway per IP address family set in your global config, to make it unambiguous. If you need multiple default routes, please define them via <code>routing-policy</code>.</p> </blockquote> <p>Examples</p> <ul> <li>IPv4: <code>gateway4: 172.16.0.1</code></li> <li>IPv6: <code>gateway6: "2001:4::1"</code></li> </ul></li> <li><p><strong>nameservers</strong> (mapping)</p> <blockquote> <p>Set DNS servers and search domains, for manual address configuration. There are two supported fields: <code>addresses:</code> is a list of IPv4 or IPv6 addresses similar to <code>gateway*</code>, and <code>search:</code> is a list of search domains.</p> </blockquote> <p>Example:</p> <div class="sourceCode" id="cb8"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb8-2"><a href="#cb8-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">ethernets</span><span class="kw">:</span></span> <span id="cb8-3"><a href="#cb8-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">id0</span><span class="kw">:</span></span> <span id="cb8-4"><a href="#cb8-4" aria-hidden="true"></a><span class="at"> </span><span class="kw">[</span><span class="at">...</span><span class="kw">]</span></span> <span id="cb8-5"><a href="#cb8-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">nameservers</span><span class="kw">:</span></span> <span id="cb8-6"><a href="#cb8-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">search</span><span class="kw">:</span><span class="at"> </span><span class="kw">[</span><span class="at">lab</span><span class="kw">,</span><span class="at"> home</span><span class="kw">]</span></span> <span id="cb8-7"><a href="#cb8-7" aria-hidden="true"></a><span class="at"> </span><span class="fu">addresses</span><span class="kw">:</span><span class="at"> </span><span class="kw">[</span><span class="fl">8.8.8.8</span><span class="kw">,</span><span class="at"> </span><span class="st">"FEDC::1"</span><span class="kw">]</span></span></code></pre></div></li> <li><p><strong>macaddress</strong> (scalar)</p> <blockquote> <p>Set the device’s MAC address. The MAC address must be in the form “XX:XX:XX:XX:XX:XX”.</p> <p><strong>Note:</strong> This will not work reliably for devices matched by name only and rendered by networkd, due to interactions with device renaming in udev. Match devices by MAC when setting MAC addresses.</p> </blockquote> <p>Example:</p> <div class="sourceCode" id="cb9"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb9-2"><a href="#cb9-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">ethernets</span><span class="kw">:</span></span> <span id="cb9-3"><a href="#cb9-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">id0</span><span class="kw">:</span></span> <span id="cb9-4"><a href="#cb9-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">match</span><span class="kw">:</span></span> <span id="cb9-5"><a href="#cb9-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">macaddress</span><span class="kw">:</span><span class="at"> 52:54:00:6b:3c:58</span></span> <span id="cb9-6"><a href="#cb9-6" aria-hidden="true"></a><span class="at"> </span><span class="kw">[</span><span class="at">...</span><span class="kw">]</span></span> <span id="cb9-7"><a href="#cb9-7" aria-hidden="true"></a><span class="at"> </span><span class="fu">macaddress</span><span class="kw">:</span><span class="at"> 52:54:00:6b:3c:59</span></span></code></pre></div></li> <li><p><strong>mtu</strong> (scalar)</p> <blockquote> <p>Set the Maximum Transmission Unit for the interface. The default is 1500. Valid values depend on your network interface.</p> <p><strong>Note:</strong> This will not work reliably for devices matched by name only and rendered by networkd, due to interactions with device renaming in udev. Match devices by MAC when setting MTU.</p> </blockquote></li> <li><p><strong>optional</strong> (bool)</p> <blockquote> <p>An optional device is not required for booting. Normally, networkd will wait some time for device to become configured before proceeding with booting. However, if a device is marked as optional, networkd will not wait for it. This is <em>only</em> supported by networkd, and the default is false.</p> </blockquote> <p>Example:</p> <div class="sourceCode" id="cb10"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb10-2"><a href="#cb10-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">ethernets</span><span class="kw">:</span></span> <span id="cb10-3"><a href="#cb10-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">eth7</span><span class="kw">:</span></span> <span id="cb10-4"><a href="#cb10-4" aria-hidden="true"></a><span class="co"> # this is plugged into a test network that is often</span></span> <span id="cb10-5"><a href="#cb10-5" aria-hidden="true"></a><span class="co"> # down - don't wait for it to come up during boot.</span></span> <span id="cb10-6"><a href="#cb10-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">dhcp4</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span> <span id="cb10-7"><a href="#cb10-7" aria-hidden="true"></a><span class="at"> </span><span class="fu">optional</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span></code></pre></div></li> <li><p><strong>optional-addresses</strong> (sequence of scalars)</p> <blockquote> <p>Specify types of addresses that are not required for a device to be considered online. This changes the behavior of backends at boot time to avoid waiting for addresses that are marked optional, and thus consider the interface as “usable” sooner. This does not disable these addresses, which will be brought up anyway.</p> </blockquote> <p>Example:</p> <div class="sourceCode" id="cb11"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb11-2"><a href="#cb11-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">ethernets</span><span class="kw">:</span></span> <span id="cb11-3"><a href="#cb11-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">eth7</span><span class="kw">:</span></span> <span id="cb11-4"><a href="#cb11-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">dhcp4</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span> <span id="cb11-5"><a href="#cb11-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">dhcp6</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span> <span id="cb11-6"><a href="#cb11-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">optional-addresses</span><span class="kw">:</span><span class="at"> </span><span class="kw">[</span><span class="at"> ipv4-ll</span><span class="kw">,</span><span class="at"> dhcp6 </span><span class="kw">]</span></span></code></pre></div></li> <li><p><strong>activation-mode</strong> (scalar) – since <strong>0.103</strong></p> <blockquote> <p>Allows specifying the management policy of the selected interface. By default, netplan brings up any configured interface if possible. Using the <code>activation-mode</code> setting users can override that behavior by either specifying <code>manual</code>, to hand over control over the interface state to the administrator or (for networkd backend <em>only</em>) <code>off</code> to force the link in a down state at all times. Any interface with <code>activation-mode</code> defined is implicitly considered <code>optional</code>. Supported officially as of <code>networkd</code> v248+.</p> </blockquote> <p>Example:</p> <div class="sourceCode" id="cb12"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb12-2"><a href="#cb12-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">ethernets</span><span class="kw">:</span></span> <span id="cb12-3"><a href="#cb12-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">eth1</span><span class="kw">:</span></span> <span id="cb12-4"><a href="#cb12-4" aria-hidden="true"></a><span class="co"> # this interface will not be put into an UP state automatically</span></span> <span id="cb12-5"><a href="#cb12-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">dhcp4</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span> <span id="cb12-6"><a href="#cb12-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">activation-mode</span><span class="kw">:</span><span class="at"> manual</span></span></code></pre></div></li> <li><p><strong>routes</strong> (sequence of mappings)</p> <blockquote> <p>Configure static routing for the device; see the <code>Routing</code> section below.</p> </blockquote></li> <li><p><strong>routing-policy</strong> (sequence of mappings)</p> <blockquote> <p>Configure policy routing for the device; see the <code>Routing</code> section below.</p> </blockquote></li> <li><p><strong>neigh-suppress</strong> (scalar) – since <strong>0.105</strong></p> <blockquote> <p>Takes a boolean. Configures whether ARP and ND neighbor suppression is enabled for this port. When unset, the kernel’s default will be used.</p> </blockquote></li> </ul> <h2 id="dhcp-overrides">DHCP Overrides</h2> <p>Several DHCP behavior overrides are available. Most currently only have any effect when using the <code>networkd</code> backend, with the exception of <code>use-routes</code> and <code>route-metric</code>.</p> <p>Overrides only have an effect if the corresponding <code>dhcp4</code> or <code>dhcp6</code> is set to <code>true</code>.</p> <p>If both <code>dhcp4</code> and <code>dhcp6</code> are <code>true</code>, the <code>networkd</code> backend requires that <code>dhcp4-overrides</code> and <code>dhcp6-overrides</code> contain the same keys and values. If the values do not match, an error will be shown and the network configuration will not be applied.</p> <p>When using the NetworkManager backend, different values may be specified for <code>dhcp4-overrides</code> and <code>dhcp6-overrides</code>, and will be applied to the DHCP client processes as specified in the netplan YAML.</p> <ul> <li><p><strong>dhcp4-overrides</strong>, <strong>dhcp6-overrides</strong> (mapping)</p> <blockquote> <p>The <code>dhcp4-overrides</code> and `dhcp6-override`` mappings override the default DHCP behavior.</p> </blockquote> <ul> <li><p><strong>use-dns</strong> (bool)</p> <blockquote> <p>Default: <code>true</code>. When <code>true</code>, the DNS servers received from the DHCP server will be used and take precedence over any statically configured ones. Currently only has an effect on the <code>networkd</code> backend.</p> </blockquote></li> <li><p><strong>use-ntp</strong> (bool)</p> <blockquote> <p>Default: <code>true</code>. When <code>true</code>, the NTP servers received from the DHCP server will be used by systemd-timesyncd and take precedence over any statically configured ones. Currently only has an effect on the <code>networkd</code> backend.</p> </blockquote></li> <li><p><strong>send-hostname</strong> (bool)</p> <blockquote> <p>Default: <code>true</code>. When <code>true</code>, the machine’s hostname will be sent to the DHCP server. Currently only has an effect on the <code>networkd</code> backend.</p> </blockquote></li> <li><p><strong>use-hostname</strong> (bool)</p> <blockquote> <p>Default: <code>true</code>. When <code>true</code>, the hostname received from the DHCP server will be set as the transient hostname of the system. Currently only has an effect on the <code>networkd</code> backend.</p> </blockquote></li> <li><p><strong>use-mtu</strong> (bool)</p> <blockquote> <p>Default: <code>true</code>. When <code>true</code>, the MTU received from the DHCP server will be set as the MTU of the network interface. When <code>false</code>, the MTU advertised by the DHCP server will be ignored. Currently only has an effect on the <code>networkd</code> backend.</p> </blockquote></li> <li><p><strong>hostname</strong> (scalar)</p> <blockquote> <p>Use this value for the hostname which is sent to the DHCP server, instead of machine’s hostname. Currently only has an effect on the <code>networkd</code> backend.</p> </blockquote></li> <li><p><strong>use-routes</strong> (bool)</p> <blockquote> <p>Default: <code>true</code>. When <code>true</code>, the routes received from the DHCP server will be installed in the routing table normally. When set to <code>false</code>, routes from the DHCP server will be ignored: in this case, the user is responsible for adding static routes if necessary for correct network operation. This allows users to avoid installing a default gateway for interfaces configured via DHCP. Available for both the <code>networkd</code> and <code>NetworkManager</code> backends.</p> </blockquote></li> <li><p><strong>route-metric</strong> (scalar)</p> <blockquote> <p>Use this value for default metric for automatically-added routes. Use this to prioritize routes for devices by setting a lower metric on a preferred interface. Available for both the <code>networkd</code> and <code>NetworkManager</code> backends.</p> </blockquote></li> <li><p><strong>use-domains</strong> (scalar) – since <strong>0.98</strong></p> <blockquote> <p>Takes a boolean, or the special value “route”. When true, the domain name received from the DHCP server will be used as DNS search domain over this link, similar to the effect of the Domains= setting. If set to “route”, the domain name received from the DHCP server will be used for routing DNS queries only, but not for searching, similar to the effect of the Domains= setting when the argument is prefixed with “~”.</p> <p><strong>Requires feature: dhcp-use-domains</strong></p> </blockquote></li> </ul></li> </ul> <h2 id="routing">Routing</h2> <p>Complex routing is possible with netplan. Standard static routes as well as policy routing using routing tables are supported via the <code>networkd</code> backend.</p> <p>These options are available for all types of interfaces.</p> <h3 id="default-routes">Default routes</h3> <p>The most common need for routing concerns the definition of default routes to reach the wider Internet. Those default routes can only defined once per IP family and routing table. A typical example would look like the following:</p> <div class="sourceCode" id="cb13"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb13-2"><a href="#cb13-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">ethernets</span><span class="kw">:</span></span> <span id="cb13-3"><a href="#cb13-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">eth0</span><span class="kw">:</span></span> <span id="cb13-4"><a href="#cb13-4" aria-hidden="true"></a><span class="at"> </span><span class="kw">[</span><span class="at">...</span><span class="kw">]</span></span> <span id="cb13-5"><a href="#cb13-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">routes</span><span class="kw">:</span></span> <span id="cb13-6"><a href="#cb13-6" aria-hidden="true"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">to</span><span class="kw">:</span><span class="at"> default</span><span class="co"> # could be 0.0.0.0/0 optionally</span></span> <span id="cb13-7"><a href="#cb13-7" aria-hidden="true"></a><span class="at"> </span><span class="fu">via</span><span class="kw">:</span><span class="at"> </span><span class="fl">10.0.0.1</span></span> <span id="cb13-8"><a href="#cb13-8" aria-hidden="true"></a><span class="at"> </span><span class="fu">metric</span><span class="kw">:</span><span class="at"> </span><span class="dv">100</span></span> <span id="cb13-9"><a href="#cb13-9" aria-hidden="true"></a><span class="at"> </span><span class="fu">on-link</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span> <span id="cb13-10"><a href="#cb13-10" aria-hidden="true"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">to</span><span class="kw">:</span><span class="at"> default</span><span class="co"> # could be ::/0 optionally</span></span> <span id="cb13-11"><a href="#cb13-11" aria-hidden="true"></a><span class="at"> </span><span class="fu">via</span><span class="kw">:</span><span class="at"> cf02:de:ad:be:ef::2</span></span> <span id="cb13-12"><a href="#cb13-12" aria-hidden="true"></a><span class="at"> </span><span class="fu">eth1</span><span class="kw">:</span></span> <span id="cb13-13"><a href="#cb13-13" aria-hidden="true"></a><span class="at"> </span><span class="kw">[</span><span class="at">...</span><span class="kw">]</span></span> <span id="cb13-14"><a href="#cb13-14" aria-hidden="true"></a><span class="at"> </span><span class="fu">routes</span><span class="kw">:</span></span> <span id="cb13-15"><a href="#cb13-15" aria-hidden="true"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">to</span><span class="kw">:</span><span class="at"> default</span></span> <span id="cb13-16"><a href="#cb13-16" aria-hidden="true"></a><span class="at"> </span><span class="fu">via</span><span class="kw">:</span><span class="at"> </span><span class="fl">172.134.67.1</span></span> <span id="cb13-17"><a href="#cb13-17" aria-hidden="true"></a><span class="at"> </span><span class="fu">metric</span><span class="kw">:</span><span class="at"> </span><span class="dv">100</span></span> <span id="cb13-18"><a href="#cb13-18" aria-hidden="true"></a><span class="at"> </span><span class="fu">on-link</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span> <span id="cb13-19"><a href="#cb13-19" aria-hidden="true"></a><span class="co"> # Not on the main routing table,</span></span> <span id="cb13-20"><a href="#cb13-20" aria-hidden="true"></a><span class="co"> # does not conflict with the eth0 default route</span></span> <span id="cb13-21"><a href="#cb13-21" aria-hidden="true"></a><span class="at"> </span><span class="fu">table</span><span class="kw">:</span><span class="at"> </span><span class="dv">76</span></span></code></pre></div> <ul> <li><p><strong>routes</strong> (mapping)</p> <blockquote> <p>The <code>routes</code> block defines standard static routes for an interface. At least <code>to</code> must be specified. If type is <code>local</code> or <code>nat</code> a default scope of <code>host</code> is assumed. If type is <code>unicast</code> and no gateway (<code>via</code>) is given or type is <code>broadcast</code>, <code>multicast</code> or <code>anycast</code> a default scope of <code>link</code> is assumed. Otherwise, a <code>global</code> scope is the default setting.</p> <p>For <code>from</code>, <code>to</code>, and <code>via</code>, both IPv4 and IPv6 addresses are recognized, and must be in the form <code>addr/prefixlen</code> or <code>addr</code>.</p> </blockquote> <ul> <li><p><strong>from</strong> (scalar)</p> <blockquote> <p>Set a source IP address for traffic going through the route. (<code>NetworkManager</code>: as of v1.8.0)</p> </blockquote></li> <li><p><strong>to</strong> (scalar)</p> <blockquote> <p>Destination address for the route.</p> </blockquote></li> <li><p><strong>via</strong> (scalar)</p> <blockquote> <p>Address to the gateway to use for this route.</p> </blockquote></li> <li><p><strong>on-link</strong> (bool)</p> <blockquote> <p>When set to “true”, specifies that the route is directly connected to the interface. (<code>NetworkManager</code>: as of v1.12.0 for IPv4 and v1.18.0 for IPv6)</p> </blockquote></li> <li><p><strong>metric</strong> (scalar)</p> <blockquote> <p>The relative priority of the route. Must be a positive integer value.</p> </blockquote></li> <li><p><strong>type</strong> (scalar)</p> <blockquote> <p>The type of route. Valid options are “unicast” (default), “anycast”, “blackhole”, “broadcast”, “local”, “multicast”, “nat”, “prohibit”, “throw”, “unreachable” or “xresolve”.</p> </blockquote></li> <li><p><strong>scope</strong> (scalar)</p> <blockquote> <p>The route scope, how wide-ranging it is to the network. Possible values are “global”, “link”, or “host”. Applies to IPv4 only.</p> </blockquote></li> <li><p><strong>table</strong> (scalar)</p> <blockquote> <p>The table number to use for the route. In some scenarios, it may be useful to set routes in a separate routing table. It may also be used to refer to routing policy rules which also accept a <code>table</code> parameter. Allowed values are positive integers starting from 1. Some values are already in use to refer to specific routing tables: see <code>/etc/iproute2/rt_tables</code>. (<code>NetworkManager</code>: as of v1.10.0)</p> </blockquote></li> <li><p><strong>mtu</strong> (scalar) – since <strong>0.101</strong></p> <blockquote> <p>The MTU to be used for the route, in bytes. Must be a positive integer value.</p> </blockquote></li> <li><p><strong>congestion-window</strong> (scalar) – since <strong>0.102</strong></p> <blockquote> <p>The congestion window to be used for the route, represented by number of segments. Must be a positive integer value.</p> </blockquote></li> <li><p><strong>advertised-receive-window</strong> (scalar) – since <strong>0.102</strong></p> <blockquote> <p>The receive window to be advertised for the route, represented by number of segments. Must be a positive integer value.</p> </blockquote></li> </ul></li> <li><p><strong>routing-policy</strong> (mapping)</p> <blockquote> <p>The <code>routing-policy</code> block defines extra routing policy for a network, where traffic may be handled specially based on the source IP, firewall marking, etc.</p> <p>For <code>from</code>, <code>to</code>, both IPv4 and IPv6 addresses are recognized, and must be in the form <code>addr/prefixlen</code> or <code>addr</code>.</p> </blockquote> <ul> <li><p><strong>from</strong> (scalar)</p> <blockquote> <p>Set a source IP address to match traffic for this policy rule.</p> </blockquote></li> <li><p><strong>to</strong> (scalar)</p> <blockquote> <p>Match on traffic going to the specified destination.</p> </blockquote></li> <li><p><strong>table</strong> (scalar)</p> <blockquote> <p>The table number to match for the route. In some scenarios, it may be useful to set routes in a separate routing table. It may also be used to refer to routes which also accept a <code>table</code> parameter. Allowed values are positive integers starting from 1. Some values are already in use to refer to specific routing tables: see <code>/etc/iproute2/rt_tables</code>.</p> </blockquote></li> <li><p><strong>priority</strong> (scalar)</p> <blockquote> <p>Specify a priority for the routing policy rule, to influence the order in which routing rules are processed. A higher number means lower priority: rules are processed in order by increasing priority number.</p> </blockquote></li> <li><p><strong>mark</strong> (scalar)</p> <blockquote> <p>Have this routing policy rule match on traffic that has been marked by the iptables firewall with this value. Allowed values are positive integers starting from 1.</p> </blockquote></li> <li><p><strong>type-of-service</strong> (scalar)</p> <blockquote> <p>Match this policy rule based on the type of service number applied to the traffic.</p> </blockquote></li> </ul></li> </ul> <h2 id="authentication">Authentication</h2> <p>Netplan supports advanced authentication settings for ethernet and wifi interfaces, as well as individual wifi networks, by means of the <code>auth</code> block.</p> <ul> <li><p><strong>auth</strong> (mapping)</p> <blockquote> <p>Specifies authentication settings for a device of type <code>ethernets:</code>, or an <code>access-points:</code> entry on a <code>wifis:</code> device.</p> <p>The <code>auth</code> block supports the following properties:</p> </blockquote> <ul> <li><p><strong>key-management</strong> (scalar)</p> <blockquote> <p>The supported key management modes are <code>none</code> (no key management); <code>psk</code> (WPA with pre-shared key, common for home wifi); <code>eap</code> (WPA with EAP, common for enterprise wifi); <code>sae</code> (used by WPA3); and <code>802.1x</code> (used primarily for wired Ethernet connections).</p> </blockquote></li> <li><p><strong>password</strong> (scalar)</p> <blockquote> <p>The password string for EAP, or the pre-shared key for WPA-PSK.</p> </blockquote> <p>The following properties can be used if <code>key-management</code> is <code>eap</code> or <code>802.1x</code>:</p></li> <li><p><strong>method</strong> (scalar)</p> <blockquote> <p>The EAP method to use. The supported EAP methods are <code>tls</code> (TLS), <code>peap</code> (Protected EAP), and <code>ttls</code> (Tunneled TLS).</p> </blockquote></li> <li><p><strong>identity</strong> (scalar)</p> <blockquote> <p>The identity to use for EAP.</p> </blockquote></li> <li><p><strong>anonymous-identity</strong> (scalar)</p> <blockquote> <p>The identity to pass over the unencrypted channel if the chosen EAP method supports passing a different tunnelled identity.</p> </blockquote></li> <li><p><strong>ca-certificate</strong> (scalar)</p> <blockquote> <p>Path to a file with one or more trusted certificate authority (CA) certificates.</p> </blockquote></li> <li><p><strong>client-certificate</strong> (scalar)</p> <blockquote> <p>Path to a file containing the certificate to be used by the client during authentication.</p> </blockquote></li> <li><p><strong>client-key</strong> (scalar)</p> <blockquote> <p>Path to a file containing the private key corresponding to <code>client-certificate</code>.</p> </blockquote></li> <li><p><strong>client-key-password</strong> (scalar)</p> <blockquote> <p>Password to use to decrypt the private key specified in <code>client-key</code> if it is encrypted.</p> </blockquote></li> <li><p><strong>phase2-auth</strong> (scalar) – since <strong>0.99</strong></p> <blockquote> <p>Phase 2 authentication mechanism.</p> </blockquote></li> </ul></li> </ul> <h2 id="properties-for-device-type-ethernets">Properties for device type <code>ethernets:</code></h2> <p><strong>Status</strong>: Optional.</p> <p><strong>Purpose</strong>: Use the <code>ethernets</code> key to configure Ethernet interfaces.</p> <p><strong>Structure</strong>: The key consists of a mapping of Ethernet interface IDs. Each <code>ethernet</code> has a number of configuration options. You don’t need to define each interface by their name inside the <code>ethernets</code> mapping. You can use any ID that describes the interface and match the actual network card using the <code>match</code> key. The general configuration structure for Ethernets is shown below.</p> <div class="sourceCode" id="cb14"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb14-2"><a href="#cb14-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">ethernets</span><span class="kw">:</span></span> <span id="cb14-3"><a href="#cb14-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">device-id</span><span class="kw">:</span></span> <span id="cb14-4"><a href="#cb14-4" aria-hidden="true"></a><span class="at"> ...</span></span></code></pre></div> <p><code>device-id</code> is the interface identifier. If you use the interface name as the ID, Netplan will match that interface.</p> <p>Consider the example below. In this case, an interface called <code>eth0</code> will be configured with DHCP.</p> <div class="sourceCode" id="cb15"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb15-2"><a href="#cb15-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">ethernets</span><span class="kw">:</span></span> <span id="cb15-3"><a href="#cb15-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">eth0</span><span class="kw">:</span></span> <span id="cb15-4"><a href="#cb15-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">dhcp4</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span></code></pre></div> <p>The <code>device-id</code> can be any descriptive name your find meaningful. Although, if it doesn’t match a real interface name, you must use the property <code>match</code> to identify the device you want to configure.</p> <p>The example below defines an Ethernet connection called <code>isp-interface</code> (supposedly an external interface connected to the Internet Service Provider) and uses <code>match</code> to apply the configuration to the physical device with MAC address <code>aa:bb:cc:00:11:22</code>.</p> <div class="sourceCode" id="cb16"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb16-2"><a href="#cb16-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">ethernets</span><span class="kw">:</span></span> <span id="cb16-3"><a href="#cb16-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">isp-interface</span><span class="kw">:</span></span> <span id="cb16-4"><a href="#cb16-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">match</span><span class="kw">:</span></span> <span id="cb16-5"><a href="#cb16-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">macaddress</span><span class="kw">:</span><span class="at"> aa:bb:cc:00:11:22</span></span> <span id="cb16-6"><a href="#cb16-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">dhcp4</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span></code></pre></div> <p>Ethernet device definitions, beyond common ones described above, also support some additional properties that can be used for SR-IOV devices.</p> <ul> <li><p><strong>link</strong> (scalar) – since <strong>0.99</strong></p> <blockquote> <p>(SR-IOV devices only) The <code>link</code> property declares the device as a Virtual Function of the selected Physical Function device, as identified by the given netplan id.</p> </blockquote> <p>Example:</p> <div class="sourceCode" id="cb17"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb17-2"><a href="#cb17-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">ethernets</span><span class="kw">:</span></span> <span id="cb17-3"><a href="#cb17-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">enp1</span><span class="kw">:</span><span class="at"> </span><span class="kw">{</span><span class="at">...</span><span class="kw">}</span></span> <span id="cb17-4"><a href="#cb17-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">enp1s16f1</span><span class="kw">:</span></span> <span id="cb17-5"><a href="#cb17-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">link</span><span class="kw">:</span><span class="at"> enp1</span></span></code></pre></div></li> <li><p><strong>virtual-function-count</strong> (scalar) – since <strong>0.99</strong></p> <blockquote> <p>(SR-IOV devices only) In certain special cases VFs might need to be configured outside of netplan. For such configurations <code>virtual-function-count</code> can be optionally used to set an explicit number of Virtual Functions for the given Physical Function. If unset, the default is to create only as many VFs as are defined in the netplan configuration. This should be used for special cases only.</p> <p><strong>Requires feature: sriov</strong></p> </blockquote></li> <li><p><strong>embedded-switch-mode</strong> (scalar) – since <strong>0.104</strong></p> <blockquote> <p>(SR-IOV devices only) Change the operational mode of the embedded switch of a supported SmartNIC PCI device (e.g. Mellanox ConnectX-5). Possible values are <code>switchdev</code> or <code>legacy</code>, if unspecified the vendor’s default configuration is used.</p> <p><strong>Requires feature: eswitch-mode</strong></p> </blockquote></li> <li><p><strong>delay-virtual-functions-rebind</strong> (bool) – since <strong>0.104</strong></p> <blockquote> <p>(SR-IOV devices only) Delay rebinding of SR-IOV virtual functions to its driver after changing the embedded-switch-mode setting to a later stage. Can be enabled when bonding/VF LAG is in use. Defaults to <code>false</code>.</p> <p><strong>Requires feature: eswitch-mode</strong></p> </blockquote></li> <li><p><strong>infiniband-mode</strong> (scalar) – since <strong>0.105</strong></p> <blockquote> <p>(InfiniBand devices only) Change the operational mode of a IPoIB device. Possible values are <code>datagram</code> or <code>connected</code>. If unspecified the kernel’s default configuration is used.</p> <p><strong>Requires feature: infiniband</strong></p> </blockquote></li> </ul> <h2 id="properties-for-device-type-modems">Properties for device type <code>modems:</code></h2> <p><strong>Status</strong>: Optional.</p> <p><strong>Purpose</strong>: Use the <code>modems</code> key to configure Modem interfaces. GSM/CDMA modem configuration is only supported for the <code>NetworkManager</code> backend. <code>systemd-networkd</code> does not support modems.</p> <p><strong>Structure</strong>: The key consists of a mapping of Modem IDs. Each <code>modem</code> has a number of configuration options. The general configuration structure for Modems is shown below.</p> <div class="sourceCode" id="cb18"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb18-2"><a href="#cb18-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">version</span><span class="kw">:</span><span class="at"> </span><span class="dv">2</span></span> <span id="cb18-3"><a href="#cb18-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">renderer</span><span class="kw">:</span><span class="at"> NetworkManager</span></span> <span id="cb18-4"><a href="#cb18-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">modems</span><span class="kw">:</span></span> <span id="cb18-5"><a href="#cb18-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">cdc-wdm1</span><span class="kw">:</span></span> <span id="cb18-6"><a href="#cb18-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">mtu</span><span class="kw">:</span><span class="at"> </span><span class="dv">1600</span></span> <span id="cb18-7"><a href="#cb18-7" aria-hidden="true"></a><span class="at"> </span><span class="fu">apn</span><span class="kw">:</span><span class="at"> ISP.CINGULAR</span></span> <span id="cb18-8"><a href="#cb18-8" aria-hidden="true"></a><span class="at"> </span><span class="fu">username</span><span class="kw">:</span><span class="at"> ISP@CINGULARGPRS.COM</span></span> <span id="cb18-9"><a href="#cb18-9" aria-hidden="true"></a><span class="at"> </span><span class="fu">password</span><span class="kw">:</span><span class="at"> CINGULAR1</span></span> <span id="cb18-10"><a href="#cb18-10" aria-hidden="true"></a><span class="at"> </span><span class="fu">number</span><span class="kw">:</span><span class="at"> </span><span class="st">"*99#"</span></span> <span id="cb18-11"><a href="#cb18-11" aria-hidden="true"></a><span class="at"> </span><span class="fu">network-id</span><span class="kw">:</span><span class="at"> </span><span class="dv">24005</span></span> <span id="cb18-12"><a href="#cb18-12" aria-hidden="true"></a><span class="at"> </span><span class="fu">device-id</span><span class="kw">:</span><span class="at"> da812de91eec16620b06cd0ca5cbc7ea25245222</span></span> <span id="cb18-13"><a href="#cb18-13" aria-hidden="true"></a><span class="at"> </span><span class="fu">pin</span><span class="kw">:</span><span class="at"> </span><span class="dv">2345</span></span> <span id="cb18-14"><a href="#cb18-14" aria-hidden="true"></a><span class="at"> </span><span class="fu">sim-id</span><span class="kw">:</span><span class="at"> </span><span class="dv">89148000000060671234</span></span> <span id="cb18-15"><a href="#cb18-15" aria-hidden="true"></a><span class="at"> </span><span class="fu">sim-operator-id</span><span class="kw">:</span><span class="at"> </span><span class="dv">310260</span></span></code></pre></div> <p><strong>Requires feature: modems</strong></p> <ul> <li><p><strong>apn</strong> (scalar) – since <strong>0.99</strong></p> <blockquote> <p>Set the carrier APN (Access Point Name). This can be omitted if <code>auto-config</code> is enabled.</p> </blockquote></li> <li><p><strong>auto-config</strong> (bool) – since <strong>0.99</strong></p> <blockquote> <p>Specify whether to try and auto-configure the modem by doing a lookup of the carrier against the Mobile Broadband Provider database. This may not work for all carriers.</p> </blockquote></li> <li><p><strong>device-id</strong> (scalar) – since <strong>0.99</strong></p> <blockquote> <p>Specify the device ID (as given by the WWAN management service) of the modem to match. This can be found using <code>mmcli</code>.</p> </blockquote></li> <li><p><strong>network-id</strong> (scalar) – since <strong>0.99</strong></p> <blockquote> <p>Specify the Network ID (GSM LAI format). If this is specified, the device will not roam networks.</p> </blockquote></li> <li><p><strong>number</strong> (scalar) – since <strong>0.99</strong></p> <blockquote> <p>The number to dial to establish the connection to the mobile broadband network. (Deprecated for GSM)</p> </blockquote></li> <li><p><strong>password</strong> (scalar) – since <strong>0.99</strong></p> <blockquote> <p>Specify the password used to authenticate with the carrier network. This can be omitted if <code>auto-config</code> is enabled.</p> </blockquote></li> <li><p><strong>pin</strong> (scalar) – since <strong>0.99</strong></p> <blockquote> <p>Specify the SIM PIN to allow it to operate if a PIN is set.</p> </blockquote></li> <li><p><strong>sim-id</strong> (scalar) – since <strong>0.99</strong></p> <blockquote> <p>Specify the SIM unique identifier (as given by the WWAN management service) which this connection applies to. If given, the connection will apply to any device also allowed by <code>device-id</code> which contains a SIM card matching the given identifier.</p> </blockquote></li> <li><p><strong>sim-operator-id</strong> (scalar) – since <strong>0.99</strong></p> <blockquote> <p>Specify the MCC/MNC string (such as “310260” or “21601”) which identifies the carrier that this connection should apply to. If given, the connection will apply to any device also allowed by <code>device-id</code> and <code>sim-id</code> which contains a SIM card provisioned by the given operator.</p> </blockquote></li> <li><p><strong>username</strong> (scalar) – since <strong>0.99</strong></p> <blockquote> <p>Specify the username used to authenticate with the carrier network. This can be omitted if <code>auto-config</code> is enabled.</p> </blockquote></li> </ul> <h2 id="properties-for-device-type-wifis">Properties for device type <code>wifis:</code></h2> <p><strong>Status</strong>: Optional.</p> <p><strong>Purpose</strong>: Use the <code>wifis</code> key to configure WiFi access points.</p> <p><strong>Structure</strong>: The key consists of a mapping of WiFi IDs. Each <code>wifi</code> has a number of configuration options. The general configuration structure for WiFis is shown below.</p> <div class="sourceCode" id="cb19"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb19-2"><a href="#cb19-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">version</span><span class="kw">:</span><span class="at"> </span><span class="dv">2</span></span> <span id="cb19-3"><a href="#cb19-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">wifis</span><span class="kw">:</span></span> <span id="cb19-4"><a href="#cb19-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">wlp0s1</span><span class="kw">:</span></span> <span id="cb19-5"><a href="#cb19-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">access-points</span><span class="kw">:</span></span> <span id="cb19-6"><a href="#cb19-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">"network_ssid_name"</span><span class="kw">:</span></span> <span id="cb19-7"><a href="#cb19-7" aria-hidden="true"></a><span class="at"> </span><span class="fu">password</span><span class="kw">:</span><span class="at"> </span><span class="st">"**********"</span></span></code></pre></div> <p>Note that <code>systemd-networkd</code> does not natively support wifi, so you need wpasupplicant installed if you let the <code>networkd</code> renderer handle wifi.</p> <ul> <li><p><strong>access-points</strong> (mapping)</p> <blockquote> <p>This provides pre-configured connections to NetworkManager. Note that users can of course select other access points/SSIDs. The keys of the mapping are the SSIDs, and the values are mappings with the following supported properties:</p> </blockquote> <ul> <li><p><strong>password</strong> (scalar)</p> <blockquote> <p>Enable WPA/WPA2 authentication and set the passphrase for it. If neither this nor an <code>auth</code> block are given, the network is assumed to be open. The setting</p> <div class="sourceCode" id="cb20"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true"></a><span class="fu">password</span><span class="kw">:</span><span class="at"> </span><span class="st">"S3kr1t"</span></span></code></pre></div> <p>is equivalent to</p> <div class="sourceCode" id="cb21"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true"></a><span class="fu">auth</span><span class="kw">:</span></span> <span id="cb21-2"><a href="#cb21-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">key-management</span><span class="kw">:</span><span class="at"> psk</span></span> <span id="cb21-3"><a href="#cb21-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">password</span><span class="kw">:</span><span class="at"> </span><span class="st">"S3kr1t"</span></span></code></pre></div> </blockquote></li> <li><p><strong>mode</strong> (scalar)</p> <blockquote> <p>Possible access point modes are <code>infrastructure</code> (the default), <code>ap</code> (create an access point to which other devices can connect), and <code>adhoc</code> (peer to peer networks without a central access point). <code>ap</code> is only supported with NetworkManager.</p> </blockquote></li> <li><p><strong>bssid</strong> (scalar) – since <strong>0.99</strong></p> <blockquote> <p>If specified, directs the device to only associate with the given access point.</p> </blockquote></li> <li><p><strong>band</strong> (scalar) – since <strong>0.99</strong></p> <blockquote> <p>Possible bands are <code>5GHz</code> (for 5GHz 802.11a) and <code>2.4GHz</code> (for 2.4GHz 802.11), do not restrict the 802.11 frequency band of the network if unset (the default).</p> </blockquote></li> <li><p><strong>channel</strong> (scalar) – since <strong>0.99</strong></p> <blockquote> <p>Wireless channel to use for the Wi-Fi connection. Because channel numbers overlap between bands, this property takes effect only if the <code>band</code> property is also set.</p> </blockquote></li> <li><p><strong>hidden</strong> (bool) – since <strong>0.100</strong></p> <blockquote> <p>Set to <code>true</code> to change the SSID scan technique for connecting to hidden WiFi networks. Note this may have slower performance compared to <code>false</code> (the default) when connecting to publicly broadcast SSIDs.</p> </blockquote></li> </ul></li> <li><p><strong>wakeonwlan</strong> (sequence of scalars) – since <strong>0.99</strong></p> <blockquote> <p>This enables WakeOnWLan on supported devices. Not all drivers support all options. May be any combination of <code>any</code>, <code>disconnect</code>, <code>magic_pkt</code>, <code>gtk_rekey_failure</code>, <code>eap_identity_req</code>, <code>four_way_handshake</code>, <code>rfkill_release</code> or <code>tcp</code> (NetworkManager only). Or the exclusive <code>default</code> flag (the default).</p> </blockquote></li> <li><p><strong>regulatory-domain</strong> (scalar) – since <strong>0.105</strong></p> <blockquote> <p>This can be used to define the radio’s regulatory domain, to make use of additional WiFi channels outside the “world domain”. Takes an ISO / IEC 3166 country code (like <code>GB</code>) or <code>00</code> to reset to the “world domain”. See <a href="https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git/tree/db.txt">wireless-regdb</a> for available values.</p> <p><strong>Requires dependency: iw</strong>, if it is to be used outside the <code>networkd</code> (wpa_supplicant) backend.</p> </blockquote></li> </ul> <h2 id="properties-for-device-type-bridges">Properties for device type <code>bridges:</code></h2> <p><strong>Status</strong>: Optional.</p> <p><strong>Purpose</strong>: Use the <code>bridges</code> key to create Bridge interfaces.</p> <p><strong>Structure</strong>: The key consists of a mapping of Bridge interface names. Each <code>bridge</code> has an optional list of interfaces that will be bridged together. The interfaces listed in the <code>interfaces</code> key (<code>enp5s0</code> and <code>enp5s1</code> below) must also be defined in your Netplan configuration. The general configuration structure for Bridges is shown below.</p> <div class="sourceCode" id="cb22"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb22-2"><a href="#cb22-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">bridges</span><span class="kw">:</span></span> <span id="cb22-3"><a href="#cb22-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">br0</span><span class="kw">:</span></span> <span id="cb22-4"><a href="#cb22-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">interfaces</span><span class="kw">:</span></span> <span id="cb22-5"><a href="#cb22-5" aria-hidden="true"></a><span class="at"> </span><span class="kw">-</span><span class="at"> enp5s0</span></span> <span id="cb22-6"><a href="#cb22-6" aria-hidden="true"></a><span class="at"> </span><span class="kw">-</span><span class="at"> enp5s1</span></span> <span id="cb22-7"><a href="#cb22-7" aria-hidden="true"></a><span class="at"> </span><span class="fu">dhcp4</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span> <span id="cb22-8"><a href="#cb22-8" aria-hidden="true"></a><span class="at"> ...</span></span></code></pre></div> <p>When applied, a virtual interface of type bridge called <code>br0</code> will be created in the system.</p> <p>The specific settings for bridges are defined below.</p> <ul> <li><p><strong>interfaces</strong> (sequence of scalars)</p> <blockquote> <p>All devices matching this ID list will be added to the bridge. This may be an empty list, in which case the bridge will be brought online with no member interfaces.</p> </blockquote> <p>Example:</p> <div class="sourceCode" id="cb23"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb23-2"><a href="#cb23-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">ethernets</span><span class="kw">:</span></span> <span id="cb23-3"><a href="#cb23-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">switchports</span><span class="kw">:</span></span> <span id="cb23-4"><a href="#cb23-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">match</span><span class="kw">:</span><span class="at"> </span><span class="kw">{</span><span class="fu">name</span><span class="kw">:</span><span class="at"> </span><span class="st">"enp2*"</span><span class="kw">}</span></span> <span id="cb23-5"><a href="#cb23-5" aria-hidden="true"></a><span class="at"> </span><span class="kw">[</span><span class="at">...</span><span class="kw">]</span></span> <span id="cb23-6"><a href="#cb23-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">bridges</span><span class="kw">:</span></span> <span id="cb23-7"><a href="#cb23-7" aria-hidden="true"></a><span class="at"> </span><span class="fu">br0</span><span class="kw">:</span></span> <span id="cb23-8"><a href="#cb23-8" aria-hidden="true"></a><span class="at"> </span><span class="fu">interfaces</span><span class="kw">:</span><span class="at"> </span><span class="kw">[</span><span class="at">switchports</span><span class="kw">]</span></span></code></pre></div></li> <li><p><strong>parameters</strong> (mapping)</p> <blockquote> <p>Customization parameters for special bridging options. Time intervals may need to be expressed as a number of seconds or milliseconds: the default value type is specified below. If necessary, time intervals can be qualified using a time suffix (such as “s” for seconds, “ms” for milliseconds) to allow for more control over its behavior.</p> </blockquote> <ul> <li><p><strong>ageing-time</strong>, <strong>aging-time</strong> (scalar)</p> <blockquote> <p>Set the period of time to keep a MAC address in the forwarding database after a packet is received. This maps to the AgeingTimeSec= property when the networkd renderer is used. If no time suffix is specified, the value will be interpreted as seconds.</p> </blockquote></li> <li><p><strong>priority</strong> (scalar)</p> <blockquote> <p>Set the priority value for the bridge. This value should be a number between <code>0</code> and <code>65535</code>. Lower values mean higher priority. The bridge with the higher priority will be elected as the root bridge.</p> </blockquote></li> <li><p><strong>port-priority</strong> (mapping)</p> <blockquote> <p>Set the port priority per interface. The priority value is a number between <code>0</code> and <code>63</code>. This metric is used in the designated port and root port selection algorithms.</p> </blockquote> <p>Example:</p> <div class="sourceCode" id="cb24"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb24-2"><a href="#cb24-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">ethernets</span><span class="kw">:</span></span> <span id="cb24-3"><a href="#cb24-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">eth0</span><span class="kw">:</span></span> <span id="cb24-4"><a href="#cb24-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">dhcp4</span><span class="kw">:</span><span class="at"> </span><span class="ch">false</span></span> <span id="cb24-5"><a href="#cb24-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">eth1</span><span class="kw">:</span></span> <span id="cb24-6"><a href="#cb24-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">dhcp4</span><span class="kw">:</span><span class="at"> </span><span class="ch">false</span></span> <span id="cb24-7"><a href="#cb24-7" aria-hidden="true"></a><span class="at"> </span><span class="fu">bridges</span><span class="kw">:</span></span> <span id="cb24-8"><a href="#cb24-8" aria-hidden="true"></a><span class="at"> </span><span class="fu">br0</span><span class="kw">:</span></span> <span id="cb24-9"><a href="#cb24-9" aria-hidden="true"></a><span class="at"> </span><span class="fu">interfaces</span><span class="kw">:</span><span class="at"> </span><span class="kw">[</span><span class="at">eth0</span><span class="kw">,</span><span class="at"> eth1</span><span class="kw">]</span></span> <span id="cb24-10"><a href="#cb24-10" aria-hidden="true"></a><span class="at"> </span><span class="fu">parameters</span><span class="kw">:</span></span> <span id="cb24-11"><a href="#cb24-11" aria-hidden="true"></a><span class="at"> </span><span class="fu">port-priority</span><span class="kw">:</span></span> <span id="cb24-12"><a href="#cb24-12" aria-hidden="true"></a><span class="at"> </span><span class="fu">eth0</span><span class="kw">:</span><span class="at"> </span><span class="dv">10</span></span> <span id="cb24-13"><a href="#cb24-13" aria-hidden="true"></a><span class="at"> </span><span class="fu">eth1</span><span class="kw">:</span><span class="at"> </span><span class="dv">20</span></span></code></pre></div></li> <li><p><strong>forward-delay</strong> (scalar)</p> <blockquote> <p>Specify the period of time the bridge will remain in Listening and Learning states before getting to the Forwarding state. This field maps to the ForwardDelaySec= property for the networkd renderer. If no time suffix is specified, the value will be interpreted as seconds.</p> </blockquote></li> <li><p><strong>hello-time</strong> (scalar)</p> <blockquote> <p>Specify the interval between two hello packets being sent out from the root and designated bridges. Hello packets communicate information about the network topology. When the networkd renderer is used, this maps to the HelloTimeSec= property. If no time suffix is specified, the value will be interpreted as seconds.</p> </blockquote></li> <li><p><strong>max-age</strong> (scalar)</p> <blockquote> <p>Set the maximum age of a hello packet. If the last hello packet is older than that value, the bridge will attempt to become the root bridge. This maps to the MaxAgeSec= property when the networkd renderer is used. If no time suffix is specified, the value will be interpreted as seconds.</p> </blockquote></li> <li><p><strong>path-cost</strong> (mapping)</p> <blockquote> <p>Set the per-interface cost of a path on the bridge. Faster interfaces should have a lower cost. This allows a finer control on the network topology so that the fastest paths are available whenever possible.</p> </blockquote> <p>Example:</p> <div class="sourceCode" id="cb25"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb25-2"><a href="#cb25-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">ethernets</span><span class="kw">:</span></span> <span id="cb25-3"><a href="#cb25-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">eth0</span><span class="kw">:</span></span> <span id="cb25-4"><a href="#cb25-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">dhcp4</span><span class="kw">:</span><span class="at"> </span><span class="ch">false</span></span> <span id="cb25-5"><a href="#cb25-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">eth1</span><span class="kw">:</span></span> <span id="cb25-6"><a href="#cb25-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">dhcp4</span><span class="kw">:</span><span class="at"> </span><span class="ch">false</span></span> <span id="cb25-7"><a href="#cb25-7" aria-hidden="true"></a><span class="at"> </span><span class="fu">bridges</span><span class="kw">:</span></span> <span id="cb25-8"><a href="#cb25-8" aria-hidden="true"></a><span class="at"> </span><span class="fu">br0</span><span class="kw">:</span></span> <span id="cb25-9"><a href="#cb25-9" aria-hidden="true"></a><span class="at"> </span><span class="fu">interfaces</span><span class="kw">:</span><span class="at"> </span><span class="kw">[</span><span class="at">eth0</span><span class="kw">,</span><span class="at"> eth1</span><span class="kw">]</span></span> <span id="cb25-10"><a href="#cb25-10" aria-hidden="true"></a><span class="at"> </span><span class="fu">parameters</span><span class="kw">:</span></span> <span id="cb25-11"><a href="#cb25-11" aria-hidden="true"></a><span class="at"> </span><span class="fu">path-cost</span><span class="kw">:</span></span> <span id="cb25-12"><a href="#cb25-12" aria-hidden="true"></a><span class="at"> </span><span class="fu">eth0</span><span class="kw">:</span><span class="at"> </span><span class="dv">100</span></span> <span id="cb25-13"><a href="#cb25-13" aria-hidden="true"></a><span class="at"> </span><span class="fu">eth1</span><span class="kw">:</span><span class="at"> </span><span class="dv">200</span></span></code></pre></div></li> <li><p><strong>stp</strong> (bool)</p> <blockquote> <p>Define whether the bridge should use Spanning Tree Protocol. The default value is “true”, which means that Spanning Tree should be used.</p> </blockquote></li> </ul></li> </ul> <h2 id="properties-for-device-type-bonds">Properties for device type <code>bonds:</code></h2> <p><strong>Status</strong>: Optional.</p> <p><strong>Purpose</strong>: Use the <code>bonds</code> key to create Bond (Link Aggregation) interfaces.</p> <p><strong>Structure</strong>: The key consists of a mapping of Bond interface names. Each <code>bond</code> has an optional list of interfaces that will be part of the aggregation. The interfaces listed in the <code>interfaces</code> key must also be defined in your Netplan configuration. The general configuration structure for Bonds is shown below.</p> <div class="sourceCode" id="cb26"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb26-1"><a href="#cb26-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb26-2"><a href="#cb26-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">bonds</span><span class="kw">:</span></span> <span id="cb26-3"><a href="#cb26-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">bond0</span><span class="kw">:</span></span> <span id="cb26-4"><a href="#cb26-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">interfaces</span><span class="kw">:</span></span> <span id="cb26-5"><a href="#cb26-5" aria-hidden="true"></a><span class="at"> </span><span class="kw">-</span><span class="at"> enp5s0</span></span> <span id="cb26-6"><a href="#cb26-6" aria-hidden="true"></a><span class="at"> </span><span class="kw">-</span><span class="at"> enp5s1</span></span> <span id="cb26-7"><a href="#cb26-7" aria-hidden="true"></a><span class="at"> </span><span class="kw">-</span><span class="at"> enp5s2</span></span> <span id="cb26-8"><a href="#cb26-8" aria-hidden="true"></a><span class="at"> </span><span class="fu">mode</span><span class="kw">:</span><span class="at"> active-backup</span></span> <span id="cb26-9"><a href="#cb26-9" aria-hidden="true"></a><span class="at"> ...</span></span></code></pre></div> <p>When applied, a virtual interface of type bond called <code>bond0</code> will be created in the system.</p> <p>The specific settings for bonds are defined below.</p> <ul> <li><p><strong>interfaces</strong> (sequence of scalars)</p> <blockquote> <p>All devices matching this ID list will be added to the bond.</p> </blockquote> <p>Example:</p> <div class="sourceCode" id="cb27"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb27-1"><a href="#cb27-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb27-2"><a href="#cb27-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">ethernets</span><span class="kw">:</span></span> <span id="cb27-3"><a href="#cb27-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">switchports</span><span class="kw">:</span></span> <span id="cb27-4"><a href="#cb27-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">match</span><span class="kw">:</span><span class="at"> </span><span class="kw">{</span><span class="fu">name</span><span class="kw">:</span><span class="at"> </span><span class="st">"enp2*"</span><span class="kw">}</span></span> <span id="cb27-5"><a href="#cb27-5" aria-hidden="true"></a><span class="at"> </span><span class="kw">[</span><span class="at">...</span><span class="kw">]</span></span> <span id="cb27-6"><a href="#cb27-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">bonds</span><span class="kw">:</span></span> <span id="cb27-7"><a href="#cb27-7" aria-hidden="true"></a><span class="at"> </span><span class="fu">bond0</span><span class="kw">:</span></span> <span id="cb27-8"><a href="#cb27-8" aria-hidden="true"></a><span class="at"> </span><span class="fu">interfaces</span><span class="kw">:</span><span class="at"> </span><span class="kw">[</span><span class="at">switchports</span><span class="kw">]</span></span></code></pre></div></li> <li><p><strong>parameters</strong> (mapping)</p> <blockquote> <p>Customization parameters for special bonding options. Time intervals may need to be expressed as a number of seconds or milliseconds: the default value type is specified below. If necessary, time intervals can be qualified using a time suffix (such as “s” for seconds, “ms” for milliseconds) to allow for more control over its behavior.</p> </blockquote> <ul> <li><p><strong>mode</strong> (scalar)</p> <blockquote> <p>Set the bonding mode used for the interfaces. The default is <code>balance-rr</code> (round robin). Possible values are <code>balance-rr</code>, <code>active-backup</code>, <code>balance-xor</code>, <code>broadcast</code>, <code>802.3ad</code>, <code>balance-tlb</code>, and <code>balance-alb</code>. For Open vSwitch <code>active-backup</code> and the additional modes <code>balance-tcp</code> and <code>balance-slb</code> are supported.</p> </blockquote></li> <li><p><strong>lacp-rate</strong> (scalar)</p> <blockquote> <p>Set the rate at which LACPDUs are transmitted. This is only useful in 802.3ad mode. Possible values are <code>slow</code> (30 seconds, default), and <code>fast</code> (every second).</p> </blockquote></li> <li><p><strong>mii-monitor-interval</strong> (scalar)</p> <blockquote> <p>Specifies the interval for MII monitoring (verifying if an interface of the bond has carrier). The default is <code>0</code>; which disables MII monitoring. This is equivalent to the MIIMonitorSec= field for the networkd backend. If no time suffix is specified, the value will be interpreted as milliseconds.</p> </blockquote></li> <li><p><strong>min-links</strong> (scalar)</p> <blockquote> <p>The minimum number of links up in a bond to consider the bond interface to be up.</p> </blockquote></li> <li><p><strong>transmit-hash-policy</strong> (scalar)</p> <blockquote> <p>Specifies the transmit hash policy for the selection of ports. This is only useful in balance-xor, 802.3ad and balance-tlb modes. Possible values are <code>layer2</code>, <code>layer3+4</code>, <code>layer2+3</code>, <code>encap2+3</code>, and <code>encap3+4</code>.</p> </blockquote></li> <li><p><strong>ad-select</strong> (scalar)</p> <blockquote> <p>Set the aggregation selection mode. Possible values are <code>stable</code>, <code>bandwidth</code>, and <code>count</code>. This option is only used in 802.3ad mode.</p> </blockquote></li> <li><p><strong>all-members-active</strong> (bool) – since <strong>0.106</strong></p> <blockquote> <p>If the bond should drop duplicate frames received on inactive ports, set this option to <code>false</code>. If they should be delivered, set this option to <code>true</code>. The default value is false, and is the desirable behavior in most situations.</p> <p>Alias: <strong>all-slaves-active</strong> <!--- wokeignore:rule=slave --></p> </blockquote></li> <li><p><strong>arp-interval</strong> (scalar)</p> <blockquote> <p>Set the interval value for how frequently ARP link monitoring should happen. The default value is <code>0</code>, which disables ARP monitoring. For the networkd backend, this maps to the ARPIntervalSec= property. If no time suffix is specified, the value will be interpreted as milliseconds.</p> </blockquote></li> <li><p><strong>arp-ip-targets</strong> (sequence of scalars)</p> <blockquote> <p>IPs of other hosts on the link which should be sent ARP requests in order to validate that a port is up. This option is only used when <code>arp-interval</code> is set to a value other than <code>0</code>. At least one IP address must be given for ARP link monitoring to function. Only IPv4 addresses are supported. You can specify up to 16 IP addresses. The default value is an empty list.</p> </blockquote></li> <li><p><strong>arp-validate</strong> (scalar)</p> <blockquote> <p>Configure how ARP replies are to be validated when using ARP link monitoring. Possible values are <code>none</code>, <code>active</code>, <code>backup</code>, and <code>all</code>.</p> </blockquote></li> <li><p><strong>arp-all-targets</strong> (scalar)</p> <blockquote> <p>Specify whether to use any ARP IP target being up as sufficient for a port to be considered up; or if all the targets must be up. This is only used for <code>active-backup</code> mode when <code>arp-validate</code> is enabled. Possible values are <code>any</code> and <code>all</code>.</p> </blockquote></li> <li><p><strong>up-delay</strong> (scalar)</p> <blockquote> <p>Specify the delay before enabling a link once the link is physically up. The default value is <code>0</code>. This maps to the UpDelaySec= property for the networkd renderer. This option is only valid for the miimon link monitor. If no time suffix is specified, the value will be interpreted as milliseconds.</p> </blockquote></li> <li><p><strong>down-delay</strong> (scalar)</p> <blockquote> <p>Specify the delay before disabling a link once the link has been lost. The default value is <code>0</code>. This maps to the DownDelaySec= property for the networkd renderer. This option is only valid for the miimon link monitor. If no time suffix is specified, the value will be interpreted as milliseconds.</p> </blockquote></li> <li><p><strong>fail-over-mac-policy</strong> (scalar)</p> <blockquote> <p>Set whether to set all ports to the same MAC address when adding them to the bond, or how else the system should handle MAC addresses. The possible values are <code>none</code>, <code>active</code>, and <code>follow</code>.</p> </blockquote></li> <li><p><strong>gratuitous-arp</strong> (scalar)</p> <blockquote> <p>Specify how many ARP packets to send after failover. Once a link is up on a new port, a notification is sent and possibly repeated if this value is set to a number greater than <code>1</code>. The default value is <code>1</code> and valid values are between <code>1</code> and <code>255</code>. This only affects <code>active-backup</code> mode.</p> <p>For historical reasons, the misspelling <code>gratuitious-arp</code> is also accepted and has the same function.</p> </blockquote></li> <li><p><strong>packets-per-member</strong> (scalar) – since <strong>0.106</strong></p> <blockquote> <p>In <code>balance-rr</code> mode, specifies the number of packets to transmit on a port before switching to the next. When this value is set to <code>0</code>, ports are chosen at random. Allowable values are between <code>0</code> and <code>65535</code>. The default value is <code>1</code>. This setting is only used in <code>balance-rr</code> mode.</p> <p>Alias: <strong>packets-per-slave</strong> <!--- wokeignore:rule=slave --></p> </blockquote></li> <li><p><strong>primary-reselect-policy</strong> (scalar)</p> <blockquote> <p>Set the reselection policy for the primary port. On failure of the active port, the system will use this policy to decide how the new active port will be chosen and how recovery will be handled. The possible values are <code>always</code>, <code>better</code>, and <code>failure</code>.</p> </blockquote></li> <li><p><strong>resend-igmp</strong> (scalar)</p> <blockquote> <p>In modes <code>balance-rr</code>, <code>active-backup</code>, <code>balance-tlb</code> and <code>balance-alb</code>, a failover can switch IGMP traffic from one port to another.</p> <p>This parameter specifies how many IGMP membership reports are issued on a failover event. Values range from 0 to 255. 0 disables sending membership reports. Otherwise, the first membership report is sent on failover and subsequent reports are sent at 200ms intervals.</p> </blockquote></li> <li><p><strong>learn-packet-interval</strong> (scalar)</p> <blockquote> <p>Specify the interval between sending learning packets to each port. The value range is between <code>1</code> and <code>0x7fffffff</code>. The default value is <code>1</code>. This option only affects <code>balance-tlb</code> and <code>balance-alb</code> modes. Using the networkd renderer, this field maps to the LearnPacketIntervalSec= property. If no time suffix is specified, the value will be interpreted as seconds.</p> </blockquote></li> <li><p><strong>primary</strong> (scalar)</p> <blockquote> <p>Specify a device to be used as a primary port, or preferred device to use as a port for the bond (i.e. the preferred device to send data through), whenever it is available. This only affects <code>active-backup</code>, <code>balance-alb</code>, and <code>balance-tlb</code> modes.</p> </blockquote></li> </ul></li> </ul> <h2 id="properties-for-device-type-tunnels">Properties for device type <code>tunnels:</code></h2> <p><strong>Status</strong>: Optional.</p> <p><strong>Purpose</strong>: Use the <code>tunnels</code> key to create virtual tunnel interfaces.</p> <p><strong>Structure</strong>: The key consists of a mapping of tunnel interface names. Each <code>tunnel</code> requires the identification of the tunnel mode (see the section <code>mode</code> below for the list of supported modes). The general configuration structure for Tunnels is shown below.</p> <div class="sourceCode" id="cb28"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb28-1"><a href="#cb28-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb28-2"><a href="#cb28-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">tunnels</span><span class="kw">:</span></span> <span id="cb28-3"><a href="#cb28-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">tunnel0</span><span class="kw">:</span></span> <span id="cb28-4"><a href="#cb28-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">mode</span><span class="kw">:</span><span class="at"> SCALAR</span></span> <span id="cb28-5"><a href="#cb28-5" aria-hidden="true"></a><span class="at"> ...</span></span></code></pre></div> <p>When applied, a virtual interface called <code>tunnel0</code> will be created in the system. Its operation mode is defined by the property <code>mode</code>.</p> <p>Tunnels allow traffic to pass as if it was between systems on the same local network, although systems may be far from each other but reachable via the Internet. They may be used to support IPv6 traffic on a network where the ISP does not provide the service, or to extend and “connect” separate local networks. Please see <a href="https://en.wikipedia.org/wiki/Tunneling_protocol" class="uri">https://en.wikipedia.org/wiki/Tunneling_protocol</a> for more general information about tunnels.</p> <p>The specific settings for tunnels are defined below.</p> <ul> <li><p><strong>mode</strong> (scalar)</p> <blockquote> <p>Defines the tunnel mode. Valid options are <code>sit</code>, <code>gre</code>, <code>ip6gre</code>, <code>ipip</code>, <code>ipip6</code>, <code>ip6ip6</code>, <code>vti</code>, <code>vti6</code>, <code>wireguard</code>, <code>vxlan</code>, <code>gretap</code> and <code>ip6gretap</code> modes. In addition, the <code>NetworkManager</code> backend supports <code>isatap</code> tunnels.</p> </blockquote></li> <li><p><strong>local</strong> (scalar)</p> <blockquote> <p>Defines the address of the local endpoint of the tunnel. (For VXLAN) This should match one of the parent’s IP addresses or make use of the networkd special values.</p> </blockquote></li> <li><p><strong>remote</strong> (scalar)</p> <blockquote> <p>Defines the address of the remote endpoint of the tunnel or multicast group IP address for VXLAN.</p> </blockquote></li> <li><p><strong>ttl</strong> (scalar) – since <strong>0.103</strong></p> <blockquote> <p>Defines the Time To Live (TTL) of the tunnel. Takes a number in the range <code>1..255</code>.</p> </blockquote></li> <li><p><strong>key</strong> (scalar or mapping)</p> <blockquote> <p>Define keys to use for the tunnel. The key can be a number or a dotted quad (an IPv4 address). For <code>wireguard</code> it can be a base64-encoded private key or (as of <code>networkd</code> v242+) an absolute path to a file, containing the private key (since 0.100). It is used for identification of IP transforms. This is only required for <code>vti</code> and <code>vti6</code> when using the networkd backend.</p> <p>This field may be used as a scalar (meaning that a single key is specified and to be used for input, output and private key), or as a mapping, where you can further specify <code>input</code>/<code>output</code>/<code>private</code>.</p> </blockquote> <ul> <li><p><strong>input</strong> (scalar)</p> <blockquote> <p>The input key for the tunnel</p> </blockquote></li> <li><p><strong>output</strong> (scalar)</p> <blockquote> <p>The output key for the tunnel</p> </blockquote></li> <li><p><strong>private</strong> (scalar) – since <strong>0.100</strong></p> <blockquote> <p>A base64-encoded private key required for WireGuard tunnels. When the <code>systemd-networkd</code> backend (v242+) is used, this can also be an absolute path to a file containing the private key.</p> </blockquote></li> </ul></li> <li><p><strong>keys</strong> (scalar or mapping)</p> <blockquote> <p>Alternate name for the <code>key</code> field. See above.</p> </blockquote> <p>Examples:</p> <div class="sourceCode" id="cb29"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb29-1"><a href="#cb29-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb29-2"><a href="#cb29-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">tunnels</span><span class="kw">:</span></span> <span id="cb29-3"><a href="#cb29-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">tun0</span><span class="kw">:</span></span> <span id="cb29-4"><a href="#cb29-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">mode</span><span class="kw">:</span><span class="at"> gre</span></span> <span id="cb29-5"><a href="#cb29-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">local</span><span class="kw">:</span><span class="at"> ...</span></span> <span id="cb29-6"><a href="#cb29-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">remote</span><span class="kw">:</span><span class="at"> ...</span></span> <span id="cb29-7"><a href="#cb29-7" aria-hidden="true"></a><span class="at"> </span><span class="fu">keys</span><span class="kw">:</span></span> <span id="cb29-8"><a href="#cb29-8" aria-hidden="true"></a><span class="at"> </span><span class="fu">input</span><span class="kw">:</span><span class="at"> </span><span class="dv">1234</span></span> <span id="cb29-9"><a href="#cb29-9" aria-hidden="true"></a><span class="at"> </span><span class="fu">output</span><span class="kw">:</span><span class="at"> </span><span class="dv">5678</span></span></code></pre></div> <div class="sourceCode" id="cb30"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb30-1"><a href="#cb30-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb30-2"><a href="#cb30-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">tunnels</span><span class="kw">:</span></span> <span id="cb30-3"><a href="#cb30-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">tun0</span><span class="kw">:</span></span> <span id="cb30-4"><a href="#cb30-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">mode</span><span class="kw">:</span><span class="at"> vti6</span></span> <span id="cb30-5"><a href="#cb30-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">local</span><span class="kw">:</span><span class="at"> ...</span></span> <span id="cb30-6"><a href="#cb30-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">remote</span><span class="kw">:</span><span class="at"> ...</span></span> <span id="cb30-7"><a href="#cb30-7" aria-hidden="true"></a><span class="at"> </span><span class="fu">key</span><span class="kw">:</span><span class="at"> </span><span class="dv">59568549</span></span></code></pre></div> <div class="sourceCode" id="cb31"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb31-1"><a href="#cb31-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb31-2"><a href="#cb31-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">tunnels</span><span class="kw">:</span></span> <span id="cb31-3"><a href="#cb31-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">wg0</span><span class="kw">:</span></span> <span id="cb31-4"><a href="#cb31-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">mode</span><span class="kw">:</span><span class="at"> wireguard</span></span> <span id="cb31-5"><a href="#cb31-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">addresses</span><span class="kw">:</span><span class="at"> </span><span class="kw">[</span><span class="at">...</span><span class="kw">]</span></span> <span id="cb31-6"><a href="#cb31-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">peers</span><span class="kw">:</span></span> <span id="cb31-7"><a href="#cb31-7" aria-hidden="true"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">keys</span><span class="kw">:</span></span> <span id="cb31-8"><a href="#cb31-8" aria-hidden="true"></a><span class="at"> </span><span class="fu">public</span><span class="kw">:</span><span class="at"> rlbInAj0qV69CysWPQY7KEBnKxpYCpaWqOs/dLevdWc=</span></span> <span id="cb31-9"><a href="#cb31-9" aria-hidden="true"></a><span class="at"> </span><span class="fu">shared</span><span class="kw">:</span><span class="at"> /path/to/shared.key</span></span> <span id="cb31-10"><a href="#cb31-10" aria-hidden="true"></a><span class="at"> ...</span></span> <span id="cb31-11"><a href="#cb31-11" aria-hidden="true"></a><span class="at"> </span><span class="fu">key</span><span class="kw">:</span><span class="at"> mNb7OIIXTdgW4khM7OFlzJ+UPs7lmcWHV7xjPgakMkQ=</span></span></code></pre></div> <div class="sourceCode" id="cb32"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb32-1"><a href="#cb32-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb32-2"><a href="#cb32-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">tunnels</span><span class="kw">:</span></span> <span id="cb32-3"><a href="#cb32-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">wg0</span><span class="kw">:</span></span> <span id="cb32-4"><a href="#cb32-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">mode</span><span class="kw">:</span><span class="at"> wireguard</span></span> <span id="cb32-5"><a href="#cb32-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">addresses</span><span class="kw">:</span><span class="at"> </span><span class="kw">[</span><span class="at">...</span><span class="kw">]</span></span> <span id="cb32-6"><a href="#cb32-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">peers</span><span class="kw">:</span></span> <span id="cb32-7"><a href="#cb32-7" aria-hidden="true"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">keys</span><span class="kw">:</span></span> <span id="cb32-8"><a href="#cb32-8" aria-hidden="true"></a><span class="at"> </span><span class="fu">public</span><span class="kw">:</span><span class="at"> rlbInAj0qV69CysWPQY7KEBnKxpYCpaWqOs/dLevdWc=</span></span> <span id="cb32-9"><a href="#cb32-9" aria-hidden="true"></a><span class="at"> ...</span></span> <span id="cb32-10"><a href="#cb32-10" aria-hidden="true"></a><span class="at"> </span><span class="fu">keys</span><span class="kw">:</span></span> <span id="cb32-11"><a href="#cb32-11" aria-hidden="true"></a><span class="at"> </span><span class="fu">private</span><span class="kw">:</span><span class="at"> /path/to/priv.key</span></span></code></pre></div></li> </ul> <p>WireGuard specific keys:</p> <ul> <li><p><strong>mark</strong> (scalar) – since <strong>0.100</strong></p> <blockquote> <p>Firewall mark for outgoing WireGuard packets from this interface, optional.</p> </blockquote></li> <li><p><strong>port</strong> (scalar) – since <strong>0.100</strong></p> <blockquote> <p>UDP port to listen at or <code>auto</code>. Optional, defaults to <code>auto</code>.</p> </blockquote></li> <li><p><strong>peers</strong> (sequence of mappings) – since <strong>0.100</strong></p> <blockquote> <p>A list of peers, each having keys documented below.</p> </blockquote> <p>Example:</p> <div class="sourceCode" id="cb33"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb33-1"><a href="#cb33-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb33-2"><a href="#cb33-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">tunnels</span><span class="kw">:</span></span> <span id="cb33-3"><a href="#cb33-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">wg0</span><span class="kw">:</span></span> <span id="cb33-4"><a href="#cb33-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">mode</span><span class="kw">:</span><span class="at"> wireguard</span></span> <span id="cb33-5"><a href="#cb33-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">key</span><span class="kw">:</span><span class="at"> /path/to/private.key</span></span> <span id="cb33-6"><a href="#cb33-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">mark</span><span class="kw">:</span><span class="at"> </span><span class="dv">42</span></span> <span id="cb33-7"><a href="#cb33-7" aria-hidden="true"></a><span class="at"> </span><span class="fu">port</span><span class="kw">:</span><span class="at"> </span><span class="dv">5182</span></span> <span id="cb33-8"><a href="#cb33-8" aria-hidden="true"></a><span class="at"> </span><span class="fu">peers</span><span class="kw">:</span></span> <span id="cb33-9"><a href="#cb33-9" aria-hidden="true"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">keys</span><span class="kw">:</span></span> <span id="cb33-10"><a href="#cb33-10" aria-hidden="true"></a><span class="at"> </span><span class="fu">public</span><span class="kw">:</span><span class="at"> rlbInAj0qV69CysWPQY7KEBnKxpYCpaWqOs/dLevdWc=</span></span> <span id="cb33-11"><a href="#cb33-11" aria-hidden="true"></a><span class="at"> </span><span class="fu">allowed-ips</span><span class="kw">:</span><span class="at"> </span><span class="kw">[</span><span class="at">0.0.0.0/</span><span class="dv">0</span><span class="kw">,</span><span class="at"> </span><span class="st">"2001:fe:ad:de:ad:be:ef:1/24"</span><span class="kw">]</span></span> <span id="cb33-12"><a href="#cb33-12" aria-hidden="true"></a><span class="at"> </span><span class="fu">keepalive</span><span class="kw">:</span><span class="at"> </span><span class="dv">23</span></span> <span id="cb33-13"><a href="#cb33-13" aria-hidden="true"></a><span class="at"> </span><span class="fu">endpoint</span><span class="kw">:</span><span class="at"> 1.2.3.4:5</span></span> <span id="cb33-14"><a href="#cb33-14" aria-hidden="true"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">keys</span><span class="kw">:</span></span> <span id="cb33-15"><a href="#cb33-15" aria-hidden="true"></a><span class="at"> </span><span class="fu">public</span><span class="kw">:</span><span class="at"> M9nt4YujIOmNrRmpIRTmYSfMdrpvE7u6WkG8FY8WjG4=</span></span> <span id="cb33-16"><a href="#cb33-16" aria-hidden="true"></a><span class="at"> </span><span class="fu">shared</span><span class="kw">:</span><span class="at"> /some/shared.key</span></span> <span id="cb33-17"><a href="#cb33-17" aria-hidden="true"></a><span class="at"> </span><span class="fu">allowed-ips</span><span class="kw">:</span><span class="at"> </span><span class="kw">[</span><span class="at">10.10.10.20/</span><span class="dv">24</span><span class="kw">]</span></span> <span id="cb33-18"><a href="#cb33-18" aria-hidden="true"></a><span class="at"> </span><span class="fu">keepalive</span><span class="kw">:</span><span class="at"> </span><span class="dv">22</span></span> <span id="cb33-19"><a href="#cb33-19" aria-hidden="true"></a><span class="at"> </span><span class="fu">endpoint</span><span class="kw">:</span><span class="at"> 5.4.3.2:1</span></span></code></pre></div> <ul> <li><p><strong>endpoint</strong> (scalar) – since <strong>0.100</strong></p> <blockquote> <p>Remote endpoint IPv4/IPv6 address or a hostname, followed by a colon and a port number.</p> </blockquote></li> <li><p><strong>allowed-ips</strong> (sequence of scalars) – since <strong>0.100</strong></p> <blockquote> <p>A list of IP (v4 or v6) addresses with CIDR masks from which this peer is allowed to send incoming traffic and to which outgoing traffic for this peer is directed. The catch-all 0.0.0.0/0 may be specified for matching all IPv4 addresses, and ::/0 may be specified for matching all IPv6 addresses.</p> </blockquote></li> <li><p><strong>keepalive</strong> (scalar) – since <strong>0.100</strong></p> <blockquote> <p>An interval in seconds, between 1 and 65535 inclusive, of how often to send an authenticated empty packet to the peer for the purpose of keeping a stateful firewall or NAT mapping valid persistently. Optional.</p> </blockquote></li> <li><p><strong>keys</strong> (mapping) – since <strong>0.100</strong></p> <blockquote> <p>Define keys to use for the WireGuard peers.</p> <p>This field can be used as a mapping, where you can further specify the <code>public</code> and <code>shared</code> keys.</p> </blockquote> <ul> <li><p><strong>public</strong> (scalar) – since <strong>0.100</strong></p> <blockquote> <p>A base64-encoded public key, required for WireGuard peers.</p> </blockquote></li> <li><p><strong>shared</strong> (scalar) – since <strong>0.100</strong></p> <blockquote> <p>A base64-encoded preshared key. Optional for WireGuard peers. When the <code>systemd-networkd</code> backend (v242+) is used, this can also be an absolute path to a file containing the preshared key.</p> </blockquote></li> </ul></li> </ul></li> </ul> <p>VXLAN specific keys:</p> <ul> <li><p><strong>id</strong> (scalar) – since <strong>0.105</strong></p> <blockquote> <p>The VXLAN Network Identifier (VNI or VXLAN Segment ID). Takes a number in the range <code>1..16777215</code>.</p> </blockquote></li> <li><p><strong>link</strong> (scalar) – since <strong>0.105</strong></p> <blockquote> <p>netplan ID of the parent device definition to which this VXLAN gets connected.</p> </blockquote></li> <li><p><strong>type-of-service</strong> (scalar) – since <strong>0.105</strong></p> <blockquote> <p>The Type Of Service byte value for a vxlan interface.</p> </blockquote></li> <li><p><strong>mac-learning</strong> (scalar) – since <strong>0.105</strong></p> <blockquote> <p>Takes a boolean. When <code>true</code>, enables dynamic MAC learning to discover remote MAC addresses.</p> </blockquote></li> <li><p><strong>ageing</strong>, <strong>aging</strong> (scalar) – since <strong>0.105</strong></p> <blockquote> <p>The lifetime of Forwarding Database entry learned by the kernel, in seconds.</p> </blockquote></li> <li><p><strong>limit</strong> (scalar) – since <strong>0.105</strong></p> <blockquote> <p>Configures maximum number of FDB entries.</p> </blockquote></li> <li><p><strong>arp-proxy</strong> (scalar) – since <strong>0.105</strong></p> <blockquote> <p>Takes a boolean. When <code>true</code>, bridge-connected VXLAN tunnel endpoint answers ARP requests from the local bridge on behalf of remote Distributed Overlay Virtual Ethernet (DOVE) clients. Defaults to <code>false</code>.</p> </blockquote></li> <li><p><strong>notifications</strong> (sequence of scalars) – since <strong>0.105</strong></p> <blockquote> <p>Takes the flags <code>l2-miss</code> and <code>l3-miss</code> to enable netlink LLADDR and/or netlink IP address miss notifications.</p> </blockquote></li> <li><p><strong>short-circuit</strong> (scalar) – since <strong>0.105</strong></p> <blockquote> <p>Takes a boolean. When <code>true</code>, route short circuiting is turned on.</p> </blockquote></li> <li><p><strong>checksums</strong> (sequence of scalars) – since <strong>0.105</strong></p> <blockquote> <p>Takes the flags <code>udp</code>, <code>zero-udp6-tx</code>, <code>zero-udp6-rx</code>, <code>remote-tx</code> and <code>remote-rx</code> to enable transmitting UDP checksums in VXLAN/IPv4, send/receive zero checksums in VXLAN/IPv6 and enable sending/receiving checksum offloading in VXLAN.</p> </blockquote></li> <li><p><strong>extensions</strong> (sequence of scalars) – since <strong>0.105</strong></p> <blockquote> <p>Takes the flags <code>group-policy</code> and <code>generic-protocol</code> to enable the “Group Policy” and/or “Generic Protocol” VXLAN extensions.</p> </blockquote></li> <li><p><strong>port</strong> (scalar) – since <strong>0.105</strong></p> <blockquote> <p>Configures the default destination UDP port. If the destination port is not specified then Linux kernel default will be used. Set to <code>4789</code> to get the IANA assigned value.</p> </blockquote></li> <li><p><strong>port-range</strong> (sequence of scalars) – since <strong>0.105</strong></p> <blockquote> <p>Configures the source port range for the VXLAN. The kernel assigns the source UDP port based on the flow to help the receiver to do load balancing. When this option is not set, the normal range of local UDP ports is used. Uses the form <code>[LOWER, UPPER]</code>.</p> </blockquote></li> <li><p><strong>flow-label</strong> (scalar) – since <strong>0.105</strong></p> <blockquote> <p>Specifies the flow label to use in outgoing packets. The valid range is <code>0-1048575</code>.</p> </blockquote></li> <li><p><strong>do-not-fragment</strong> (scalar) – since <strong>0.105</strong></p> <blockquote> <p>Allows setting the IPv4 Do not Fragment (DF) bit in outgoing packets. Takes a boolean value. When unset, the kernel’s default will be used.</p> </blockquote></li> </ul> <h2 id="properties-for-device-type-vlans">Properties for device type <code>vlans:</code></h2> <p><strong>Status</strong>: Optional.</p> <p><strong>Purpose</strong>: Use the <code>vlans</code> key to create VLAN interfaces.</p> <p><strong>Structure</strong>: The key consists of a mapping of VLAN interface names. The interface used in the <code>link</code> option (<code>enp5s0</code> in the example below) must also be defined in the Netplan configuration. The general configuration structure for Vlans is shown below.</p> <div class="sourceCode" id="cb34"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb34-1"><a href="#cb34-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb34-2"><a href="#cb34-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">vlans</span><span class="kw">:</span></span> <span id="cb34-3"><a href="#cb34-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">vlan123</span><span class="kw">:</span></span> <span id="cb34-4"><a href="#cb34-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">id</span><span class="kw">:</span><span class="at"> </span><span class="dv">123</span></span> <span id="cb34-5"><a href="#cb34-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">link</span><span class="kw">:</span><span class="at"> enp5s0</span></span> <span id="cb34-6"><a href="#cb34-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">dhcp4</span><span class="kw">:</span><span class="at"> </span><span class="ch">yes</span></span></code></pre></div> <p>The specific settings for VLANs are defined below.</p> <ul> <li><p><strong>id</strong> (scalar)</p> <blockquote> <p>VLAN ID, a number between <code>0</code> and <code>4094</code>.</p> </blockquote></li> <li><p><strong>link</strong> (scalar)</p> <blockquote> <p>netplan ID of the underlying device definition on which this VLAN gets created.</p> </blockquote></li> </ul> <p>Example:</p> <div class="sourceCode" id="cb35"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb35-1"><a href="#cb35-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb35-2"><a href="#cb35-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">ethernets</span><span class="kw">:</span></span> <span id="cb35-3"><a href="#cb35-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">eno1</span><span class="kw">:</span><span class="at"> </span><span class="kw">{</span><span class="at">...</span><span class="kw">}</span></span> <span id="cb35-4"><a href="#cb35-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">vlans</span><span class="kw">:</span></span> <span id="cb35-5"><a href="#cb35-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">en-intra</span><span class="kw">:</span></span> <span id="cb35-6"><a href="#cb35-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">id</span><span class="kw">:</span><span class="at"> </span><span class="dv">1</span></span> <span id="cb35-7"><a href="#cb35-7" aria-hidden="true"></a><span class="at"> </span><span class="fu">link</span><span class="kw">:</span><span class="at"> eno1</span></span> <span id="cb35-8"><a href="#cb35-8" aria-hidden="true"></a><span class="at"> </span><span class="fu">dhcp4</span><span class="kw">:</span><span class="at"> </span><span class="ch">yes</span></span> <span id="cb35-9"><a href="#cb35-9" aria-hidden="true"></a><span class="at"> </span><span class="fu">en-vpn</span><span class="kw">:</span></span> <span id="cb35-10"><a href="#cb35-10" aria-hidden="true"></a><span class="at"> </span><span class="fu">id</span><span class="kw">:</span><span class="at"> </span><span class="dv">2</span></span> <span id="cb35-11"><a href="#cb35-11" aria-hidden="true"></a><span class="at"> </span><span class="fu">link</span><span class="kw">:</span><span class="at"> eno1</span></span> <span id="cb35-12"><a href="#cb35-12" aria-hidden="true"></a><span class="at"> </span><span class="fu">addresses</span><span class="kw">:</span><span class="at"> </span><span class="kw">[</span><span class="at">...</span><span class="kw">]</span></span></code></pre></div> <h2 id="properties-for-device-type-vrfs">Properties for device type <code>vrfs:</code></h2> <p><strong>Status</strong>: Optional.</p> <p><strong>Purpose</strong>: Use the <code>vrfs</code> key to create Virtual Routing and Forwarding (VRF) interfaces.</p> <p><strong>Structure</strong>: The key consists of a mapping of VRF interface names. The interface used in the <code>link</code> option (<code>enp5s0</code> in the example below) must also be defined in the Netplan configuration. The general configuration structure for VRFs is shown below.</p> <div class="sourceCode" id="cb36"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb36-1"><a href="#cb36-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb36-2"><a href="#cb36-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">renderer</span><span class="kw">:</span><span class="at"> networkd</span></span> <span id="cb36-3"><a href="#cb36-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">vrfs</span><span class="kw">:</span></span> <span id="cb36-4"><a href="#cb36-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">vrf1</span><span class="kw">:</span></span> <span id="cb36-5"><a href="#cb36-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">table</span><span class="kw">:</span><span class="at"> </span><span class="dv">1</span></span> <span id="cb36-6"><a href="#cb36-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">interfaces</span><span class="kw">:</span></span> <span id="cb36-7"><a href="#cb36-7" aria-hidden="true"></a><span class="at"> </span><span class="kw">-</span><span class="at"> enp5s0</span></span> <span id="cb36-8"><a href="#cb36-8" aria-hidden="true"></a><span class="at"> </span><span class="fu">routes</span><span class="kw">:</span></span> <span id="cb36-9"><a href="#cb36-9" aria-hidden="true"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">to</span><span class="kw">:</span><span class="at"> default</span></span> <span id="cb36-10"><a href="#cb36-10" aria-hidden="true"></a><span class="at"> </span><span class="fu">via</span><span class="kw">:</span><span class="at"> </span><span class="fl">10.10.10.4</span></span> <span id="cb36-11"><a href="#cb36-11" aria-hidden="true"></a><span class="at"> </span><span class="fu">routing-policy</span><span class="kw">:</span></span> <span id="cb36-12"><a href="#cb36-12" aria-hidden="true"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">from</span><span class="kw">:</span><span class="at"> </span><span class="fl">10.10.10.42</span></span></code></pre></div> <ul> <li><p><strong>table</strong> (scalar) – since <strong>0.105</strong></p> <blockquote> <p>The numeric routing table identifier. This setting is compulsory.</p> </blockquote></li> <li><p><strong>interfaces</strong> (sequence of scalars) – since <strong>0.105</strong></p> <blockquote> <p>All devices matching this ID list will be added to the VRF. This may be an empty list, in which case the VRF will be brought online with no member interfaces.</p> </blockquote></li> <li><p><strong>routes</strong> (sequence of mappings) – since <strong>0.105</strong></p> <blockquote> <p>Configure static routing for the device; see the <code>Routing</code> section. The <code>table</code> value is implicitly set to the VRF’s <code>table</code>.</p> </blockquote></li> <li><p><strong>routing-policy</strong> (sequence of mappings) – since <strong>0.105</strong></p> <blockquote> <p>Configure policy routing for the device; see the <code>Routing</code> section. The <code>table</code> value is implicitly set to the VRF’s <code>table</code>.</p> </blockquote></li> </ul> <p>Example:</p> <div class="sourceCode" id="cb37"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb37-1"><a href="#cb37-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb37-2"><a href="#cb37-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">vrfs</span><span class="kw">:</span></span> <span id="cb37-3"><a href="#cb37-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">vrf20</span><span class="kw">:</span></span> <span id="cb37-4"><a href="#cb37-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">table</span><span class="kw">:</span><span class="at"> </span><span class="dv">20</span></span> <span id="cb37-5"><a href="#cb37-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">interfaces</span><span class="kw">:</span><span class="at"> </span><span class="kw">[</span><span class="at"> br0 </span><span class="kw">]</span></span> <span id="cb37-6"><a href="#cb37-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">routes</span><span class="kw">:</span></span> <span id="cb37-7"><a href="#cb37-7" aria-hidden="true"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">to</span><span class="kw">:</span><span class="at"> default</span></span> <span id="cb37-8"><a href="#cb37-8" aria-hidden="true"></a><span class="at"> </span><span class="fu">via</span><span class="kw">:</span><span class="at"> </span><span class="fl">10.10.10.3</span></span> <span id="cb37-9"><a href="#cb37-9" aria-hidden="true"></a><span class="at"> </span><span class="fu">routing-policy</span><span class="kw">:</span></span> <span id="cb37-10"><a href="#cb37-10" aria-hidden="true"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">from</span><span class="kw">:</span><span class="at"> </span><span class="fl">10.10.10.42</span></span> <span id="cb37-11"><a href="#cb37-11" aria-hidden="true"></a><span class="at"> </span><span class="kw">[</span><span class="at">...</span><span class="kw">]</span></span> <span id="cb37-12"><a href="#cb37-12" aria-hidden="true"></a><span class="at"> </span><span class="fu">bridges</span><span class="kw">:</span></span> <span id="cb37-13"><a href="#cb37-13" aria-hidden="true"></a><span class="at"> </span><span class="fu">br0</span><span class="kw">:</span></span> <span id="cb37-14"><a href="#cb37-14" aria-hidden="true"></a><span class="at"> </span><span class="fu">interfaces</span><span class="kw">:</span><span class="at"> </span><span class="kw">[]</span></span></code></pre></div> <h2 id="properties-for-device-type-nm-devices">Properties for device type <code>nm-devices:</code></h2> <p><strong>Status</strong>: Optional. Its use is not recommended.</p> <p><strong>Purpose</strong>: Use the <code>nm-devices</code> key to configure device types that are not supported by Netplan. This is NetworkManager specific configuration.</p> <p><strong>Structure</strong>: The key consists of a mapping of NetworkManager connections. The <code>nm-devices</code> device type is for internal use only and should not be used in normal configuration files. It enables a fallback mode for unsupported settings, using the <code>passthrough</code> mapping. The general configuration structure for NM connections is shown below.</p> <div class="sourceCode" id="cb38"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb38-1"><a href="#cb38-1" aria-hidden="true"></a><span class="fu">network</span><span class="kw">:</span></span> <span id="cb38-2"><a href="#cb38-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">version</span><span class="kw">:</span><span class="at"> </span><span class="dv">2</span></span> <span id="cb38-3"><a href="#cb38-3" aria-hidden="true"></a><span class="at"> </span><span class="fu">nm-devices</span><span class="kw">:</span></span> <span id="cb38-4"><a href="#cb38-4" aria-hidden="true"></a><span class="at"> </span><span class="fu">NM-db5f0f67-1f4c-4d59-8ab8-3d278389cf87</span><span class="kw">:</span></span> <span id="cb38-5"><a href="#cb38-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">renderer</span><span class="kw">:</span><span class="at"> NetworkManager</span></span> <span id="cb38-6"><a href="#cb38-6" aria-hidden="true"></a><span class="at"> </span><span class="fu">networkmanager</span><span class="kw">:</span></span> <span id="cb38-7"><a href="#cb38-7" aria-hidden="true"></a><span class="at"> </span><span class="fu">uuid</span><span class="kw">:</span><span class="at"> </span><span class="st">"db5f0f67-1f4c-4d59-8ab8-3d278389cf87"</span></span> <span id="cb38-8"><a href="#cb38-8" aria-hidden="true"></a><span class="at"> </span><span class="fu">name</span><span class="kw">:</span><span class="at"> </span><span class="st">"myvpnconnection"</span></span> <span id="cb38-9"><a href="#cb38-9" aria-hidden="true"></a><span class="at"> </span><span class="fu">passthrough</span><span class="kw">:</span></span> <span id="cb38-10"><a href="#cb38-10" aria-hidden="true"></a><span class="at"> </span><span class="fu">connection.type</span><span class="kw">:</span><span class="at"> </span><span class="st">"vpn"</span></span> <span id="cb38-11"><a href="#cb38-11" aria-hidden="true"></a><span class="at"> </span><span class="fu">vpn.ca</span><span class="kw">:</span><span class="at"> </span><span class="st">"path to ca.crt"</span></span> <span id="cb38-12"><a href="#cb38-12" aria-hidden="true"></a><span class="at"> </span><span class="fu">vpn.cert</span><span class="kw">:</span><span class="at"> </span><span class="st">"path to client.crt"</span></span> <span id="cb38-13"><a href="#cb38-13" aria-hidden="true"></a><span class="at"> </span><span class="fu">vpn.cipher</span><span class="kw">:</span><span class="at"> </span><span class="st">"AES-256-GCM"</span></span> <span id="cb38-14"><a href="#cb38-14" aria-hidden="true"></a><span class="at"> </span><span class="fu">vpn.connection-type</span><span class="kw">:</span><span class="at"> </span><span class="st">"tls"</span></span> <span id="cb38-15"><a href="#cb38-15" aria-hidden="true"></a><span class="at"> </span><span class="fu">vpn.dev</span><span class="kw">:</span><span class="at"> </span><span class="st">"tun"</span></span> <span id="cb38-16"><a href="#cb38-16" aria-hidden="true"></a><span class="at"> </span><span class="fu">vpn.key</span><span class="kw">:</span><span class="at"> </span><span class="st">"path to client.key"</span></span> <span id="cb38-17"><a href="#cb38-17" aria-hidden="true"></a><span class="at"> </span><span class="fu">vpn.remote</span><span class="kw">:</span><span class="at"> </span><span class="st">"1.2.3.4:1194"</span></span> <span id="cb38-18"><a href="#cb38-18" aria-hidden="true"></a><span class="at"> </span><span class="fu">vpn.service-type</span><span class="kw">:</span><span class="at"> </span><span class="st">"org.freedesktop.NetworkManager.openvpn"</span></span></code></pre></div> <h2 id="backend-specific-configuration-parameters">Backend-specific configuration parameters</h2> <p>In addition to the other fields available to configure interfaces, some backends may require to record some of their own parameters in netplan, especially if the netplan definitions are generated automatically by the consumer of that backend. Currently, this is only used with <code>NetworkManager</code>.</p> <ul> <li><p><strong>networkmanager</strong> (mapping) – since <strong>0.99</strong></p> <blockquote> <p>Keeps the NetworkManager-specific configuration parameters used by the daemon to recognize connections.</p> </blockquote> <ul> <li><p><strong>name</strong> (scalar) – since <strong>0.99</strong></p> <blockquote> <p>Set the display name for the connection.</p> </blockquote></li> <li><p><strong>uuid</strong> (scalar) – since <strong>0.99</strong></p> <blockquote> <p>Defines the UUID (unique identifier) for this connection, as generated by NetworkManager itself.</p> </blockquote></li> <li><p><strong>stable-id</strong> (scalar) – since <strong>0.99</strong></p> <blockquote> <p>Defines the stable ID (a different form of a connection name) used by NetworkManager in case the name of the connection might otherwise change, such as when sharing connections between users.</p> </blockquote></li> <li><p><strong>device</strong> (scalar) – since <strong>0.99</strong></p> <blockquote> <p>Defines the interface name for which this connection applies.</p> </blockquote></li> <li><p><strong>passthrough</strong> (mapping) – since <strong>0.102</strong></p> <blockquote> <p>Can be used as a fallback mechanism to missing keyfile settings.</p> </blockquote></li> </ul></li> </ul> <!--- vim: ft=markdown --> </body> </html>