OpenVZ Forum


Home » General » Support » OpenVZ and multiple physical interfaces
OpenVZ and multiple physical interfaces [message #30928] Tue, 10 June 2008 19:16 Go to next message
stukov is currently offline  stukov
Messages: 3
Registered: June 2008
Junior Member
Hello,

Is there any way to make a VE have access to multiple physical interfaces on different networks without having to reserve that physical interface to a single VE considering the two interfaces are on different subnets?


Thanks!
Re: OpenVZ and multiple physical interfaces [message #31097 is a reply to message #30928] Wed, 18 June 2008 08:51 Go to previous messageGo to next message
linash is currently offline  linash
Messages: 3
Registered: June 2008
Junior Member
hi,

up!

I am looking for a solution to this, too.

The first IP works correctly but the second on the other subnet don't allow to ping anything but the host.
(whichever subnet is set up first is the only one working)

[SOLVED] Re: OpenVZ and multiple physical interfaces [message #31099 is a reply to message #31097] Wed, 18 June 2008 09:41 Go to previous message
linash is currently offline  linash
Messages: 3
Registered: June 2008
Junior Member
ok I got it to work, just needed to add the correct routes inside the VE to use venet0:1 for one subnet and venet0:0 as the default gateway.

(centos VE)

# vzctl set 113 --ipadd a.b.c.d --ipadd e.f.g.h --save

# vzctl enter 113


and then configure routes so that:

# cat /etc/sysconfig/network-scripts/route-venet0
e.f.g.h/24 dev venet0:1

# cat /etc/sysconfig/network
NETWORKING="yes"
HOSTNAME="vps-name"
GATEWAY="localhost"
GATEWAYDEV="venet0:0"


EDIT: seams that this last modification does not survive restart.
I had to either add:
route add default venet0:0

to /etc/rc.local
or modify /etc/vz/dists/scripts/functions with:
FAKEGATEWAY=localhost
FAKEGATEWAYNET=255.255.255.255

[Updated on: Wed, 18 June 2008 13:41]

Report message to a moderator

Previous Topic: undump failed: Invalid argument
Next Topic: Compiling Kernel from GIT
Goto Forum:
  


Current Time: Sat Nov 09 01:10:31 GMT 2024

Total time taken to generate the page: 0.03200 seconds