Network configuration OpenVZ Container with bridged device

MasterTH

Renowned Member
Jun 12, 2009
229
7
83
www.sonog.de
Hi guys,

i've got a problem.
my server has ip 189.x.x.x netmask 255.255.255.0
the ip for the openvz container is 95.x.x.x . i decided to use the bridged mode because i want to count how much traffic is used by this device.
So is created the container, made "ifconfig eth0 ip-adress netmask 255.255.255.255"
now i should do "route add default gw 189.x.x.x.x eth0" but i got the error: "SIOCADDRT: no such process"


what's wrong?
 
Why don't you use the default network setup from your OS (What OS is the container - Debian?)
 
my server has ip 189.x.x.x netmask 255.255.255.0
So is created the container, made "ifconfig eth0 ip-adress netmask 255.255.255.255"
now i should do "route add default gw 189.x.x.x.x eth0" but i got the error: "SIOCADDRT

Try ifconfig eth0 95.x.x.x netmask 255.255.255.0 and then the route command will be OK...
 
nope

didn't work
Same error

i've got some debian 5 servers running in kvm-mode with same configuration
but with debian 6 it seems to be not possible.
 
Last edited:
Hi guys,

i've got a problem.
my server has ip 189.x.x.x netmask 255.255.255.0
the ip for the openvz container is 95.x.x.x . i decided to use the bridged mode because i want to count how much traffic is used by this device.
So is created the container, made "ifconfig eth0 ip-adress netmask 255.255.255.255"
now i should do "route add default gw 189.x.x.x.x eth0" but i got the error: "SIOCADDRT: no such process"


what's wrong?
Hi,
your default gateway must be in the same network like your VM.
But this is impossible because you define only a /32 ip for your VM.

Udo
 
/32 ip for your VM
the vm isn't accessible from clients if they're in same subnet as the vm

i just wonna tell the vm all traffic you have, has to go over the gateway and the gateway is accessible from the vm...


i'll try with Debian 5


TESTED IT:
But doesn't work
Whats the problem?
 
Last edited: