So according to the documentation on the Ubuntu LXC documentation the following statement can be found at the time of this writing:
A NIC can only exist in one namespace at a time, so a physical NIC passed into the container is not usable on the host.
Now one can have a single physical network card (NIC) share several IPs like this in /etc/network/interfaces
(Debian/Ubuntu):
auto eth0 eth0:1
iface eth0 inet static
address 192.168.0.100/24
gateway 192.168.0.1
iface eth0:1 inet static
address 192.168.0.200
netmask 255.255.255.0
The same can be done with the respective configuration on other distros as well.
Now the question: can eth0
and eth0:1
be assigned to different namespaces or will assigning either one limit the other to the same namespace automatically?