<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openvz.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sts</id>
	<title>OpenVZ Virtuozzo Containers Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openvz.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sts"/>
	<link rel="alternate" type="text/html" href="https://wiki.openvz.org/Special:Contributions/Sts"/>
	<updated>2026-06-13T21:33:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Virtual_network_device&amp;diff=7334</id>
		<title>Virtual network device</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Virtual_network_device&amp;diff=7334"/>
		<updated>2009-05-28T07:50:56Z</updated>

		<summary type="html">&lt;p&gt;Sts: /* IPv6 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Virtual network device (&amp;lt;code&amp;gt;venet&amp;lt;/code&amp;gt;) is the default network device for a [[container]]. This network device looks like a point-to-point connection between [[container]] and the [[CT0|host system]]. It does packet switching based on IP header. This is a default network device for container (an alternative is [[veth]] device).&lt;br /&gt;
&lt;br /&gt;
Venet device is created automatically on [[container]] start. Vzctl scripts set up an appropriate IP address and other settings on venet inside a container.&lt;br /&gt;
&lt;br /&gt;
==  Usage ==&lt;br /&gt;
&lt;br /&gt;
== Kernel module ==&lt;br /&gt;
First of all, check that &amp;lt;code&amp;gt;vznetdev&amp;lt;/code&amp;gt; module is loaded:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lsmod | grep vznetdev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is not, load the module:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# modprobe vznetdev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might want to check /etc/init.d/vz script to make sure the module gets loaded during startup.&lt;br /&gt;
&lt;br /&gt;
=== Adding IP address to a container ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set &amp;lt;CTID&amp;gt; --ipadd &amp;lt;IP1&amp;gt;[,&amp;lt;IP2&amp;gt;,...] [--save]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|This option is incremental, so IP addresses are added to already existing ones.}}&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set 101 --ipadd 10.0.0.1 --save&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Removing IP address from a container ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set &amp;lt;CTID&amp;gt; --ipdel &amp;lt;IP1&amp;gt;[,&amp;lt;IP2&amp;gt;,...] [--save]&lt;br /&gt;
vzctl set &amp;lt;CTID&amp;gt; --ipdel all [--save]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set 101 --ipdel 10.0.0.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Sysctl ==&lt;br /&gt;
&lt;br /&gt;
You will need to configure some sysctl parameters to get your venet devices working.&lt;br /&gt;
Please have a look at the [[Installation_on_Debian#sysctl]] section.&lt;br /&gt;
&lt;br /&gt;
== IPv6 ==&lt;br /&gt;
&lt;br /&gt;
To setup IPv6 networking with venet you'll need to enable the following in your sysctl.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    # IPv6 Packet Forwarding and Proxy NDP &lt;br /&gt;
    net.ipv6.conf.default.forwarding = 1&lt;br /&gt;
    net.ipv6.conf.all.forwarding     = 1&lt;br /&gt;
    net.ipv6.conf.default.proxy_ndp = 1&lt;br /&gt;
    net.ipv6.conf.all.proxy_ndp = 1&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In IPv6 you can't control forwarding per device, forwarding control has to take place in ip6tables, so all interfaces will forward IPv6 traffic. &lt;br /&gt;
&lt;br /&gt;
If you enable IPv6 forwarding for your interfaces, Linux assumes your host to act like a router and will ignore 'Router Advertisments' &lt;br /&gt;
(see [http://en.wikipedia.org/wiki/Neighbor_Discovery_Protocol Neighbor Discovery Protocol] or [http://mirrors.bieringer.de/Linux+IPv6-HOWTO/proc-sys-net-ipv6.html Linux IPv6 Howto]).&lt;br /&gt;
&lt;br /&gt;
You will as well need to configure a new v6 default gateway for your host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    ip addr add 2620:0:2d0:1::193/64 dev eth0&lt;br /&gt;
    route -6 add default gw 2620:0:2d0:1::1&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can add these commands to your existing network configuration on Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    iface eth0 inet static&lt;br /&gt;
        address 64.131.90.7&lt;br /&gt;
        netmask 255.255.255.240&lt;br /&gt;
        network 64.131.90.0&lt;br /&gt;
        broadcast 64.131.90.15&lt;br /&gt;
        gateway 64.131.90.1&lt;br /&gt;
        up   ip addr add 2620:0:2d0:1::193/64 dev eth0&lt;br /&gt;
        up   route -6 add default gw 2620:0:2d0:1::1&lt;br /&gt;
        down ip addr del 3620:0:2d0:1::193/64 dev eth0&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Veth]]&lt;br /&gt;
* [[Differences between venet and veth]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Networking]]&lt;br /&gt;
[[Category: HOWTO]]&lt;/div&gt;</summary>
		<author><name>Sts</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Virtual_network_device&amp;diff=6855</id>
		<title>Virtual network device</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Virtual_network_device&amp;diff=6855"/>
		<updated>2009-01-05T13:32:49Z</updated>

		<summary type="html">&lt;p&gt;Sts: /* IPv6 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Virtual network device (&amp;lt;code&amp;gt;venet&amp;lt;/code&amp;gt;) is the default network device for a [[container]]. This network device looks like a point-to-point connection between [[container]] and the [[CT0|host system]]. It does packet switching based on IP header. This is a default network device for container (an alternative is [[veth]] device).&lt;br /&gt;
&lt;br /&gt;
Venet device is created automatically on [[container]] start. Vzctl scripts set up an appropriate IP address and other settings on venet inside a container.&lt;br /&gt;
&lt;br /&gt;
==  Usage ==&lt;br /&gt;
&lt;br /&gt;
== Kernel module ==&lt;br /&gt;
First of all, check that &amp;lt;code&amp;gt;vznetdev&amp;lt;/code&amp;gt; module is loaded:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lsmod | grep vznetdev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is not, load the module:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# modprobe vznetdev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might want to check /etc/init.d/vz script to make sure the module gets loaded during startup.&lt;br /&gt;
&lt;br /&gt;
=== Adding IP address to a container ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set &amp;lt;CTID&amp;gt; --ipadd &amp;lt;IP1&amp;gt;[,&amp;lt;IP2&amp;gt;,...] [--save]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|This option is incremental, so IP addresses are added to already existing ones.}}&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set 101 --ipadd 10.0.0.1 --save&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Removing IP address from a container ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set &amp;lt;CTID&amp;gt; --ipdel &amp;lt;IP1&amp;gt;[,&amp;lt;IP2&amp;gt;,...] [--save]&lt;br /&gt;
vzctl set &amp;lt;CTID&amp;gt; --ipdel all [--save]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set 101 --ipdel 10.0.0.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Sysctl ==&lt;br /&gt;
&lt;br /&gt;
You will need to configure some sysctl parameters to get your venet devices working.&lt;br /&gt;
Please have a look at the [[Installation_on_Debian#sysctl]] section.&lt;br /&gt;
&lt;br /&gt;
== IPv6 ==&lt;br /&gt;
&lt;br /&gt;
To setup IPv6 networking with venet you'll need to enable the following in your sysctl.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    net.ipv6.conf.default.forwarding = 1&lt;br /&gt;
    net.ipv6.conf.all.forwarding     = 1&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In IPv6 you can't control forwarding per device, forwarding control has to take place in ip6tables, so all interfaces will forward IPv6 traffic. &lt;br /&gt;
&lt;br /&gt;
If you enable IPv6 forwarding for your interfaces, Linux assumes your host to act like a router and will ignore 'Router Advertisments' &lt;br /&gt;
(see [http://en.wikipedia.org/wiki/Neighbor_Discovery_Protocol Neighbor Discovery Protocol] or [http://mirrors.bieringer.de/Linux+IPv6-HOWTO/proc-sys-net-ipv6.html Linux IPv6 Howto]).&lt;br /&gt;
&lt;br /&gt;
You will as well need to configure a new v6 default gateway for your host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    ip addr add 2620:0:2d0:1::193/64 dev eth0&lt;br /&gt;
    route -6 add default gw 2620:0:2d0:1::1&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can add these commands to your existing network configuration on Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    iface eth0 inet static&lt;br /&gt;
        address 64.131.90.7&lt;br /&gt;
        netmask 255.255.255.240&lt;br /&gt;
        network 64.131.90.0&lt;br /&gt;
        broadcast 64.131.90.15&lt;br /&gt;
        gateway 64.131.90.1&lt;br /&gt;
        up   ip addr add 2620:0:2d0:1::193/64 dev eth0&lt;br /&gt;
        up   route -6 add default gw 2620:0:2d0:1::1&lt;br /&gt;
        down ip addr del 3620:0:2d0:1::193/64 dev eth0&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Veth]]&lt;br /&gt;
* [[Differences between venet and veth]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Networking]]&lt;br /&gt;
[[Category: HOWTO]]&lt;/div&gt;</summary>
		<author><name>Sts</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Virtual_network_device&amp;diff=6854</id>
		<title>Virtual network device</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Virtual_network_device&amp;diff=6854"/>
		<updated>2009-01-05T13:29:10Z</updated>

		<summary type="html">&lt;p&gt;Sts: /* IPv6 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Virtual network device (&amp;lt;code&amp;gt;venet&amp;lt;/code&amp;gt;) is the default network device for a [[container]]. This network device looks like a point-to-point connection between [[container]] and the [[CT0|host system]]. It does packet switching based on IP header. This is a default network device for container (an alternative is [[veth]] device).&lt;br /&gt;
&lt;br /&gt;
Venet device is created automatically on [[container]] start. Vzctl scripts set up an appropriate IP address and other settings on venet inside a container.&lt;br /&gt;
&lt;br /&gt;
==  Usage ==&lt;br /&gt;
&lt;br /&gt;
== Kernel module ==&lt;br /&gt;
First of all, check that &amp;lt;code&amp;gt;vznetdev&amp;lt;/code&amp;gt; module is loaded:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lsmod | grep vznetdev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is not, load the module:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# modprobe vznetdev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might want to check /etc/init.d/vz script to make sure the module gets loaded during startup.&lt;br /&gt;
&lt;br /&gt;
=== Adding IP address to a container ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set &amp;lt;CTID&amp;gt; --ipadd &amp;lt;IP1&amp;gt;[,&amp;lt;IP2&amp;gt;,...] [--save]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|This option is incremental, so IP addresses are added to already existing ones.}}&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set 101 --ipadd 10.0.0.1 --save&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Removing IP address from a container ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set &amp;lt;CTID&amp;gt; --ipdel &amp;lt;IP1&amp;gt;[,&amp;lt;IP2&amp;gt;,...] [--save]&lt;br /&gt;
vzctl set &amp;lt;CTID&amp;gt; --ipdel all [--save]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set 101 --ipdel 10.0.0.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Sysctl ==&lt;br /&gt;
&lt;br /&gt;
You will need to configure some sysctl parameters to get your venet devices working.&lt;br /&gt;
Please have a look at the [[Installation_on_Debian#sysctl]] section.&lt;br /&gt;
&lt;br /&gt;
=== IPv6 ===&lt;br /&gt;
&lt;br /&gt;
To setup IPv6 networking with venet you'll need to enable the following in your sysctl.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    net.ipv6.conf.default.forwarding = 1&lt;br /&gt;
    net.ipv6.conf.all.forwarding     = 1&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In IPv6 you can't control forwarding per device, forwarding control has to take place in ip6tables, so all interfaces will forward IPv6 traffic. &lt;br /&gt;
&lt;br /&gt;
If you enable IPv6 forwarding for your interfaces, Linux assumes your host to act like a router and will ignore 'Router Advertisments' &lt;br /&gt;
(see [http://en.wikipedia.org/wiki/Neighbor_Discovery_Protocol Neighbor Discovery Protocol] or [http://mirrors.bieringer.de/Linux+IPv6-HOWTO/proc-sys-net-ipv6.html Linux IPv6 Howto]).&lt;br /&gt;
&lt;br /&gt;
You will as well need to configure a new v6 default gateway for your host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    ip addr add 2620:0:2d0:1::193/64 dev eth0&lt;br /&gt;
    route -6 add default gw 2620:0:2d0:1::1&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can add these commands to your existing network configuration on Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    iface eth0 inet static&lt;br /&gt;
        address 64.131.90.7&lt;br /&gt;
        netmask 255.255.255.240&lt;br /&gt;
        network 64.131.90.0&lt;br /&gt;
        broadcast 64.131.90.15&lt;br /&gt;
        gateway 64.131.90.1&lt;br /&gt;
        up   ip addr add 2620:0:2d0:1::193/64 dev eth0&lt;br /&gt;
        up   route -6 add default gw 2620:0:2d0:1::1&lt;br /&gt;
        down ip addr del 3620:0:2d0:1::193/64 dev eth0&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Veth]]&lt;br /&gt;
* [[Differences between venet and veth]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Networking]]&lt;br /&gt;
[[Category: HOWTO]]&lt;/div&gt;</summary>
		<author><name>Sts</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Virtual_network_device&amp;diff=6853</id>
		<title>Virtual network device</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Virtual_network_device&amp;diff=6853"/>
		<updated>2009-01-05T13:26:03Z</updated>

		<summary type="html">&lt;p&gt;Sts: /* IPv6 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Virtual network device (&amp;lt;code&amp;gt;venet&amp;lt;/code&amp;gt;) is the default network device for a [[container]]. This network device looks like a point-to-point connection between [[container]] and the [[CT0|host system]]. It does packet switching based on IP header. This is a default network device for container (an alternative is [[veth]] device).&lt;br /&gt;
&lt;br /&gt;
Venet device is created automatically on [[container]] start. Vzctl scripts set up an appropriate IP address and other settings on venet inside a container.&lt;br /&gt;
&lt;br /&gt;
==  Usage ==&lt;br /&gt;
&lt;br /&gt;
== Kernel module ==&lt;br /&gt;
First of all, check that &amp;lt;code&amp;gt;vznetdev&amp;lt;/code&amp;gt; module is loaded:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lsmod | grep vznetdev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is not, load the module:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# modprobe vznetdev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might want to check /etc/init.d/vz script to make sure the module gets loaded during startup.&lt;br /&gt;
&lt;br /&gt;
=== Adding IP address to a container ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set &amp;lt;CTID&amp;gt; --ipadd &amp;lt;IP1&amp;gt;[,&amp;lt;IP2&amp;gt;,...] [--save]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|This option is incremental, so IP addresses are added to already existing ones.}}&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set 101 --ipadd 10.0.0.1 --save&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Removing IP address from a container ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set &amp;lt;CTID&amp;gt; --ipdel &amp;lt;IP1&amp;gt;[,&amp;lt;IP2&amp;gt;,...] [--save]&lt;br /&gt;
vzctl set &amp;lt;CTID&amp;gt; --ipdel all [--save]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set 101 --ipdel 10.0.0.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Sysctl ==&lt;br /&gt;
&lt;br /&gt;
You will need to configure some sysctl parameters to get your venet devices working.&lt;br /&gt;
Please have a look at the [[Installation_on_Debian#sysctl]] section.&lt;br /&gt;
&lt;br /&gt;
=== IPv6 ===&lt;br /&gt;
&lt;br /&gt;
To setup IPv6 networking with venet you'll need to enable the following in your sysctl.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    net.ipv6.conf.default.forwarding = 1&lt;br /&gt;
    net.ipv6.conf.all.forwarding     = 1&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In IPv6 you can't control forwarding per device, forwarding control has to take place in ip6tables, so all interfaces will forward IPv6 traffic. &lt;br /&gt;
&lt;br /&gt;
If you enable IPv6 forwarding for your interfaces, Linux assumes your host to act like a router and will ignore 'Router Advertisments' &lt;br /&gt;
(see [http://en.wikipedia.org/wiki/Neighbor_Discovery_Protocol Neighbor Discovery Protocol] or [http://mirrors.bieringer.de/Linux+IPv6-HOWTO/proc-sys-net-ipv6.html Linux IPv6 Howto]).&lt;br /&gt;
&lt;br /&gt;
You will as well need to configure a new v6 default gateway for your host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    ip addr add 2001:1:1:1:0::2/64 dev eth0&lt;br /&gt;
    route -6 add default gw 2001:1:1:1:0::1&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can add these commands to your existing network configuration on Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    iface eth0 inet static&lt;br /&gt;
        address 213.235.253.206&lt;br /&gt;
        netmask 255.255.255.240&lt;br /&gt;
        network 213.235.253.192&lt;br /&gt;
        broadcast 213.235.253.207&lt;br /&gt;
        gateway 213.235.253.193&lt;br /&gt;
        up   ip addr add 2001:1:1:1:0::2/64 dev eth0&lt;br /&gt;
        up   route -6 add default gw 2001:1:1:1:0::1&lt;br /&gt;
        down ip addr del 22001:1:1:1:0::2/64 dev eth0&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Veth]]&lt;br /&gt;
* [[Differences between venet and veth]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Networking]]&lt;br /&gt;
[[Category: HOWTO]]&lt;/div&gt;</summary>
		<author><name>Sts</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Virtual_network_device&amp;diff=6852</id>
		<title>Virtual network device</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Virtual_network_device&amp;diff=6852"/>
		<updated>2009-01-05T13:23:00Z</updated>

		<summary type="html">&lt;p&gt;Sts: /* IPv6 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Virtual network device (&amp;lt;code&amp;gt;venet&amp;lt;/code&amp;gt;) is the default network device for a [[container]]. This network device looks like a point-to-point connection between [[container]] and the [[CT0|host system]]. It does packet switching based on IP header. This is a default network device for container (an alternative is [[veth]] device).&lt;br /&gt;
&lt;br /&gt;
Venet device is created automatically on [[container]] start. Vzctl scripts set up an appropriate IP address and other settings on venet inside a container.&lt;br /&gt;
&lt;br /&gt;
==  Usage ==&lt;br /&gt;
&lt;br /&gt;
== Kernel module ==&lt;br /&gt;
First of all, check that &amp;lt;code&amp;gt;vznetdev&amp;lt;/code&amp;gt; module is loaded:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lsmod | grep vznetdev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is not, load the module:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# modprobe vznetdev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might want to check /etc/init.d/vz script to make sure the module gets loaded during startup.&lt;br /&gt;
&lt;br /&gt;
=== Adding IP address to a container ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set &amp;lt;CTID&amp;gt; --ipadd &amp;lt;IP1&amp;gt;[,&amp;lt;IP2&amp;gt;,...] [--save]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|This option is incremental, so IP addresses are added to already existing ones.}}&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set 101 --ipadd 10.0.0.1 --save&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Removing IP address from a container ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set &amp;lt;CTID&amp;gt; --ipdel &amp;lt;IP1&amp;gt;[,&amp;lt;IP2&amp;gt;,...] [--save]&lt;br /&gt;
vzctl set &amp;lt;CTID&amp;gt; --ipdel all [--save]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set 101 --ipdel 10.0.0.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Sysctl ==&lt;br /&gt;
&lt;br /&gt;
You will need to configure some sysctl parameters to get your venet devices working.&lt;br /&gt;
Please have a look at the [[Installation_on_Debian#sysctl]] section.&lt;br /&gt;
&lt;br /&gt;
=== IPv6 ===&lt;br /&gt;
&lt;br /&gt;
To setup IPv6 networking with venet you'll need to enable the following in your sysctl.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    net.ipv6.conf.default.forwarding = 1&lt;br /&gt;
    net.ipv6.conf.all.forwarding     = 1&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In IPv6 you can't control forwarding per device, forwarding control has to take place in ip6tables, so all interfaces will forward IPv6 traffic. &lt;br /&gt;
&lt;br /&gt;
If you enable IPv6 forwarding for your interfaces, Linux assumes your host to act like a router and will ignore 'Router Advertisments' &lt;br /&gt;
(see [[Neighbor Discovery Protocol][http://en.wikipedia.org/wiki/Neighbor_Discovery_Protocol]] or [[Linux IPv6 Howto][http://mirrors.bieringer.de/Linux+IPv6-HOWTO/proc-sys-net-ipv6.html]]).&lt;br /&gt;
&lt;br /&gt;
You will as well need to configure a new v6 default gateway for your host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    ip addr add 2001:1:1:1:0::2/64 dev eth0&lt;br /&gt;
    route -6 add default gw 2001:1:1:1:0::1&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can add these commands to your existing network configuration on Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    iface eth0 inet static&lt;br /&gt;
        address 213.235.253.206&lt;br /&gt;
        netmask 255.255.255.240&lt;br /&gt;
        network 213.235.253.192&lt;br /&gt;
        broadcast 213.235.253.207&lt;br /&gt;
        gateway 213.235.253.193&lt;br /&gt;
        up   ip addr add 2001:1:1:1:0::2/64 dev eth0&lt;br /&gt;
        up   route -6 add default gw 2001:1:1:1:0::1&lt;br /&gt;
        down ip addr del 22001:1:1:1:0::2/64 dev eth0&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Veth]]&lt;br /&gt;
* [[Differences between venet and veth]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Networking]]&lt;br /&gt;
[[Category: HOWTO]]&lt;/div&gt;</summary>
		<author><name>Sts</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Virtual_network_device&amp;diff=6851</id>
		<title>Virtual network device</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Virtual_network_device&amp;diff=6851"/>
		<updated>2009-01-05T13:21:25Z</updated>

		<summary type="html">&lt;p&gt;Sts: /* IPv6 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Virtual network device (&amp;lt;code&amp;gt;venet&amp;lt;/code&amp;gt;) is the default network device for a [[container]]. This network device looks like a point-to-point connection between [[container]] and the [[CT0|host system]]. It does packet switching based on IP header. This is a default network device for container (an alternative is [[veth]] device).&lt;br /&gt;
&lt;br /&gt;
Venet device is created automatically on [[container]] start. Vzctl scripts set up an appropriate IP address and other settings on venet inside a container.&lt;br /&gt;
&lt;br /&gt;
==  Usage ==&lt;br /&gt;
&lt;br /&gt;
== Kernel module ==&lt;br /&gt;
First of all, check that &amp;lt;code&amp;gt;vznetdev&amp;lt;/code&amp;gt; module is loaded:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lsmod | grep vznetdev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is not, load the module:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# modprobe vznetdev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might want to check /etc/init.d/vz script to make sure the module gets loaded during startup.&lt;br /&gt;
&lt;br /&gt;
=== Adding IP address to a container ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set &amp;lt;CTID&amp;gt; --ipadd &amp;lt;IP1&amp;gt;[,&amp;lt;IP2&amp;gt;,...] [--save]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|This option is incremental, so IP addresses are added to already existing ones.}}&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set 101 --ipadd 10.0.0.1 --save&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Removing IP address from a container ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set &amp;lt;CTID&amp;gt; --ipdel &amp;lt;IP1&amp;gt;[,&amp;lt;IP2&amp;gt;,...] [--save]&lt;br /&gt;
vzctl set &amp;lt;CTID&amp;gt; --ipdel all [--save]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set 101 --ipdel 10.0.0.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Sysctl ==&lt;br /&gt;
&lt;br /&gt;
You will need to configure some sysctl parameters to get your venet devices working.&lt;br /&gt;
Please have a look at the [[Installation_on_Debian#sysctl]] section.&lt;br /&gt;
&lt;br /&gt;
=== IPv6 ===&lt;br /&gt;
&lt;br /&gt;
To setup IPv6 networking with venet you'll need to enable the following in your sysctl.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    net.ipv6.conf.default.forwarding = 1&lt;br /&gt;
    net.ipv6.conf.all.forwarding     = 1&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In IPv6 you can't control forwarding per device, forwarding control has to take place in ip6tables, so all interfaces will forward IPv6 traffic. &lt;br /&gt;
&lt;br /&gt;
If you enable IPv6 forwarding for your interfaces, Linux assumes your host to act like a router and will ignore 'Router Advertisments' &lt;br /&gt;
(see [[http://en.wikipedia.org/wiki/Neighbor_Discovery_Protocol]] or [[http://mirrors.bieringer.de/Linux+IPv6-HOWTO/proc-sys-net-ipv6.html]]).&lt;br /&gt;
&lt;br /&gt;
You will as well need to configure a new v6 default gateway for your host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    ip addr add 2001:1:1:1:0::2/64 dev eth0&lt;br /&gt;
    route -6 add default gw 2001:1:1:1:0::1&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can add these commands to your existing network configuration on Debian/Linux:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    iface eth0 inet static&lt;br /&gt;
        address 213.235.253.206&lt;br /&gt;
        netmask 255.255.255.240&lt;br /&gt;
        network 213.235.253.192&lt;br /&gt;
        broadcast 213.235.253.207&lt;br /&gt;
        gateway 213.235.253.193&lt;br /&gt;
        up   ip addr add 2001:1:1:1:0::2/64 dev eth0&lt;br /&gt;
        up   route -6 add default gw 2001:1:1:1:0::1&lt;br /&gt;
        down ip addr del 22001:1:1:1:0::2/64 dev eth0&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Veth]]&lt;br /&gt;
* [[Differences between venet and veth]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Networking]]&lt;br /&gt;
[[Category: HOWTO]]&lt;/div&gt;</summary>
		<author><name>Sts</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Virtual_network_device&amp;diff=6850</id>
		<title>Virtual network device</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Virtual_network_device&amp;diff=6850"/>
		<updated>2009-01-05T12:35:37Z</updated>

		<summary type="html">&lt;p&gt;Sts: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Virtual network device (&amp;lt;code&amp;gt;venet&amp;lt;/code&amp;gt;) is the default network device for a [[container]]. This network device looks like a point-to-point connection between [[container]] and the [[CT0|host system]]. It does packet switching based on IP header. This is a default network device for container (an alternative is [[veth]] device).&lt;br /&gt;
&lt;br /&gt;
Venet device is created automatically on [[container]] start. Vzctl scripts set up an appropriate IP address and other settings on venet inside a container.&lt;br /&gt;
&lt;br /&gt;
==  Usage ==&lt;br /&gt;
&lt;br /&gt;
== Kernel module ==&lt;br /&gt;
First of all, check that &amp;lt;code&amp;gt;vznetdev&amp;lt;/code&amp;gt; module is loaded:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lsmod | grep vznetdev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is not, load the module:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# modprobe vznetdev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might want to check /etc/init.d/vz script to make sure the module gets loaded during startup.&lt;br /&gt;
&lt;br /&gt;
=== Adding IP address to a container ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set &amp;lt;CTID&amp;gt; --ipadd &amp;lt;IP1&amp;gt;[,&amp;lt;IP2&amp;gt;,...] [--save]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|This option is incremental, so IP addresses are added to already existing ones.}}&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set 101 --ipadd 10.0.0.1 --save&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Removing IP address from a container ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set &amp;lt;CTID&amp;gt; --ipdel &amp;lt;IP1&amp;gt;[,&amp;lt;IP2&amp;gt;,...] [--save]&lt;br /&gt;
vzctl set &amp;lt;CTID&amp;gt; --ipdel all [--save]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set 101 --ipdel 10.0.0.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Sysctl ==&lt;br /&gt;
&lt;br /&gt;
You will need to configure some sysctl parameters to get your venet devices working.&lt;br /&gt;
Please have a look at the [[Installation_on_Debian#sysctl]] section.&lt;br /&gt;
&lt;br /&gt;
=== IPv6 ===&lt;br /&gt;
&lt;br /&gt;
If you expect any problems with configuring IPv6 for your CTs, &lt;br /&gt;
this OpenVZ forum thread might help:&lt;br /&gt;
&lt;br /&gt;
http://forum.openvz.org/index.php?t=msg&amp;amp;goto=14752&amp;amp;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Veth]]&lt;br /&gt;
* [[Differences between venet and veth]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Networking]]&lt;br /&gt;
[[Category: HOWTO]]&lt;/div&gt;</summary>
		<author><name>Sts</name></author>
		
	</entry>
</feed>