Wed Jun 27 17:33:25 CEST 2018

interface configs in systemd contexts

A small survey how different marshlabs hosts, all running systemd, get their network interface configured. As it turns out there is quite variety.

ron

A ProxmoxVE 4.4 host, running Debian-8. The network configuration still resides in /etc/network/interfaces for use with ifup/ifdown and a sysV init script:

$ cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto vmbr0
iface vmbr0 inet static
    address 217.13.64.160
    netmask 255.255.255.192
    gateway 217.13.64.161
    bridge_ports eth0
    bridge_stp off
    bridge_fd 0

$ systemctl status network\*
* networking.service - LSB: Raise network interfaces.
   Loaded: loaded (/etc/init.d/networking)
  Drop-In: /run/systemd/generator/networking.service.d
       `-50-insserv.conf-$network.conf
    /lib/systemd/system/networking.service.d
       `-network-pre.conf
   Active: active (exited) since Sat 2018-06-23 16:16:40 CEST; 4 days ago
$

ry

A Raspian system, also Debian-8.0-based. Again, /etc/network/interfaces and networking.service auto-derived from the init.d script are used. This time, though, interfaces says:

iface eth0 inet manual

The configuration is completed by

$ systemctl status dhc\*
* dhcpcd.service - dhcpcd on all interfaces
   Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled)
   Active: active (running) since Sun 2018-04-29 13:17:06 CEST; 1 months 28 days ago
 Main PID: 424 (dhcpcd)
   CGroup: /system.slice/dhcpcd.service
       `-424 /sbin/dhcpcd -q -b

foo

An LXC container within ron, running archlinux:

[root@foo neitzel]# systemctl status netwo\*
* network.target - Network
   Loaded: loaded (/usr/lib/systemd/system/network.target; static; vendor prese>
   Active: active since Wed 2018-06-27 16:16:28 CEST; 1h 11min ago
     Docs: man:systemd.special(7)
       https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget

Jun 27 16:16:28 foo systemd[1]: Reached target Network.

[root@foo neitzel]# locate \*.network
/etc/systemd/network/eth0.network
/usr/lib/systemd/network/80-container-host0.network
/usr/lib/systemd/network/80-container-ve.network
/usr/lib/systemd/network/80-container-vz.network

[root@foo neitzel]# cat /etc/systemd/network/eth0.network
[Match]
Name = eth0

[Network]
Description = Interface eth0 autoconfigured by PVE
Address = auto
DHCP = v4

[root@foo neitzel]# systemctl status dhc*
[root@foo neitzel]#

Summary: foo is the only system here using systemd-networkd.


Posted by neitzel | Permanent link | File under: learned, marshlabs