[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Consulta Container 2 Nic OpenVz



On Thu, Feb 25, 2010 at 4:11 AM, CHACO <diego.chacon@gmail.com> wrote:
>
>
> On Wed, Feb 24, 2010 at 8:47 PM, debian@mstaaravin.com.ar
> <debian@mstaaravin.com.ar> wrote:
>>
>> 2010/2/24 CHACO <diego.chacon@gmail.com>:
>> > Configure devices in CT0
>> > [host-node]# ifconfig veth101.0 0
>> > [host-node]# echo 1 > /proc/sys/net/ipv4/conf/veth101.0/forwarding
>> > [host-node]# echo 1 > /proc/sys/net/ipv4/conf/veth101.0/proxy_arp
>> > [host-node]# echo 1 > /proc/sys/net/ipv4/conf/eth0/forwarding
>> > [host-node]# echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
>> >
>> >
>> > [edit] Configure device in CT
>> > [host-node]# vzctl enter 101
>> > [ve-101]# /sbin/ifconfig eth0 0
>> > [ve-101]# /sbin/ip addr add 10.100.0.3 dev eth0
>> > [ve-101]# /sbin/ip route add default dev eth0
>> >
>> > Y finalmente  ip route add 10.100.03 dev veth101.0
>>
>> Pregunta, porque no entendí bien...
>>
>> Dijiste que pudiste agregarle una segunda interfaz a la VM.....?
>> En este caso "eth1"..............?
>>
>> Qué IP tiene esa interface...........?
>>
>> Agregaste una nueva ruta si tiene una IP distinta en el host
>> anfitrion....?
>> Tal como esto:
>> ip route add 10.100.03 dev veth101.0
>> ip route add 192.168.0.1 dev veth101.1
>>
>>
>
>
> El host anfitrio tiene dos interfaces de red fisicas conectadas a dos redes
> diferentes.
> Lo que necesito es que un container se comunique con una red y el otro
> container con la otra red.
>

tienes 2 containers:

container 100
container 101

tienes dos redes

10.0.0.0/24
192.168.1.0/24

solo ponle una ip de la subred que quieras a cada container y openvz
hará el resto.

# nano /etc/vz/conf/100.conf
[...]
IP_ADDRESS="10.0.0.10"
[...]

# nano /etc/vz/conf/101.conf
[...]
IP_ADDRESS="192.168.1.10"
[...]

así de simple.


Reply to: