need network help different subnet

michaelvv

Renowned Member
Oct 9, 2008
103
3
83
Hi ...

I'm told to make this setup would it be possible.... I want 2 openvz containers how
should i do the setup...
Due to my limited network experience in this special case please guide me with a
setup for :

/etc/network/interfaces on Host
and how should i configure the containers vmbr0 or venet...

Want i want to do.

The containers should be able to ping the HOST and each other and be able to
connect to the gateway.
Is it possible.

Host

ip : 192.168.1.106
subnet : 255.255.255.0
gateway : 192.168.1.105

Container 1 VEID [101]

ip : 192.168.1.146
Default Gateway : 192.168.1.145
Subnet Mask : 255.255.255.252

Container 2 VEID [102]

ip : 192.168.1.150
Default Gateway : 192.168.1.149
Subnet Mask : 255.255.255.252

Thanks.

/Michael
 
Hi Michael,
thats possible, but in this case you need a router (perhaps the host) with one connection to each container-network.
You wrote, that the container should be able to connect to the gateway (.105?) - why you don't use the normal class-c netmask for all? If the container should not reach spezific hosts, you can use iptables. If you use an router, then you should nat the traffic from the container... i think the live is much easier with a normal class-c netmask.
Udo
 
HI Udo...

The provider is providing the routing....

They told us to use this setup....

Do you know who too configure the HOST , Containers...

/Michael