OpenVZ Forum


Home » General » Support » Networking in OpenVZ
Networking in OpenVZ [message #210] Sun, 09 October 2005 20:57 Go to next message
Surferdude is currently offline  Surferdude
Messages: 11
Registered: October 2005
Junior Member
Ah, the last piece of the Puzzle... Networking. The box that I have running OpenVZ is currently hosted at LayeredTech. Over there I get a Private VLAN with 8 IP's and three used to create the VLAN which gives me 5 usable IP's. I tried allocating one of them by doing:

Quote:

vzctl set 101 --ipadd <ip here> --save


But the after doing this the VPS is not reachable via the IP i assigned it. Any ideas on why this isnt working?

Thanks
Re: Networking in OpenVZ [message #211 is a reply to message #210] Sun, 09 October 2005 22:22 Go to previous messageGo to next message
devnu11 is currently offline  devnu11
Messages: 64
Registered: September 2005
Location: USA
Member

DeJaVous.. My box is at Layered. The way that I made it work was to not enter the IP's through /etc/sysconfig/network-scripts. I just add them through vzctl and all is fine. I'm not sure if this is correct but it does function correctly that way. Maybe someone from SW can comment on if there is another way, but this will get you up and running for now.

Just Because You Have One, Doesn't Mean You Have To Be One!
Re: Networking in OpenVZ [message #212 is a reply to message #211] Sun, 09 October 2005 22:57 Go to previous messageGo to next message
Surferdude is currently offline  Surferdude
Messages: 11
Registered: October 2005
Junior Member
The IP's arent up when I add them, but it still does not work.
Re: Networking in OpenVZ [message #213 is a reply to message #212] Mon, 10 October 2005 00:23 Go to previous messageGo to next message
devnu11 is currently offline  devnu11
Messages: 64
Registered: September 2005
Location: USA
Member

Try using the delete command first
vzctl set 101 --ipdel 123.123.123.123 FROM ALL VPS you have created.

As root or su -l type ifconfig to show your active IP's

If you only have one your all set.

If you have more than one IP go to /etc/sysconfig/network-scripts and rename the file ifcfg-eth0-range0 by something like "mv ifcfg-eth0-range0 OLDifcfg-eth0-range0" then "/etc/init.d/network restart"

If there was only one IP showing and the VPS still does not respond I would guess you did not bind SSHD to just the main IP of the box. Not only is this essential but its helps to secure the box. Otherwise SSHD will bind to every IP you have on the box from the default sshd_config and you won't get very far with your newly created VPS.

Good Luck!









Just Because You Have One, Doesn't Mean You Have To Be One!
Re: Networking in OpenVZ [message #214 is a reply to message #210] Mon, 10 October 2005 07:52 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

devnu11, I will try to explain/help with networking if you describe the situation in more details.
What is the configuration you had before OVZ?
What have you tried to do and it didn't work,
and what you do know (when it works).


http://static.openvz.org/userbars/openvz-developer.png
Re: Networking in OpenVZ [message #216 is a reply to message #214] Mon, 10 October 2005 13:24 Go to previous message
devnu11 is currently offline  devnu11
Messages: 64
Registered: September 2005
Location: USA
Member

dev

When I started to install OVZ all my IP's were homed to the box. This file covered all the IP's except the main server IP:

ifcfg-eth0-range0
## Start

IPADDR_START=72.123.123.123

IPADDR_END=72.123.123.130

CLONENUM_START=0

## END

(IP changed for security purposes)

I renamed this file OLDifcfg-eth0-range0

then /etc/init.d/network restart

At this point I could add IP's via "vzctl set" and everything functioned correctly. Prior to renaming the file the IP's added via "vzctl set" added normally to the VPS but the VPS was without network connection. I was just curious if this was the correct way to do this. Hope I was clear enough.


Just Because You Have One, Doesn't Mean You Have To Be One!
Previous Topic: Setting RAM
Next Topic: 'non-server' devices
Goto Forum:
  


Current Time: Mon Sep 08 18:46:59 GMT 2025

Total time taken to generate the page: 0.07206 seconds