You are not logged in.

#1 2016-09-10 17:04:55

Ochi
Member
Registered: 2010-04-06
Posts: 51

nspawn containers are assigned two 10.0.0.x IP addresses

Hello,

I have noticed that nspawn containers are assigned two IP addresses from the 10.0.0.x range on the host when using systemd-networkd on both ends (host and container). I'm not sure if this is a new phenomenon with current systemd versions (I'm using 231), but at least I haven't noticed before even though I've been using containers for some time now. I wanted to ask here first if someone can enlighten me whether this is expected behavior or if this could be an issue, before opening a bug report against systemd.

The repro is quite simple. Bootstrap a new Arch container; I'm using roughly these steps for that:

* I'm assuming that you're using btrfs for /var/lib/machines at least.
* Make sure that systemd-networkd is running on the host.
* Make sure you have arch-install-scripts.
* btrfs sub create /var/lib/machines/test
* pacstrap -i -c -d /var/lib/machines/test base
* machinectl start test
* machinectl shell test

"ip a" on the host will show you that the new interface "ve-test" has an IP assigned, probably 10.0.0.1 if no other containers are running.

Now in the container, start systemd-networkd and wait a few seconds. Check "ip a" on the host again. There should now be a second IPv4 assigned to the ve-test interface, probably 10.0.0.17.

This doesn't make sense to me. What could be the reason?

Offline

Board footer

Powered by FluxBB