.\" Automatically generated by Pandoc 2.2.1 .\" .TH "netplan" "5" "" "" "" .hy .SH NAME .PP netplan \- YAML network configuration abstraction for various backends .SH SYNOPSIS .PP \f[B]netplan\f[] [ \f[I]COMMAND\f[] | help ] .SH COMMANDS .PP See \f[B]netplan help\f[] for a list of available commands on this system. .SH DESCRIPTION .SS Introduction .PP Distribution installers, cloud instantiation, image builds for particular devices, or any other way to deploy an operating system put its desired network configuration into YAML configuration file(s). During early boot, the netplan \[lq]network renderer\[rq] runs which reads \f[C]/{lib,etc,run}/netplan/*.yaml\f[] and writes configuration to \f[C]/run\f[] to hand off control of devices to the specified networking daemon. .IP \[bu] 2 Configured devices get handled by systemd\-networkd by default, unless explicitly marked as managed by a specific renderer (NetworkManager) .IP \[bu] 2 Devices not covered by the network config do not get touched at all. .IP \[bu] 2 Usable in initramfs (few dependencies and fast) .IP \[bu] 2 No persistent generated config, only original YAML config .IP \[bu] 2 Parser supports multiple config files to allow applications like libvirt or lxd to package up expected network config (\f[C]virbr0\f[], \f[C]lxdbr0\f[]), or to change the global default policy to use NetworkManager for everything. .IP \[bu] 2 Retains the flexibility to change backends/policy later or adjust to removing NetworkManager, as generated configuration is ephemeral. .SS General structure .PP netplan's configuration files use the YAML (http://yaml.org/spec/1.1/current.html) format. All \f[C]/{lib,etc,run}/netplan/*.yaml\f[] are considered. Lexicographically later files (regardless of in which directory they are) amend (new mapping keys) or override (same mapping keys) previous ones. A file in \f[C]/run/netplan\f[] completely shadows a file with same name in \f[C]/etc/netplan\f[], and a file in either of those directories shadows a file with the same name in \f[C]/lib/netplan\f[]. .PP The top\-level node in a netplan configuration file is a \f[C]network:\f[] mapping that contains \f[C]version:\ 2\f[] (the YAML currently being used by curtin, MaaS, etc. is version 1), and then device definitions grouped by their type, such as \f[C]ethernets:\f[], \f[C]wifis:\f[], or \f[C]bridges:\f[]. These are the types that our renderer can understand and are supported by our backends. .PP Each type block contains device definitions as a map where the keys (called \[lq]configuration IDs\[rq]) are defined as below. .SS Device configuration IDs .PP The key names below the per\-device\-type definition maps (like \f[C]ethernets:\f[]) are called \[lq]ID\[rq]s. They must be unique throughout the entire set of configuration files. Their primary purpose is to serve as anchor names for composite devices, for example to enumerate the members of a bridge that is currently being defined. .PP There are two physically/structurally different classes of device definitions, and the ID field has a different interpretation for each: .TP .B Physical devices (Examples: ethernet, wifi) These can dynamically come and go between reboots and even during runtime (hotplugging). In the generic case, they can be selected by \f[C]match:\f[] rules on desired properties, such as name/name pattern, MAC address, driver, or device paths. In general these will match any number of devices (unless they refer to properties which are unique such as the full path or MAC address), so without further knowledge about the hardware these will always be considered as a group. .RS .PP It is valid to specify no match rules at all, in which case the ID field is simply the interface name to be matched. This is mostly useful if you want to keep simple cases simple, and it's how network device configuration has been done for a long time. .PP If there are \f[C]match\f[]: rules, then the ID field is a purely opaque name which is only being used for references from definitions of compound devices in the config. .RE .TP .B Virtual devices (Examples: veth, bridge, bond) These are fully under the control of the config file(s) and the network stack. I. e. these devices are being created instead of matched. Thus \f[C]match:\f[] and \f[C]set\-name:\f[] are not applicable for these, and the ID field is the name of the created virtual device. .RS .RE .SS Common properties for physical device types .TP .B \f[C]match\f[] (mapping) 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. \f[I]All\f[] specified properties must match. .RS .TP .B \f[C]name\f[] (scalar) 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 \f[C]match:\f[] at all and just using the ID (see above). Note that currently only networkd supports globbing, NetworkManager does not. .RS .RE .TP .B \f[C]macaddress\f[] (scalar) Device's MAC address in the form \[lq]XX:XX:XX:XX:XX:XX\[rq]. Globs are not allowed. .RS .RE .TP .B \f[C]driver\f[] (scalar) Kernel driver name, corresponding to the \f[C]DRIVER\f[] udev property. Globs are supported. Matching on driver is \f[I]only\f[] supported with networkd. .RS .RE .PP Examples: .IP \[bu] 2 all cards on second PCI bus: .RS 2 .IP .nf \f[C] \ match: \ \ \ name:\ enp2* \f[] .fi .RE .IP \[bu] 2 fixed MAC address: .RS 2 .IP .nf \f[C] \ match: \ \ \ macaddress:\ 11:22:33:AA:BB:FF \f[] .fi .RE .IP \[bu] 2 first card of driver \f[C]ixgbe\f[]: .RS 2 .IP .nf \f[C] \ match: \ \ \ driver:\ ixgbe \ \ \ name:\ en*s0 \f[] .fi .RE .RE .TP .B \f[C]set\-name\f[] (scalar) When matching on unique properties such as path or MAC, or with additional assumptions such as \[lq]there will only ever be one wifi device\[rq], 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). .RS .RE .TP .B \f[C]wakeonlan\f[] (bool) Enable wake on LAN. Off by default. .RS .RE .SS Common properties for all device types .TP .B \f[C]renderer\f[] (scalar) Use the given networking backend for this definition. Currently supported are \f[C]networkd\f[] and \f[C]NetworkManager\f[]. This property can be specified globally in \f[C]networks:\f[], for a device type (in e. g. \f[C]ethernets:\f[]) or for a particular device definition. Default is \f[C]networkd\f[]. .RS .RE .TP .B \f[C]dhcp4\f[] (bool) Enable DHCP for IPv4. Off by default. .RS .RE .TP .B \f[C]dhcp6\f[] (bool) 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. .RS .PP If you are in an IPv6\-only environment with completely stateless autoconfiguration (SLAAC with RDNSS), this option can be set to cause the interface to be brought up. (Setting accept\-ra alone is not sufficient.) Autoconfiguration will still honour the contents of the router advertisement and only use DHCP if requested in the RA. .PP Note that \f[B]\f[BC]rdnssd\f[B]\f[](8) is required to use RDNSS with networkd. No extra software is required for NetworkManager. .RE .TP .B \f[C]ipv6\-privacy\f[] (bool) 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. .RS .RE .TP .B \f[C]link\-local\f[] (sequence of scalars) 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. .RS .PP 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. .PP Example to enable only IPv4 link\-local: \f[C]link\-local:\ [\ ipv4\ ]\f[] Example to enable all link\-local addresses: \f[C]link\-local:\ [\ ipv4,\ ipv6\ ]\f[] Example to disable all link\-local addresses: \f[C]link\-local:\ [\ ]\f[] .RE .TP .B \f[C]critical\f[] (bool) (networkd backend only) Designate the connection as \[lq]critical to the system\[rq], meaning that special care will be taken by systemd\-networkd to not release the IP from DHCP when it the daemon is restarted. .RS .RE .TP .B \f[C]dhcp\-identifier\f[] (scalar) When set to `mac'; pass that setting over to systemd\-networkd to use the device's MAC address as a unique identifier rather than a RFC4361\-compliant Client ID. This has no effect when NetworkManager is used as a renderer. .RS .RE .TP .B \f[C]dhcp4\-overrides\f[] (mapping) (networkd backend only) Overrides default DHCP behavior; see the \f[C]DHCP\ Overrides\f[] section below. .RS .RE .TP .B \f[C]dhcp6\-overrides\f[] (mapping) (networkd backend only) Overrides default DHCP behavior; see the \f[C]DHCP\ Overrides\f[] section below. .RS .RE .TP .B \f[C]accept\-ra\f[] (bool) 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. .RS .RE .TP .B \f[C]addresses\f[] (sequence of scalars) 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 \f[C]addr/prefixlen\f[]. \f[C]addr\f[] is an IPv4 or IPv6 address as recognized by \f[B]\f[BC]inet_pton\f[B]\f[](3) and \f[C]prefixlen\f[] the number of bits of the subnet. .RS .PP 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. .PP Example: \f[C]addresses:\ [192.168.14.2/24,\ "2001:1::1/64"]\f[] .RE .TP .B \f[C]gateway4\f[], \f[C]gateway6\f[] (scalar) Set default gateway for IPv4/6, for manual address configuration. This requires setting \f[C]addresses\f[] too. Gateway IPs must be in a form recognized by \f[B]\f[BC]inet_pton\f[B]\f[](3). .RS .PP Example for IPv4: \f[C]gateway4:\ 172.16.0.1\f[] Example for IPv6: \f[C]gateway6:\ "2001:4::1"\f[] .RE .TP .B \f[C]nameservers\f[] (mapping) Set DNS servers and search domains, for manual address configuration. There are two supported fields: \f[C]addresses:\f[] is a list of IPv4 or IPv6 addresses similar to \f[C]gateway*\f[], and \f[C]search:\f[] is a list of search domains. .RS .PP Example: .IP .nf \f[C] ethernets: \ \ id0: \ \ \ \ [...] \ \ \ \ nameservers: \ \ \ \ \ \ search:\ [lab,\ home] \ \ \ \ \ \ addresses:\ [8.8.8.8,\ "FEDC::1"] \f[] .fi .RE .TP .B \f[C]macaddress\f[] (scalar) Set the device's MAC address. The MAC address must be in the form \[lq]XX:XX:XX:XX:XX:XX\[rq]. .RS .PP \f[B]Note:\f[] 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. .PP Example: .IP .nf \f[C] ethernets: \ \ id0: \ \ \ \ match: \ \ \ \ \ \ macaddress:\ 52:54:00:6b:3c:58 \ \ \ \ [...] \ \ \ \ macaddress:\ 52:54:00:6b:3c:59 \f[] .fi .RE .TP .B \f[C]mtu\f[] (scalar) Set the Maximum Transmission Unit for the interface. The default is 1500. Valid values depend on your network interface. .RS .PP \f[B]Note:\f[] 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. .RE .TP .B \f[C]optional\f[] (bool) 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 \f[I]only\f[] supported by networkd, and the default is false. .RS .PP Example: .IP .nf \f[C] ethernets: \ \ eth7: \ \ \ \ #\ this\ is\ plugged\ into\ a\ test\ network\ that\ is\ often \ \ \ \ #\ down\ \-\ don\[aq]t\ wait\ for\ it\ to\ come\ up\ during\ boot. \ \ \ \ dhcp4:\ true \ \ \ \ optional:\ true \f[] .fi .RE .TP .B \f[C]optional\-addresses\f[] (sequence of scalars) 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 \[lq]usable\[rq] sooner. This does not disable these addresses, which will be brought up anyway. .RS .PP Example: .IP .nf \f[C] ethernets: \ \ eth7: \ \ \ \ dhcp4:\ true \ \ \ \ dhcp6:\ true \ \ \ \ optional\-addresses:\ [\ ipv4\-ll,\ dhcp6\ ] \f[] .fi .RE .TP .B \f[C]routes\f[] (mapping) Configure static routing for the device; see the \f[C]Routing\f[] section below. .RS .RE .TP .B \f[C]routing\-policy\f[] (mapping) Configure policy routing for the device; see the \f[C]Routing\f[] section below. .RS .RE .SS DHCP Overrides .PP Several DHCP behavior overrides are available. Most currently only have any effect when using the \f[C]networkd\f[] backend, with the exception of \f[C]use\-routes\f[] and \f[C]route\-metric\f[]. .PP Overrides only have an effect if the corresponding \f[C]dhcp4\f[] or \f[C]dhcp6\f[] is set to \f[C]true\f[]. .PP If both \f[C]dhcp4\f[] and \f[C]dhcp6\f[] are \f[C]true\f[], the \f[C]networkd\f[] backend requires that \f[C]dhcp4\-overrides\f[] and \f[C]dhcp6\-overrides\f[] 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. .PP When using the NetworkManager backend, different values may be specified for \f[C]dhcp4\-overrides\f[] and \f[C]dhcp6\-overrides\f[], and will be applied to the DHCP client processes as specified in the netplan YAML. .PP : The \f[C]dhcp4\-overrides\f[] and \f[C]dhcp6\-overrides\f[] mappings override the default DHCP behavior. .IP .nf \f[C] \ ``use\-dns``\ (bool) \ :\ \ \ \ Default:\ ``true``.\ When\ ``true``,\ 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\ ``networkd`` \ \ \ \ \ \ backend. \ ``use\-ntp``\ (bool) \ :\ \ \ \ Default:\ ``true``.\ When\ ``true``,\ 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\ ``networkd``\ backend. \ ``send\-hostname``\ (bool) \ :\ \ \ \ Default:\ ``true``.\ When\ ``true``,\ the\ machine\[aq]s\ hostname\ will\ be\ sent \ \ \ \ \ \ to\ the\ DHCP\ server.\ Currently\ only\ has\ an\ effect\ on\ the\ ``networkd`` \ \ \ \ \ \ backend. \ ``use\-hostname``\ (bool) \ :\ \ \ \ Default:\ ``true``.\ When\ ``true``,\ the\ hostname\ received\ from\ the\ DHCP \ \ \ \ \ \ server\ will\ be\ set\ as\ the\ transient\ hostname\ of\ the\ system.\ Currently \ \ \ \ \ \ only\ has\ an\ effect\ on\ the\ ``networkd``\ backend. \ ``use\-mtu``\ (bool) \ :\ \ \ \ Default:\ ``true``.\ When\ ``true``,\ the\ MTU\ received\ from\ the\ DHCP \ \ \ \ \ \ server\ will\ be\ set\ as\ the\ MTU\ of\ the\ network\ interface.\ When\ ``false``, \ \ \ \ \ \ the\ MTU\ advertised\ by\ the\ DHCP\ server\ will\ be\ ignored.\ Currently\ only \ \ \ \ \ \ has\ an\ effect\ on\ the\ ``networkd``\ backend. \ ``hostname``\ (scalar) \ :\ \ \ \ Use\ this\ value\ for\ the\ hostname\ which\ is\ sent\ to\ the\ DHCP\ server, \ \ \ \ \ \ instead\ of\ machine\[aq]s\ hostname.\ Currently\ only\ has\ an\ effect\ on\ the \ \ \ \ \ \ ``networkd``\ backend. \ ``use\-routes``\ (bool) \ :\ \ \ \ Default:\ ``true``.\ When\ ``true``,\ the\ routes\ received\ from\ the\ DHCP \ \ \ \ \ \ server\ will\ be\ installed\ in\ the\ routing\ table\ normally.\ When\ set\ to \ \ \ \ \ \ ``false``,\ 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\ ``networkd``\ and\ ``NetworkManager``\ backends. \ ``route\-metric``\ (scalar) \ :\ \ \ \ Use\ this\ value\ for\ default\ metric\ for\ automatically\-added\ routes. \ \ \ \ \ \ Use\ this\ to\ prioritize\ routes\ for\ devices\ by\ setting\ a\ higher\ metric \ \ \ \ \ \ on\ a\ preferred\ interface.\ Available\ for\ both\ the\ ``networkd``\ and \ \ \ \ \ \ ``NetworkManager``\ backends. \f[] .fi .SS Routing .PP Complex routing is possible with netplan. Standard static routes as well as policy routing using routing tables are supported via the \f[C]networkd\f[] backend. .PP These options are available for all types of interfaces. .TP .B \f[C]routes\f[] (mapping) The \f[C]routes\f[] block defines standard static routes for an interface. At least \f[C]to\f[] and \f[C]via\f[] must be specified. .RS .PP For \f[C]from\f[], \f[C]to\f[], and \f[C]via\f[], both IPv4 and IPv6 addresses are recognized, and must be in the form \f[C]addr/prefixlen\f[] or \f[C]addr\f[]. .TP .B \f[C]from\f[] (scalar) Set a source IP address for traffic going through the route. .RS .RE .TP .B \f[C]to\f[] (scalar) Destination address for the route. .RS .RE .TP .B \f[C]via\f[] (scalar) Address to the gateway to use for this route. .RS .RE .TP .B \f[C]on\-link\f[] (bool) When set to \[lq]true\[rq], specifies that the route is directly connected to the interface. .RS .RE .TP .B \f[C]metric\f[] (scalar) The relative priority of the route. Must be a positive integer value. .RS .RE .TP .B \f[C]type\f[] (scalar) The type of route. Valid options are \[lq]unicast\[rq] (default), \[lq]unreachable\[rq], \[lq]blackhole\[rq] or \[lq]prohibit\[rq]. .RS .RE .TP .B \f[C]scope\f[] (scalar) The route scope, how wide\-ranging it is to the network. Possible values are \[lq]global\[rq], \[lq]link\[rq], or \[lq]host\[rq]. .RS .RE .TP .B \f[C]table\f[] (scalar) 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 \f[C]table\f[] parameter. Allowed values are positive integers starting from 1. Some values are already in use to refer to specific routing tables: see \f[C]/etc/iproute2/rt_tables\f[]. .RS .RE .RE .TP .B \f[C]routing\-policy\f[] (mapping) The \f[C]routing\-policy\f[] block defines extra routing policy for a network, where traffic may be handled specially based on the source IP, firewall marking, etc. .RS .PP For \f[C]from\f[], \f[C]to\f[], both IPv4 and IPv6 addresses are recognized, and must be in the form \f[C]addr/prefixlen\f[] or \f[C]addr\f[]. .TP .B \f[C]from\f[] (scalar) Set a source IP address to match traffic for this policy rule. .RS .RE .TP .B \f[C]to\f[] (scalar) Match on traffic going to the specified destination. .RS .RE .TP .B \f[C]table\f[] (scalar) 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 \f[C]table\f[] parameter. Allowed values are positive integers starting from 1. Some values are already in use to refer to specific routing tables: see \f[C]/etc/iproute2/rt_tables\f[]. .RS .RE .TP .B \f[C]priority\f[] (scalar) 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. .RS .RE .TP .B \f[C]mark\f[] (scalar) 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. .RS .RE .TP .B \f[C]type\-of\-service\f[] (scalar) Match this policy rule based on the type of service number applied to the traffic. .RS .RE .RE .SS Authentication .PP Netplan supports advanced authentication settings for ethernet and wifi interfaces, as well as individual wifi networks, by means of the \f[C]auth\f[] block. .TP .B \f[C]auth\f[] (mapping) Specifies authentication settings for a device of type \f[C]ethernets:\f[], or an \f[C]access\-points:\f[] entry on a \f[C]wifis:\f[] device. .RS .PP The \f[C]auth\f[] block supports the following properties: .TP .B \f[C]key\-management\f[] (scalar) The supported key management modes are \f[C]none\f[] (no key management); \f[C]psk\f[] (WPA with pre\-shared key, common for home wifi); \f[C]eap\f[] (WPA with EAP, common for enterprise wifi); and \f[C]802.1x\f[] (used primarily for wired Ethernet connections). .RS .RE .TP .B \f[C]password\f[] (scalar) The password string for EAP, or the pre\-shared key for WPA\-PSK. .RS .RE .PP The following properties can be used if \f[C]key\-management\f[] is \f[C]eap\f[] or \f[C]802.1x\f[]: .TP .B \f[C]method\f[] (scalar) The EAP method to use. The supported EAP methods are \f[C]tls\f[] (TLS), \f[C]peap\f[] (Protected EAP), and \f[C]ttls\f[] (Tunneled TLS). .RS .RE .TP .B \f[C]identity\f[] (scalar) The identity to use for EAP. .RS .RE .TP .B \f[C]anonymous\-identity\f[] (scalar) The identity to pass over the unencrypted channel if the chosen EAP method supports passing a different tunnelled identity. .RS .RE .TP .B \f[C]ca\-certificate\f[] (scalar) Path to a file with one or more trusted certificate authority (CA) certificates. .RS .RE .TP .B \f[C]client\-certificate\f[] (scalar) Path to a file containing the certificate to be used by the client during authentication. .RS .RE .TP .B \f[C]client\-key\f[] (scalar) Path to a file containing the private key corresponding to \f[C]client\-certificate\f[]. .RS .RE .TP .B \f[C]client\-key\-password\f[] (scalar) Password to use to decrypt the private key specified in \f[C]client\-key\f[] if it is encrypted. .RS .RE .RE .SS Properties for device type \f[C]ethernets:\f[] .PP Ethernet device definitions do not support any specific properties beyond the common ones described above. .SS Properties for device type \f[C]wifis:\f[] .PP Note that \f[C]systemd\-networkd\f[] does not natively support wifi, so you need wpasupplicant installed if you let the \f[C]networkd\f[] renderer handle wifi. .TP .B \f[C]access\-points\f[] (mapping) 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: .RS .TP .B \f[C]password\f[] (scalar) Enable WPA2 authentication and set the passphrase for it. If neither this nor an \f[C]auth\f[] block are given, the network is assumed to be open. The setting .RS .IP .nf \f[C] \ \ password:\ "S3kr1t" \f[] .fi .PP is equivalent to .IP .nf \f[C] \ \ auth: \ \ \ \ key\-management:\ psk \ \ \ \ password:\ "S3kr1t" \f[] .fi .RE .TP .B \f[C]mode\f[] (scalar) Possible access point modes are \f[C]infrastructure\f[] (the default), \f[C]ap\f[] (create an access point to which other devices can connect), and \f[C]adhoc\f[] (peer to peer networks without a central access point). \f[C]ap\f[] is only supported with NetworkManager. .RS .RE .RE .SS Properties for device type \f[C]bridges:\f[] .TP .B \f[C]interfaces\f[] (sequence of scalars) 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. .RS .PP Example: .IP .nf \f[C] \ \ ethernets: \ \ \ \ switchports: \ \ \ \ \ \ match:\ {name:\ "enp2*"} \ \ [...] \ \ bridges: \ \ \ \ br0: \ \ \ \ \ \ interfaces:\ [switchports] \f[] .fi .RE .TP .B \f[C]parameters\f[] (mapping) 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 \[lq]s\[rq] for seconds, \[lq]ms\[rq] for milliseconds) to allow for more control over its behavior. .RS .TP .B \f[C]ageing\-time\f[] (scalar) 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. .RS .RE .TP .B \f[C]priority\f[] (scalar) Set the priority value for the bridge. This value should be a number between \f[C]0\f[] and \f[C]65535\f[]. Lower values mean higher priority. The bridge with the higher priority will be elected as the root bridge. .RS .RE .TP .B \f[C]port\-priority\f[] (scalar) Set the port priority to . The priority value is a number between \f[C]0\f[] and \f[C]63\f[]. This metric is used in the designated port and root port selection algorithms. .RS .RE .TP .B \f[C]forward\-delay\f[] (scalar) 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. .RS .RE .TP .B \f[C]hello\-time\f[] (scalar) 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. .RS .RE .TP .B \f[C]max\-age\f[] (scalar) 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. .RS .RE .TP .B \f[C]path\-cost\f[] (scalar) Set the 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. .RS .RE .TP .B \f[C]stp\f[] (bool) Define whether the bridge should use Spanning Tree Protocol. The default value is \[lq]true\[rq], which means that Spanning Tree should be used. .RS .RE .RE .SS Properties for device type \f[C]bonds:\f[] .TP .B \f[C]interfaces\f[] (sequence of scalars) All devices matching this ID list will be added to the bond. .RS .PP Example: .IP .nf \f[C] \ \ ethernets: \ \ \ \ switchports: \ \ \ \ \ \ match:\ {name:\ "enp2*"} \ \ [...] \ \ bonds: \ \ \ \ bond0: \ \ \ \ \ \ interfaces:\ [switchports] \f[] .fi .RE .TP .B \f[C]parameters\f[] (mapping) 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 \[lq]s\[rq] for seconds, \[lq]ms\[rq] for milliseconds) to allow for more control over its behavior. .RS .TP .B \f[C]mode\f[] (scalar) Set the bonding mode used for the interfaces. The default is \f[C]balance\-rr\f[] (round robin). Possible values are \f[C]balance\-rr\f[], \f[C]active\-backup\f[], \f[C]balance\-xor\f[], \f[C]broadcast\f[], \f[C]802.3ad\f[], \f[C]balance\-tlb\f[], and \f[C]balance\-alb\f[]. .RS .RE .TP .B \f[C]lacp\-rate\f[] (scalar) Set the rate at which LACPDUs are transmitted. This is only useful in 802.3ad mode. Possible values are \f[C]slow\f[] (30 seconds, default), and \f[C]fast\f[] (every second). .RS .RE .TP .B \f[C]mii\-monitor\-interval\f[] (scalar) Specifies the interval for MII monitoring (verifying if an interface of the bond has carrier). The default is \f[C]0\f[]; 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. .RS .RE .TP .B \f[C]min\-links\f[] (scalar) The minimum number of links up in a bond to consider the bond interface to be up. .RS .RE .TP .B \f[C]transmit\-hash\-policy\f[] (scalar) Specifies the transmit hash policy for the selection of slaves. This is only useful in balance\-xor, 802.3ad and balance\-tlb modes. Possible values are \f[C]layer2\f[], \f[C]layer3+4\f[], \f[C]layer2+3\f[], \f[C]encap2+3\f[], and \f[C]encap3+4\f[]. .RS .RE .TP .B \f[C]ad\-select\f[] (scalar) Set the aggregation selection mode. Possible values are \f[C]stable\f[], \f[C]bandwidth\f[], and \f[C]count\f[]. This option is only used in 802.3ad mode. .RS .RE .TP .B \f[C]all\-slaves\-active\f[] (bool) If the bond should drop duplicate frames received on inactive ports, set this option to \f[C]false\f[]. If they should be delivered, set this option to \f[C]true\f[]. The default value is false, and is the desirable behavior in most situations. .RS .RE .TP .B \f[C]arp\-interval\f[] (scalar) Set the interval value for how frequently ARP link monitoring should happen. The default value is \f[C]0\f[], 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. .RS .RE .TP .B \f[C]arp\-ip\-targets\f[] (sequence of scalars) IPs of other hosts on the link which should be sent ARP requests in order to validate that a slave is up. This option is only used when \f[C]arp\-interval\f[] is set to a value other than \f[C]0\f[]. 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. .RS .RE .TP .B \f[C]arp\-validate\f[] (scalar) Configure how ARP replies are to be validated when using ARP link monitoring. Possible values are \f[C]none\f[], \f[C]active\f[], \f[C]backup\f[], and \f[C]all\f[]. .RS .RE .TP .B \f[C]arp\-all\-targets\f[] (scalar) Specify whether to use any ARP IP target being up as sufficient for a slave to be considered up; or if all the targets must be up. This is only used for \f[C]active\-backup\f[] mode when \f[C]arp\-validate\f[] is enabled. Possible values are \f[C]any\f[] and \f[C]all\f[]. .RS .RE .TP .B \f[C]up\-delay\f[] (scalar) Specify the delay before enabling a link once the link is physically up. The default value is \f[C]0\f[]. This maps to the UpDelaySec= property for the networkd renderer. If no time suffix is specified, the value will be interpreted as milliseconds. .RS .RE .TP .B \f[C]down\-delay\f[] (scalar) Specify the delay before disabling a link once the link has been lost. The default value is \f[C]0\f[]. This maps to the DownDelaySec= property for the networkd renderer. If no time suffix is specified, the value will be interpreted as milliseconds. .RS .RE .TP .B \f[C]fail\-over\-mac\-policy\f[] (scalar) Set whether to set all slaves to the same MAC address when adding them to the bond, or how else the system should handle MAC addresses. The possible values are \f[C]none\f[], \f[C]active\f[], and \f[C]follow\f[]. .RS .RE .TP .B \f[C]gratuitous\-arp\f[] (scalar) Specify how many ARP packets to send after failover. Once a link is up on a new slave, a notification is sent and possibly repeated if this value is set to a number greater than \f[C]1\f[]. The default value is \f[C]1\f[] and valid values are between \f[C]1\f[] and \f[C]255\f[]. This only affects \f[C]active\-backup\f[] mode. .RS .PP For historical reasons, the misspelling \f[C]gratuitious\-arp\f[] is also accepted and has the same function. .RE .TP .B \f[C]packets\-per\-slave\f[] (scalar) In \f[C]balance\-rr\f[] mode, specifies the number of packets to transmit on a slave before switching to the next. When this value is set to \f[C]0\f[], slaves are chosen at random. Allowable values are between \f[C]0\f[] and \f[C]65535\f[]. The default value is \f[C]1\f[]. This setting is only used in \f[C]balance\-rr\f[] mode. .RS .RE .TP .B \f[C]primary\-reselect\-policy\f[] (scalar) Set the reselection policy for the primary slave. On failure of the active slave, the system will use this policy to decide how the new active slave will be chosen and how recovery will be handled. The possible values are \f[C]always\f[], \f[C]better\f[], and \f[C]failure\f[]. .RS .RE .TP .B \f[C]resend\-igmp\f[] (scalar) In modes \f[C]balance\-rr\f[], \f[C]active\-backup\f[], \f[C]balance\-tlb\f[] and \f[C]balance\-alb\f[], a failover can switch IGMP traffic from one slave to another. .RS .PP 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. .RE .TP .B \f[C]learn\-packet\-interval\f[] (scalar) Specify the interval between sending learning packets to each slave. The value range is between \f[C]1\f[] and \f[C]0x7fffffff\f[]. The default value is \f[C]1\f[]. This option only affects \f[C]balance\-tlb\f[] and \f[C]balance\-alb\f[] 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. .RS .RE .TP .B \f[C]primary\f[] (scalar) Specify a device to be used as a primary slave, or preferred device to use as a slave for the bond (ie. the preferred device to send data through), whenever it is available. This only affects \f[C]active\-backup\f[], \f[C]balance\-alb\f[], and \f[C]balance\-tlb\f[] modes. .RS .RE .RE .SS Properties for device type \f[C]tunnels:\f[] .PP 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 \[lq]connect\[rq] separate local networks. Please see https://en.wikipedia.org/wiki/Tunneling_protocol for more general information about tunnels. .TP .B \f[C]mode\f[] (scalar) Defines the tunnel mode. Valid options are \f[C]sit\f[], \f[C]gre\f[], \f[C]ip6gre\f[], \f[C]ipip\f[], \f[C]ipip6\f[], \f[C]ip6ip6\f[], \f[C]vti\f[], and \f[C]vti6\f[]. Additionally, the \f[C]networkd\f[] backend also supports \f[C]gretap\f[] and \f[C]ip6gretap\f[] modes. In addition, the \f[C]NetworkManager\f[] backend supports \f[C]isatap\f[] tunnels. .RS .RE .TP .B \f[C]local\f[] (scalar) Defines the address of the local endpoint of the tunnel. .RS .RE .TP .B \f[C]remote\f[] (scalar) Defines the address of the remote endpoint of the tunnel. .RS .RE .TP .B \f[C]key\f[] (scalar or mapping) Define keys to use for the tunnel. The key can be a number or a dotted quad (an IPv4 address). It is used for identification of IP transforms. This is only required for \f[C]vti\f[] and \f[C]vti6\f[] when using the networkd backend, and for \f[C]gre\f[] or \f[C]ip6gre\f[] tunnels when using the NetworkManager backend. .RS .PP This field may be used as a scalar (meaning that a single key is specified and to be used for both input and output key), or as a mapping, where you can then further specify \f[C]input\f[] and \f[C]output\f[]. .TP .B \f[C]input\f[] (scalar) The input key for the tunnel .RS .RE .TP .B \f[C]output\f[] (scalar) The output key for the tunnel .RS .RE .RE .PP Examples: .IP .nf \f[C] tunnels: \ \ tun0: \ \ \ \ mode:\ gre \ \ \ \ local:\ ... \ \ \ \ remote:\ ... \ \ \ \ keys: \ \ \ \ \ \ input:\ 1234 \ \ \ \ \ \ output:\ 5678 tunnels: \ \ tun0: \ \ \ \ mode:\ vti6 \ \ \ \ local:\ ... \ \ \ \ remote:\ ... \ \ \ \ key:\ 59568549 \f[] .fi .TP .B \f[C]keys\f[] (scalar or mapping) Alternate name for the \f[C]key\f[] field. See above. .RS .RE .SS Properties for device type \f[C]vlans:\f[] .TP .B \f[C]id\f[] (scalar) VLAN ID, a number between 0 and 4094. .RS .RE .TP .B \f[C]link\f[] (scalar) netplan ID of the underlying device definition on which this VLAN gets created. .RS .RE .PP Example: .IP .nf \f[C] ethernets: \ \ eno1:\ {...} vlans: \ \ en\-intra: \ \ \ \ id:\ 1 \ \ \ \ link:\ eno1 \ \ \ \ dhcp4:\ yes \ \ en\-vpn: \ \ \ \ id:\ 2 \ \ \ \ link:\ eno1 \ \ \ \ address:\ ... \f[] .fi .SS Examples .PP Configure an ethernet device with networkd, identified by its name, and enable DHCP: .IP .nf \f[C] network: \ \ version:\ 2 \ \ ethernets: \ \ \ \ eno1: \ \ \ \ \ \ dhcp4:\ true \f[] .fi .PP This is an example of a static\-configured interface with multiple IPv4 addresses and multiple gateways with networkd, with equal route metric levels, and static DNS nameservers (Google DNS for this example): .IP .nf \f[C] network: \ \ version:\ 2 \ \ renderer:\ networkd \ \ ethernets: \ \ \ \ eno1: \ \ \ \ \ \ addresses: \ \ \ \ \ \ \-\ 10.0.0.10/24 \ \ \ \ \ \ \-\ 11.0.0.11/24 \ \ \ \ \ \ nameservers: \ \ \ \ \ \ \ \ addresses: \ \ \ \ \ \ \ \ \ \ \-\ 8.8.8.8 \ \ \ \ \ \ \ \ \ \ \-\ 8.8.4.4 \ \ \ \ \ \ routes: \ \ \ \ \ \ \-\ to:\ 0.0.0.0/0 \ \ \ \ \ \ \ \ via:\ 10.0.0.1 \ \ \ \ \ \ \ \ metric:\ 100 \ \ \ \ \ \ \-\ to:\ 0.0.0.0/0 \ \ \ \ \ \ \ \ via:\ 11.0.0.1 \ \ \ \ \ \ \ \ metric:\ 100 \f[] .fi .PP This is a complex example which shows most available features: .IP .nf \f[C] network: \ \ version:\ 2 \ \ #\ if\ specified,\ can\ only\ realistically\ have\ that\ value,\ as\ networkd\ cannot \ \ #\ render\ wifi/3G. \ \ renderer:\ NetworkManager \ \ ethernets: \ \ \ \ #\ opaque\ ID\ for\ physical\ interfaces,\ only\ referred\ to\ by\ other\ stanzas \ \ \ \ id0: \ \ \ \ \ \ match: \ \ \ \ \ \ \ \ macaddress:\ 00:11:22:33:44:55 \ \ \ \ \ \ wakeonlan:\ true \ \ \ \ \ \ dhcp4:\ true \ \ \ \ \ \ addresses: \ \ \ \ \ \ \ \ \-\ 192.168.14.2/24 \ \ \ \ \ \ \ \ \-\ 192.168.14.3/24 \ \ \ \ \ \ \ \ \-\ "2001:1::1/64" \ \ \ \ \ \ gateway4:\ 192.168.14.1 \ \ \ \ \ \ gateway6:\ "2001:1::2" \ \ \ \ \ \ nameservers: \ \ \ \ \ \ \ \ search:\ [foo.local,\ bar.local] \ \ \ \ \ \ \ \ addresses:\ [8.8.8.8] \ \ \ \ \ \ routes: \ \ \ \ \ \ \ \ \-\ to:\ 0.0.0.0/0 \ \ \ \ \ \ \ \ \ \ via:\ 11.0.0.1 \ \ \ \ \ \ \ \ \ \ table:\ 70 \ \ \ \ \ \ \ \ \ \ on\-link:\ true \ \ \ \ \ \ \ \ \ \ metric:\ 3 \ \ \ \ \ \ routing\-policy: \ \ \ \ \ \ \ \ \-\ to:\ 10.0.0.0/8 \ \ \ \ \ \ \ \ \ \ from:\ 192.168.14.2/24 \ \ \ \ \ \ \ \ \ \ table:\ 70 \ \ \ \ \ \ \ \ \ \ priority:\ 100 \ \ \ \ \ \ \ \ \-\ to:\ 20.0.0.0/8 \ \ \ \ \ \ \ \ \ \ from:\ 192.168.14.3/24 \ \ \ \ \ \ \ \ \ \ table:\ 70 \ \ \ \ \ \ \ \ \ \ priority:\ 50 \ \ \ \ \ \ #\ only\ networkd\ can\ render\ on\-link\ routes\ and\ routing\ policies \ \ \ \ \ \ renderer:\ networkd \ \ \ \ lom: \ \ \ \ \ \ match: \ \ \ \ \ \ \ \ driver:\ ixgbe \ \ \ \ \ \ #\ you\ are\ responsible\ for\ setting\ tight\ enough\ match\ rules \ \ \ \ \ \ #\ that\ only\ match\ one\ device\ if\ you\ use\ set\-name \ \ \ \ \ \ set\-name:\ lom1 \ \ \ \ \ \ dhcp6:\ true \ \ \ \ switchports: \ \ \ \ \ \ #\ all\ cards\ on\ second\ PCI\ bus\ unconfigured\ by \ \ \ \ \ \ #\ themselves,\ will\ be\ added\ to\ br0\ below \ \ \ \ \ \ #\ note:\ globbing\ is\ not\ supported\ by\ NetworkManager \ \ \ \ \ \ match: \ \ \ \ \ \ \ \ name:\ enp2* \ \ \ \ \ \ mtu:\ 1280 \ \ wifis: \ \ \ \ all\-wlans: \ \ \ \ \ \ #\ useful\ on\ a\ system\ where\ you\ know\ there\ is \ \ \ \ \ \ #\ only\ ever\ going\ to\ be\ one\ device \ \ \ \ \ \ match:\ {} \ \ \ \ \ \ access\-points: \ \ \ \ \ \ \ \ "Joe\[aq]s\ home": \ \ \ \ \ \ \ \ \ \ #\ mode\ defaults\ to\ "infrastructure"\ (client) \ \ \ \ \ \ \ \ \ \ password:\ "s3kr1t" \ \ \ \ #\ this\ creates\ an\ AP\ on\ wlp1s0\ using\ hostapd \ \ \ \ #\ no\ match\ rules,\ thus\ the\ ID\ is\ the\ interface\ name \ \ \ \ wlp1s0: \ \ \ \ \ \ access\-points: \ \ \ \ \ \ \ \ "guest": \ \ \ \ \ \ \ \ \ \ \ mode:\ ap \ \ \ \ \ \ \ \ \ \ \ #\ no\ WPA\ config\ implies\ default\ of\ open \ \ bridges: \ \ \ \ #\ the\ key\ name\ is\ the\ name\ for\ virtual\ (created)\ interfaces \ \ \ \ #\ no\ match:\ and\ set\-name:\ allowed \ \ \ \ br0: \ \ \ \ \ \ #\ IDs\ of\ the\ components;\ switchports\ expands\ into\ multiple\ interfaces \ \ \ \ \ \ interfaces:\ [wlp1s0,\ switchports] \ \ \ \ \ \ dhcp4:\ true \f[] .fi .SH SEE ALSO .PP \f[B]netplan\-generate\f[](8), \f[B]netplan\-apply\f[](8), \f[B]netplan\-try\f[](8), \f[B]systemd\-networkd\f[](8), \f[B]NetworkManager\f[](8) .SH AUTHORS Mathieu Trudel\-Lapierre (); Martin Pitt ().