17

As we all know, to configure the network, we can edit /etc/network/interfaces and execute /etc/init.d/networking restart.

Today I try to use Ubuntu 17.10 and I've found the network configuration had changed. Now we should edit /etc/netplan01-netcfg.yaml and execute netplan apply.

OK, this might be a bad question but I really want to know why Ubuntu did such a change. Is there a strong reason to explain all of changes like this one?

  • 2
    Martin Pitt (Canonical) wrote in 2016 announcement "With netplan there are central /etc/netplan/*.yaml network config files for all Ubuntu -- Snappy, Server, Client, MaaS, cloud-init. ..." maybe look at wiki.ubuntu.com/Netplan & people.canonical.com/~mtrudel/netplan – guiverc Feb 12 '18 at 9:14
  • This started with 16.04 or 16.10 iirc. – Rinzwind Feb 12 '18 at 13:25
15

From the Ubuntu Wiki page on Migrating to Netplan:

Rationale

Netplan has been implemented to support simple, declarative representation of complex network configurations, as well as address some current limitations of ifupdown. Netplan provides a simple and elegant yaml configuration format with support for multiple backend providers.

Some of the shortcomings of ifupdown covered by netplan:

  • ifupdown cannot represent all configs with a purely declarative syntax; therefore we can not parse the config
    • all netplan config is purely declarative.
  • ifupdown can only represent interfaces by name, so it is not portable across devices
    • netplan uses matching by name, MAC address, driver, etc.
  • race conditions in complex configs
    • netplan has the context of hierarchy in the definition of the interfaces, such that this information is carried over to the renderer used and applied in the right ordering.

Given increasing demand for complex networking scenarios (large cloud uses often require complex layering of different features, such as bridges over bonds over VLANs, etc.), it has shown to be important to improve the ease of representing the network config.

Like a lot of changes to something better but incompatible, there will be some pain for a future gain.

If you still need /etc/network/interfaces, you can use it. From the Ubuntu Wiki page on Netplan:

I really do need ifupdown, can I still use it?

If you run into a case where you do need to use ifupdown instead of netplan, we would really like to know about it, so you should file a bug in Launchpad.

While we don't recommend doing so, you can remove netplan and install ifupdown after install, and fill in /etc/network/interfaces manually to configure your network the way you want it.


As we all know, to configure the network, we can edit /etc/network/interfaces and execute /etc/init.d/networking restart.

As we all know, that used to badly break the desktop.

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.