OpenVZ Forum


Home » General » Support » How to setup VENET on containers with unique IPs
icon4.gif  How to setup VENET on containers with unique IPs [message #34842] Fri, 06 February 2009 07:18 Go to next message
hisaltesse is currently offline  hisaltesse
Messages: 6
Registered: February 2009
Junior Member
Alright guys, I have been working on this openvz for the entire week and still have neither succeeded connecting to the internet from the containers, nor set them up with unique IPs.

I find it very frustrating how no matter what tutorial you follow there is always a short coming. I have tried 10 different instructions and no luck. I would really really really appreciate if someone could give me a clear walk through here.

Here is my situation. I bought a dedicated server and it came with 5 IPs, one of which if for the host node. I would like to setup Containers (with venet only, not veth) for my students in such a way that they can access them from online and use them for a course.

I have two issues:
1. I would like to give a unique IP to each container the same way hosting providers do on VPS. (And I don't want to use veth, as I would like to avoid ip sniffing). Most hosting providers seem to offer VPS with venet configured.

So how do they give unique IPs then? do they configure the containers with unique IPs on VENET or do they keep the containers IPs internal to the host and create virtual hosts in each container to assign it a unique IP from the internet? The goal is the give root access to the container to the user.

2. Using venet I have not been able to configure the container to have access to the internet. I followed many tutorials but none of them worked.
Can you please advice a clear walkthrough on how to properly setup networking with venet please?

I have a dedicated server with a fresh centos 5 64bit with nothing in the IPTABLES file. I installed everything successfully and manage to create and run the containers but can't get this networking piece to work.

I would really appreciate some help here. THANK YOU.
Re: How to setup VENET on containers with unique IPs [message #34843 is a reply to message #34842] Fri, 06 February 2009 09:05 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hello,

Quote:


. Using venet I have not been able to configure the container to have access to the internet. I followed many tutorials but none of them worked.
Can you please advice a clear walkthrough on how to properly setup networking with venet please?



Until you don't specify your network configuration the general answer would be another tutorial for example
http://wiki.openvz.org/Venet

Common information that might be useful and required in cases of network problems is described here
http://forum.openvz.org/index.php?t=tree&goto=27545& #msg_27545

Anyway I'd like to pay your attention on some points which you have to bear in mind during venet configuration.

1. Please set sysctl properly.
http://wiki.openvz.org/Quick_installation#sysctl
2. Please make sure that ip addresses you've got from provider are workable and you are allowed to use them accessing internet.
3. If they are private not public addresses it might be necessary to use some sort of NAT
http://wiki.openvz.org/Using_NAT_for_container_with_private_ IPs
4. After adding any ip address to your VE make sure that you are able to connect it at least from HN (check "ip r l" output and find a record with the ip address you set to VE with venet0 interface)
5. If all ip addresses are at the same network check "arp -n" output from HN and also check the presence of a record with your VE ip address.
6. Check that you set DNS server inside VE properly (--nameserver option of vzctl)
7. tcpdump is a good tool to determine packets behavior. Ping something from inside the VE and run tcpdump at that time on venet0 interface inside VE, on venet0 interface on the HN and on physical interace on the HN.

Hope some previous notes help you. Good luck!
Re: How to setup VENET on containers with unique IPs [message #34847 is a reply to message #34842] Fri, 06 February 2009 11:15 Go to previous message
schjeall is currently offline  schjeall
Messages: 27
Registered: February 2009
Location: Denmark
Junior Member
Hello

I can almost feel you frustration. Smile Reading through docs and forum posts and not getting anywhere, frustrating!

I don't know if VENET should have a default gateway. I had problems getting my VE on the net, using VETH. I just needed to
add a default route to my gateway, using the following command:

(from inside VE)
# route add default gw 192.168.1.1 dev eth0

[Updated on: Fri, 06 February 2009 11:15]

Report message to a moderator

Previous Topic: hardware performance question
Next Topic: [answered] Conflicts with VMWare and VirtualBox
Goto Forum:
  


Current Time: Sun Aug 18 01:31:33 GMT 2024

Total time taken to generate the page: 0.02796 seconds