OpenVZ Forum


Home » General » Support » OpenVZ and multiple physical interfaces
[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

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


Current Time: Wed Oct 01 17:35:09 GMT 2025

Total time taken to generate the page: 0.20280 seconds