# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled} network:
network:
ethernets:
eno1:
addresses:
- 10.10.6.50/24
dhcp4: false
gateway4: 10.10.6.1
nameservers:
addresses:
- 8.8.8.8
- 8.8.4.4
search: []
enp3s2:
dhcp4: false
bridges:
br0:
dhcp4: false
interfaces:
- enp3s2
addresses:
- 10.10.7.50/24
version: 2
when i run sudo netplan apply
gives below error
Invalid YAML at //etc/netplan/50-cloud-init.yaml line 17 column 2: did
not find expected key
All I wanted is to create a working bridged network but stuck with yaml, can someone help..
Best Answer
Some suggestions:
1) "version: 2" must be idented on same level of "ethernets". I used to add it as the first line after network:
2) add "dhcp6: false" on both configs (eno1 and br0)