0

I am aware Ubuntu 18.04 uses netplan for its networking, and I have a file at /etc/netplan/50-cloud-init.yaml with the following info:

Picture of /etc/netplan/50-cloud-init.yaml

I know the syntax for this file is valid because when I do sudo netplan --debug apply it does not respond with any syntax errors. However, sudo netplan --debug apply does show this:

Picture of sudo netplan --debug apply result

I have no clue what is going and why Ubuntu decided to switch to this system. However, I suspect DEBUG:device enp0s10f0 operstate is unknown, not replugging is the issue here. Your advice would be appreciated. Thank you.

2
  • 2
    Please don't post screenshots of text. Copy the text here and apply code formatting. askubuntu.com/editing-help#code
    – muru
    Nov 24, 2018 at 3:07
  • Did you verify enp0s10f0 is actually the interface name on your device? That doesn't look like your normal network interface naming in modern Ubuntu environmenst. Also please pay attention to the fact that giving us screenshots of text is less useful than actually giving us the text itself.
    – Thomas Ward
    Nov 24, 2018 at 3:55

1 Answer 1

1

First, I believe the yaml file needs to have consistent indentation. In your example (I'm copying your screenshot example here), you have a mix of 2 and 3 spaces indentation. Your example:

network:
  ethernets
     enps0s10f0:
        dhcp4: no
        addresses: [192.168.1.42/24]
        gateway4: 192.168.1.1
        nameservers:
          addresses: [8.8.8.8, 8.8.4.4]

As you can see, for line no 2 & 9, you have 2 spaces indentation with previous level while lines 3-7 you have 3 spaces. It must be consistent. Keep 2 spaces.

Also, If I compare with my yaml file, 2nd line should be:

  version: 2

I think it should be like this:

network:
  version: 2
    ethernets:
      enps0s10f0:
        dhcp4: no
        addresses: [192.168.1.42/24]
        gateway4: 192.168.1.1
        nameservers:
          addresses: [8.8.8.8, 8.8.4.4]

You can get more details on netplan here: https://netplan.io/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .