Netplan

14/07/2022

Ubuntu netplan

To configure netplan, save configuration files under /etc/netplan/ with a .yaml
To test and save configuration

netplan generate
netplan apply

Example

DCHP

network:
    version: 2
    renderer: networkd
    ethernets:
        enp3s0:
            dhcp4: true

Static IP

network:
    version: 2
    renderer: networkd
    ethernets:
        enp3s0:
            addresses:
                - 10.10.10.2/24
            nameservers:
                addresses:
                    - 10.10.10.1, 
                    - 1.1.1.1
            routes:
                - to: default
                  via: 10.10.10.1

For more example see Documentation

🎉 Happy networking