enuk

Netplan

Note: Wireless Bridge Tutorial HERE.
https://netplan.io/

Netplan Configuration
One file does it all.
$ sudo nano /etc/netplan/01-network-manager-all.yaml
    
Network Manager
For Desktops. The default install looks as below.
network:
      version: 2
      renderer: NetworkManager
    
networkd
For headless servers without wifi, everything by the command line.
network:
      version: 2
      renderer: networkd
    
netplan generate
Generate the files without applying them. Great for checking syntax.
$ sudo netplan generate
    
netplan try
Apply the latest modifications with a timed revert to reverse changes. Try before you buy.
$ sudo netplan try
    
netplan apply
Apply the latest changes without concern for reverting the files back to their former selves.
$ sudo netplan --debug apply
    
netplan get
Retrieve and display the current configuration files.
$ sudo netplan get
    

Wifi

Channels

  wifis:
    
        wlp6s0:
          dhcp4: false
          access-points:
            "****-******":
              band: "2.4GHz"
              channel: 10
              auth:
                key-management: "psk"
                password: "**********"
              mode: "ap"
    

DHCP

  wifis:
    
        wlp6s0:
          dhcp4: true
          dhcp6: true
          access-points:
            "****-******":
              password: "******"
    

IP Address

wifis:
    
        wlp6s0:
          dhcp4: no
          dhcp6: no
          addresses: [192.168.0.111/24]
          nameservers:
            search: [local, home]
            addresses: [192.168.0.1, 1.1.1.1]
          access-points:
            "****-******":
                password: "**********"
          routes:
            - to: default
              via: 192.168.0.1
    

Ethernets

  ethernets:
        enp0s31f6:
          optional: true
          dhcp4: false
          mtu: 1500
        enp3s0f0:
          optional: true
          dhcp4: false
          mtu: 1500
        enp3s0f1:
          optional: true
          dhcp4: false
          mtu: 1500
        enp4s0f0:
          optional: true
          dhcp4: false
          mtu: 1500
        enp4s0f1:
          optional: true
          dhcp4: true
          mtu: 1500
        enp11s0f0:
          optional: true
          dhcp4: false
          mtu: 1500
        enp11s0f1:
          optional: true
          dhcp4: false
          mtu: 1500
        enp12s0f0:
          optional: true
          dhcp4: false
          mtu: 1500
        enp12s0f1:
          optional: true
          dhcp4: false
          mtu: 1500
    

Renaming

# Let NetworkManager manage all devices on this system
    network:
      ethernets:
        wan:
          match:
            macaddress: 84:5c:47:95:f3:23
          dhcp4: true
          optional: true
          set-name: wan
        lan:
          match:
            macaddress: fc:34:4a:97:08:33
          dhcp4: true
          optional: true
          set-name: lan
    

Bridges

network:
      version: 2
      renderer: NetworkManager
      ethernets:
        eno1:
          dhcp4: true
        switchports:
          match:
            name: "wlp3s0f0"
          mtu: 1280
      bridges:
        br0:
          dhcp4: true
          interfaces:
          - eno1
          - switchports
    
network:
      renderer: networkd
      version: 2
      
      ethernets:
        eno1:
          dhcp4: false
          mtu: 1500
        enp3s0f0:
          dhcp4: false
        enp3s0f1:
          dhcp4: false
        enp4s0f0:
          dhcp4: false
        enp4s0f1:
          dhcp4: false
        enp11s0f0:
          dhcp4: false
        enp11s0f1:
          dhcp4: false
        enp12s0f0:
          dhcp4: false
        enp12s0f1:
          dhcp4: false
    
    
      bridges:
        br0:
          interfaces: [eno1, enp3s0f1, enp3s0f1, enp4s0f0, enp4s0f1, enp11s0f0, enp11s0f1, enp12s0f0, enp12s0f1]
          addresses: [192.168.2.1/24]
          gateways: 192.168.2.1
          mtu: 1500
          namerservers:
            addresses: [192.168.2.1]
          parameters:
            stp: true
          dhcp4: false
    
network:
      version: 2
      renderer: NetworkManager
      ethernets:
        enp5s0:
          dhcp4: no
          addresses: [192.168.0.50/24]
          gateway4: 192.168.0.1
          nameservers:
            addresses: [8.8.8.8]
          routes:
            - to: 0.0.0.0/0
              via: 192.168.0.1
        enp4s0f1:
          dhcp4: true
          routes:
            - to: 0.0.0.0/0
              via: 192.168.0.1
        enp4s0f0:
          dhcp4: true
          routes:
            - to: 0.0.0.0/0
              via: 192.168.0.1
        enp3s0f1:
          dhcp4: true
          routes:
            - to: 0.0.0.0/0
              via: 192.168.0.1
        enp3s0f0:
          dhcp4: true
          routes:
            - to: 0.0.0.0/0
              via: 192.168.0.1
      bridges:
        br0:
          interfaces: [enp4s0f1, enp4s0f0, enp3s0f1, enp3s0f0]
          addresses: [192.168.1.1/24]