2

With this configuration I'm getting this error:

Error in network definition:expected mapping (check indentation) set-name: eth0.

Why? the indentation of the named item is proper ... isn't it?

network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: yes
    match:
      macaddress: 00:11:22:33:44:55
    set-name: eth0
1

If this is a desktop installation, you should be using NetworkManager...

network:
  version: 2
  renderer: NetworkManager

However, to answer your question, just use this... no need for match, macaddress, or set-name...

network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: yes

sudo netplan --debug generate # make config files

sudo netplan apply # apply new configuration

reboot # verify configuration

0

You did miss some indentations, the correct syntax is

network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: yes
      match:
        macaddress: 00:11:22:33:44:55
      set-name: eth0

Explanation: dhcp4, match and set-name belong to (or define) eth0, and macadress belongs to match.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.