I want to migrate my network configuration to netplan. I have been using ifup/down and the /etc/network/interfaces file to configure my static IPs, but this has been deprecated and support will be withdrawn in the 17.10 release.

However

sudo netplan ifupdown-migrate

returns

enp0s3: method static is not supported

So how do I convert this /etc/network/interfaces stanza?

auto enp0s3
  iface enp0s3 inet static
  address 192.168.0.123
  netmask 255.255.255.0
  gateway 192.168.0.1
  dns-nameservers 8.8.8.8  8.8.4.4
  • What does the complete file look like?
  • How should it be named and placed?

Thank you.

share|improve this question

closed as off-topic by Byte Commander, Pilot6, Eric Carvalho, Mark Kirby, karel Oct 4 '17 at 9:47

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Bug reports and problems specific to development version of Ubuntu should be reported on Launchpad so that developers can see, track and fix these issues." – Byte Commander, Pilot6, Eric Carvalho, Mark Kirby, karel
If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Welcome to Ask Ubuntu. This is a question and answer site, so rather than adding 'solved' and putting the solution in the question, please put the solution in the answer space. After a short period of time, you will be able to accept the solution as the correct answer. – chaskes Oct 3 '17 at 18:26
up vote 2 down vote accepted

After looking through the man page I came up with this:

network:
version: 2
ethernets:
  enp0:
   match:
      name: enp0s3
        addresses: [192.168.0.128/24]
        gateway4: 192.168.0.1
        nameservers:
            addresses: [8.8.8.8,8.8.4.4]

It is named

/etc/netplan/01-systemd-networkd-eth.yaml

And it works.

A great help was this command

netplan --debug generate.

which pointed me to syntactical errors.

Breaking news. Just found this: https://insights.ubuntu.com/2017/07/05/quick-and-easy-network-configuration-with-netplan/

share|improve this answer
    
I understand that my reference to the Beta release made this question inappropriate for this site. I have removed the reference. – Stephen Boston Oct 4 '17 at 10:21
    
A more recent man page now that Ubuntu Artful has been released: manpages.ubuntu.com/manpages/artful/man5/netplan.5.html – Rolf Oct 19 '17 at 23:02

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