netplan with a plan (dhcp and alt dns servers):

home | blog | Terrible people and places | Covid-19 links | Teh Internet | guest blog |rants | placeholder | political | projects | Gwen and Liam | Citadel patched | Tools | Scouts




Need to add dns servers to netplan?
Start with the default dhcp setup, and neuter it:
- create /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
- add just this to it: network: {config: disabled}
- take the default netplan.yaml in /etc/netplan, and add:
network:
    ethernets:
        ens3:
            addresses: []
            dhcp4: true
    version: 2

And change to add (indents matter!):
network:
    ethernets:
        ens3:
            addresses: []
            dhcp4: true
            nameservers:
              addresses: [1.2.3.4, 5.6.7.8]
    version: 2

Static ip?
Stolen from here: https://netplan.io/examples
network:
  version: 2
  renderer: networkd
  ethernets:
    enp3s0:
      addresses:
        - 10.10.10.2/24
      gateway4: 10.10.10.1
      nameservers:
          search: [mydomain, otherdomain]
          addresses: [10.10.10.1, 1.1.1.1]

Give it a go with:
netplan try



[æ]