summaryrefslogtreecommitdiff
path: root/doc/rtd/topics/network-config-format-v2.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/rtd/topics/network-config-format-v2.rst')
-rw-r--r--doc/rtd/topics/network-config-format-v2.rst42
1 files changed, 28 insertions, 14 deletions
diff --git a/doc/rtd/topics/network-config-format-v2.rst b/doc/rtd/topics/network-config-format-v2.rst
index aa17bef5..c1bf05d1 100644
--- a/doc/rtd/topics/network-config-format-v2.rst
+++ b/doc/rtd/topics/network-config-format-v2.rst
@@ -8,9 +8,25 @@ version 2 format defined for the `netplan`_ tool. Cloud-init supports
both reading and writing of Version 2; the latter support requires a
distro with `netplan`_ present.
+Netplan Passthrough
+-------------------
+
+On a system with netplan present, cloud-init will pass Version 2 configuration
+through to netplan without modification. On such systems, you do not need to
+limit yourself to the below subset of netplan's configuration format.
+
+.. warning::
+ If you are writing or generating network configuration that may be used on
+ non-netplan systems, you **must** limit yourself to the subset described in
+ this document, or you will see network configuration failures on
+ non-netplan systems.
+
+Version 2 Configuration Format
+------------------------------
+
The ``network`` key has at least two required elements. First
it must include ``version: 2`` and one or more of possible device
-``types``..
+``types``.
Cloud-init will read this format from system config.
For example the following could be present in
@@ -34,9 +50,6 @@ Each type block contains device definitions as a map where the keys (called
"configuration IDs"). Each entry under the ``types`` may include IP and/or
device configuration.
-Cloud-init does not current support ``wifis`` type that is present in native
-`netplan`_.
-
Device configuration IDs
------------------------
@@ -94,7 +107,8 @@ NetworkManager does not.
**macaddress**: *<(scalar)>*
-Device's MAC address in the form XX:XX:XX:XX:XX:XX. Globs are not allowed.
+Device's MAC address in the form xx:xx:xx:xx:xx:xx. Globs are not allowed.
+Letters must be lowercase.
.. note::
@@ -118,7 +132,7 @@ supported. Matching on driver is *only* supported with networkd.
# fixed MAC address
match:
- macaddress: 11:22:33:AA:BB:FF
+ macaddress: 11:22:33:aa:bb:ff
# first card of driver ``ixgbe``
match:
@@ -478,6 +492,11 @@ This is a complex example which shows most available features: ::
nameservers:
search: [foo.local, bar.local]
addresses: [8.8.8.8]
+ # static routes
+ routes:
+ - to: 192.0.2.0/24
+ via: 11.0.0.1
+ metric: 3
lom:
match:
driver: ixgbe
@@ -506,11 +525,6 @@ This is a complex example which shows most available features: ::
id: 1
link: id0
dhcp4: yes
- # static routes
- routes:
- - to: 0.0.0.0/0
- via: 11.0.0.1
- metric: 3
-
-.. _netplan: https://launchpad.net/netplan
-.. vi: textwidth=78
+
+.. _netplan: https://netplan.io
+.. vi: textwidth=79