9.12 Boot-Activated Network Configuration
We’ve discussed ways to manually configure a network, and the traditional way to ensure the correctness of a machine’s network configuration was to have init run a script to run the manual configuration at boot time. This boils down to running a tool like ip somewhere in the chain of boot events.
There have been many attempts in Linux to standardize configuration files for boot-time networking. The tools ifup and ifdown are among them; for example, a boot script can (in theory) run ifup eth0 to run the correct ip commands to set up an interface. Unfortunately, different distributions have completely different implementations of ifup and ifdown, and as a result, their configuration files are also different.
There is a deeper disparity due to the fact that network configuration elements are present in each of the different network layers; a consequence is that the software responsible for making networking happen is in several parts of kernel and user-space tools, written and maintained by different developers. In Linux, there is a general agreement not to share configuration files among separate tool suites or libraries, because changes made for one tool could break another.
Dealing with network configuration in several different places makes it difficult to manage systems. As a result, there are several different network management tools that each have their own approach to the configuration problem. However, these tend to be specialized for the particular kind of role that a Linux machine can serve. A tool might work on a desktop but not be appropriate for a server.
A tool called Netplan offers a different approach to the configuration problem. Rather than managing the network, Netplan is nothing more than a unified network configuration standard and a tool to transform that configuration into the files used by existing network managers. Currently, Netplan supports NetworkManager and systemd-networkd, which we’ll talk about later in this chapter. Netplan files are in YAML format, and reside in /etc/netplan.
Before we can talk about network configuration managers, let’s look a little closer at some of the issues they face.