I've been using Ubuntu since inception and have recently found out about Ubuntu's switch to using netplan vs it's traditional/better /etc/network/interfaces method.

I'm attempting to get this to work but it simply isn't working. Based on what I can tell, there is no default route, or possibly even a bad netplan (though ./netplan apply runs correctly). Below is what I'm doing:

  • Clean/brand new 18.04.1 install on ESXi
  • Interface is named ens160
  • My IP Address
  • My Gateway is
  • My subnet mask is


  version: 2
  renderer: networkd
                  dhcp4: no
                  addresses: []
                          addresses: [,]

When I run "netplan apply" it completes successfully.

If I ping I get a "SIOCADDRT: Network is unreachable"

If I do a "route" to view my routing table, it returns with nothing. No routing table. This definitely is an issue.

If I do an "ifconfig -a" it displays my ens160 interface, correct IP, netmask of, no broadcast address, the mac/ether address is correct.

With regards to the addressing/gw/sn, I can confirm that is correct (I have other hosts running with same/similar on this network)

Something is definitely wrong with netplan. Any ideas?


  • Readers: Please see also the same question on Ubuntu forums. – Doug Smythies Nov 4 '18 at 17:47
  • What is the corresponding /etc/network/interfaces that you would use to configure this? Because it is not correct to configure a route via a gateway that you do not have a route to, and you do not have a route to anything except your own host because that's what a netmask of means. So it's ambiguous what you intend here, and it's correct that, given the provided config, netplan is not able to configure a default route. – slangasek Nov 13 '18 at 20:32

The gateway must be in your net- With the /32 mask, the gateway is outside your lan. You must configure, for example, a /16 mask. (


The subnet configured on the interface does not match your gateway address. You should try the “on-link” configuration which allows you to set up a default route.

  version: 2
  renderer: networkd
    addresses: [ "" ]
      - to:
        on-link: true


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.