[systemd-devel] nspawn: how to rename network interfaces?

Matthias Pfau matthias at tutanota.de
Tue Apr 10 16:06:36 UTC 2018


Apr 5, 2018, 1:14 PM by matthias at tutanota.de:

> How can I define ipvlan interface names for the container? E.g. I need multiple ipvlan interfaces on the host that are mapped to the interface name "dmz" in multiple containers.
>
Attaching and naming macvlan/ipvlan interfaces to a container is currently not possible. However, I was able to add multiple  devices to my containers and rename them directly in /etc/network/interfaces, e.g.

auto int
iface int inet static
    address 192.168.1.165
    netmask 255.255.255.0
    pre-up if [ -e /sys/class/net/host0 ] ; then ip link set host0 name int ;fi


Cheers,
Matthias


More information about the systemd-devel mailing list