![Lead Image © Kritiya Sumpun, 123RF.com Lead Image © Kritiya Sumpun, 123RF.com](/var/ezflow_site/storage/images/archive/2016/33/systemd-network-management-and-container-handling/123rf_15052739_computer-firstaid-aid_kritiyasumpun_resized.png/126047-1-eng-US/123rf_15052739_Computer-firstaid-aid_KritiyaSumpun_resized.png_medium.png)
Lead Image © Kritiya Sumpun, 123RF.com
Systemd network management and container handling
Startup Aids
Most of the new features in the current version of systemd relate to the systemd-networkd
and systemd-nspawn
components, which have been part of systemd for a long time. However, additional functions were added to the current release that can significantly simplify working with these tools.
Setting Up Bridge Devices
The systemd-networkd
network manager can now handle a variety of different network devices; its functionality has been upgraded to better support smooth operations in container environments. The following example shows how easily the daemon can be used to set up, say, a bridge device.
Networkd is not designed to replace the established Gnome NetworkManager. Instead, the daemon is intended for special environments, such as container hosts or embedded applications. Listing 1 shows the preparatory work needed to use the new network manager. For name resolution, it relies on the LLMNR (link-local multicast name resolution)-capable stub resolver, which also belongs to the systemd 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 regular Ethernet card (Listing 2) and bridge device (Listing 3). You can specify which device is
...