Netplan

# cat /etc/netplan/01-netcfg.yaml
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: yes
    eth1:
      dhcp4: no
      addresses: [10.0.1.123/24]
      gateway4: 10.0.1.254
      nameservers:
        addresses: [10.0.1.1,8.8.8.8]
        search: [example.com, dev]
 
########################################
 
# enable dhcp on all interfaces
# /etc/netplan/01-netcfg.yaml
network:
  version: 2
  renderer: networkd
  ethernets:
    all:
      match:
        name: e*
      dhcp4: yes
 
 
########################################
network:
  version: 2
  renderer: networkd
 
  ethernets:
    eno1:
      dhcp4: no
    eno2:
      dhcp4: no
    eno3:
      dhcp4: no
    eno4:
      dhcp4: no
 
  vlans:
    170:
      accept-ra: no
      id: 170
      link: eno4
 
  bonds:
    bond0:
      dhcp4: no
      interfaces: [eno1,eno2]
      parameters:
        mode: active-backup
        primary: eno1
    bond1:
      dhcp4: no
      interfaces: [enp24s0f0,enp24s0f1]
      parameters:
        mode: 802.3ad
 
  bridges:
    br0:
      dhcp4: no
      addresses: [10.0.1.5/24]
      gateway4: 10.0.1.254
      nameservers:
        addresses: [10.0.1.1]
        search: [example.com]
      interfaces: [bond0]
    net1:
      dhcp4: no
    drbd:
      dhcp4: no
 
########################################
 
sudo netplan apply
sudo netplan --debug  apply
 
sudo netplan --debug generate
 
networkctl list
 
# Links
https://netplan.io/reference
https://netplan.io/examples
http://manpages.ubuntu.com/manpages/latest/en/man5/netplan.5.html