General structure

General structure

netplan’s configuration files use the
YAML format. All
/{lib,etc,run}/netplan/*.yaml 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 /run/netplan
completely shadows a file with same name in /etc/netplan, and a file in
either of those directories shadows a file with the same name in
/lib/netplan.

The top-level node in a netplan configuration file is a network: mapping
that contains version: 2 (the YAML currently being used by curtin, MaaS,
etc. is version 1), and then device definitions grouped by their type, such as
ethernets:, modems:, wifis:, or bridges:. These are the types that our
renderer can understand and are supported by our backends.

Each type block contains device definitions as a map where the keys (called
“configuration IDs”) are defined as below.

1 Like