Why did Ubuntu change the network configuration
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?
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 ofnetplan
, 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 the package named
netplan.io
withifupdown
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.