I've been scratching my head the whole day. I have the following netplan yaml file: (with mac address & ip addresses masked out for privacy)
network: version: 2 renderer: networkd ethernets: enp2s0: match: macaddress: "aa:bb:cc:dd:ee:ff" set-name: enp2s0 dhcp4: no addresses: [ "10.9.8.7/24" ] routes: - to: 0.0.0.0/0 via: 10.9.8.8 metric: 254 table: 253 vlans: vlan202: link: enp2s0 id: 202 addresses: [ 75.xxx.yyy.zzz/24 ] nameservers: addresses: [ 75.xxx.yyy.111, 126.96.36.199 ] search: [ example.org, example.com ] routes: - to: 0.0.0.0/0 via: 75.xxx.yyy.100 metric: 200 table: 253
then I ran the command
netplan try, make sure it doesn't have any errors then
netplan generate. I then checked in /etc/systemd/network, it was empty, and I checked in /run/systemd/network, it has 2 files:
[Match] MACAddress=aa:bb:cc:dd:ee:ff [Link] Name=enp2s0 WakeOnLan=off
[Match] MACAddress=aa:bb:cc:dd:ee:ff Name=enp2s0 [Network] DHCP=ipv4 LinkLocalAddressing=ipv6 DNS=10.9.8.8 Domains=lan [DHCP] UseMTU=true RouteMetric=100 ClientIdentifier=mac CriticalConnection=true
I though maybe it'll regenerate when I reboot the system, so I did, but the systemd config files still the same and complete ignore my custom settings. Am I doing something wrong or netplan is just a complete piece of garbage? that I should just go back to ifupdown?