0

I've got a host with OpenVZ installed on it with several containers.

I want to set up a virtual network between some of them but without having to use any physical devices but I'm new to OpenVZ and their wiki has no obvious solutions.

Bugster
  • 111
  • 2
  • Have you read the OpenVZ Networking documentation (http://wiki.openvz.org/Category:Networking - Specifically http://wiki.openvz.org/Common_Networking_HOWTOs#Private_VEs_.28not_directly_visible_from_the_LAN.29)? - I know the OpenVZ documentation isn't fantastic, but we expect at least a minimum of having done some research and telling us what you've tried so far (and why it didn't work) in order to help you... – voretaq7 Nov 18 '11 at 19:58
  • From that page I found http://wiki.openvz.org/VLAN which is what I was looking for, I really need to brush on my networking terminology... – Bugster Nov 18 '11 at 20:42

1 Answers1

0

Switching from VENET networking to VETH networking would be ideal for that. With VETH you add interfaces of containers to bridges (see "brctl show", "brctl add", and others). OpenVZ wiki describes how to setup VETH. It's pretty easy but don't skip any steps.

Once setup, you just create persistent bridge devices on the HN and add a single line to each container conf (/etc/vz/config/*). When containers boot they will be in the private MAC-layer networks that you like.

I used this in production for 2 years on webservers and HPC clusters. It gives you all the neccessary control. I also found VETH high performance, reliable, and safe.

Aleksandr Levchuk
  • 2,465
  • 3
  • 22
  • 41