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 247.235.60.161
  • My Gateway is 247.235.38.51
  • My subnet mask is 255.255.255.255

/etc/netplan/01-netcfg.yaml:

network:
  version: 2
  renderer: networkd
  ethernets:
          ens160:
                  dhcp4: no
                  addresses: [247.235.60.161/32]
                  gateway4: 247.235.38.51
                  nameservers:
                          addresses: [8.8.8.8,8.8.4.4]

When I run "netplan apply" it completes successfully.

If I ping 8.8.8.8 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 255.255.255.255, 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?

Thanks!

  • Readers: Please see also the same question on Ubuntu forums. – Doug Smythies Nov 4 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 255.255.255.255 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 at 20:32

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.