![Lead Image © Kritiya Sumpun, 123RF.com Lead Image © Kritiya Sumpun, 123RF.com](/var/ezflow_site/storage/images/archive/2016/32/networkd-and-nspawn-in-systemd/123rf_15115107_first-aid-computer_kritiyasumpun_resized.png/123833-1-eng-US/123RF_15115107_First-Aid-Computer_KritiyaSumpun_resized.png_medium.png)
Lead Image © Kritiya Sumpun, 123RF.com
networkd and nspawn in systemd
Startup Aid
Most new features in the current systemd version relate to the networkd and nspawn components. Both have been part of systemd for some time, but they have been given added features in the new version to make working with them far easier in some cases.
Setting Up Bridge Devices
The systemd-networkd
network manager can now handle a variety of different network devices; its feature set has been extended to provide better support for use in container environments. The following example shows how easy it is to use the daemon to set up, say, a bridge device. Networkd is not designed to replace the established Gnome Network Manager; instead, the daemon is designed for special environments, such as container hosts, or in embedded applications.
Listing 1 shows the preparations required to be able to use the new network manager. For name resolution, it relies on the LLMNR (Link-Local Multicast Name Resolution)-capable stub resolver, which is also part of the system package.
Listing 1
Basic Setup
systemctl enable systemd-networkd systemctl disable NetworkManager systemctl enable systemd-resolved cp /etc/resolv.conf /etc/resolv.conf.bak ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf mkdir /etc/systemd/network
Listings 2 and 3 show the two configuration files for the normal Ethernet card (Listing 2) and the bridge device (Listing 3). You can decide which device is configured by these files by entering the device names or
...Buy this article as PDF
(incl. VAT)