OpenVZ Forum


Home » General » Support » Virtual Ethernet Adapter (Migration from virtuozzo to OpenVZ)
icon9.gif  Virtual Ethernet Adapter [message #37703] Mon, 12 October 2009 09:21 Go to previous message
jaykarnik is currently offline  jaykarnik
Messages: 1
Registered: October 2009
Junior Member
I needed to set up two virtual networks on the local machine. One for the internal network and one for the external network. With virtuozzo i used the following commands to achieve this.

# vznetcfg net new vznetwork1
# vznetcfg net new vznetwork2

Also I defined a virtual network adapter eth0.1

# vznetcfg vlan add eth0 1

The primary network adapter eth0, is connected to the external network while the virtual network adapter eth0.1, is connected to the internal network. I connected the two network adapters to their respective virtual networks with the following commands.

# vznetcfg net addif vznetwork1 eth0
# vznetcfg net addif vznetwork2 eth0.1

then any container i wanted to use networking i did it as follows:

Add two network adapters to the containers
#vzctl set 254 --netif_add vznet1 --save
#vzctl set 254 --netif_add vznet2 -save

Configure the individual adapters.
#vzctl set 254 --ifname vznet1 --network vznetwork2 --ipadd
192.168.0.254 -gw 10.94.221.20 --save
#vzctl set 254 --ifname vznet2 --network vznetwork1 --ipadd
10.94.221.21/16 --gw 10.94.0.254 --nameserver 10.91.2.11 -save

I cant figure out how to do the same setup in openvz as the vznetcfg command is not working as it does with virtuozzo.
 
Read Message icon9.gif
Read Message
Previous Topic: Remote syslog without syslog daemon in VEs
Next Topic: Showing init scripts on bootup of a VE
Goto Forum:
  


Current Time: Mon Sep 16 04:24:43 GMT 2024

Total time taken to generate the page: 0.04028 seconds