Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Virtual network device

276 bytes added, 16:59, 10 February 2013
Adding IP address to a container
vzctl set <CTID> --ipadd <IP1>[,<IP2>,...] [--save]
</pre>
 
Address can optionally have a netmask specified in the CIDR notation (e.g. 10.1.2.3/25).
{{Note|This option is incremental, so IP addresses are added to already existing ones.}}
==== Example ====
<pre>
vzctl set 101 --ipadd 10.0.0.1 --savevzctl set 101 --ipadd fd00::101 --save
</pre>
After executing this command IP address 10.0.0.1 will be added to container 101 and IP configuration will be saved to a container configuration file.
<pre>
vzctl set 101 --ipdel 10.0.0.1
vzctl set 101 --ipdel fd00::101
</pre>
After executing this command IP address 10.0.0.1 will be removed from container 101, but IP configuration will not be changed in container config file. And after container reboot IP address 10.0.0.1 will be assigned to this container again.
=== No possiblity to assign an IP from the CT ===
With venet device, only OpenVZ [[hardware node]] administrator can assign an IP address to a [[container]].
 
=== Limited packet sniffing support ===
Some applications using libpcap and similar packages will report an error.
=== No full support of IPv6 stack ===
 
venet devices are not fully IPv6 compliant. They do not properly support MAC addresses and consequently link local addresses and can not play nice with neighbor discovery or router advertisements, router discovery, or auto-conf. They also require additional modifications to the layer 3 forwarding behaviour of the host via sysctl, to get your venet devices working.
Please have a look at the [[Quick installation#sysctl]] section.
You'll need to use the veth bridging device if you want full IPv6 compliance. See the [[VEs and HNs in same subnets]] article for an example.
 
== See also ==
Anonymous user