By default, all the Containers on a Node are connected among themselves and with the Node by means of a virtual network adapter called
venet0. Starting with Virtuozzo Containers 2.6.1, there is a possibility for a Container to directly access a physical network adapter (for example,
eth1). In this case the adapter becomes inaccessible to the Hardware Node itself. This is done with the help of the
# vzctl set 101 --netdev_add eth1 --save
Add network device: eth1
Saved parameters for Container 101
Mind that the network device added to a Container in such a way has the following limitations:
vzctl set --netdev_delcommand) and added to another Container instead, all the network settings of this device are purged. To work around this problem, you should store all the device settings in the
ifcfg-devfile and have this file available in the
/etc/sysconfig/network-scriptsdirectory inside all the Containers that may have access to this device (including Container 0). After the device has been added to a Container, it will be enough to issue the
devcommand inside the Container to read the settings from the file mentioned above. Mind though that this will still not restore advanced network configuration settings, such as traffic shaping or packet filtering rules.
venetvirtual device. Inside the Container it will be possible to assign any IP address to this device and use it, to sniff network traffic in the promiscuous mode, and so on.
Please send us your feedback on this help page