[Users] split traffic between two venet

knawnd at gmail.com knawnd at gmail.com
Wed Oct 28 07:50:45 PDT 2015


Kir Kolyshkin wrote on 27/10/15 19:36:
> On 10/27/2015 12:26 AM, knawnd at gmail.com wrote:
>> Hello!
>>
>> I wonder if it is possible to implement the following scenario using venet but not veth device.
>> There is a server with two network interfaces eth0 and eth1. Eth0 is connected to public network,
>> eth1 - to private one. There is also venet0 interface on that host. CT running on that host has
>> two venet - venet0:0 and venet0:1.
>> I need to route all traffic from/to first venet interface inside CT (i.e. venet0:0) to the eth0,
>> and the second one (venet0:1) - to the eth1, i.e. completely split public and private traffic.
>> Maybe there is a way to add one more venetX device on the physical server (in addition to the
>> already existing one venet0) and link/map them as below:
>> eth0 <-> venet0 <-> venet0:0
>> eth1 <-> venet1 <-> venet1:0
>>  or maybe its possible somehow do the same but with just single venet0?
>
> Traffic is routed according to routing tables. For example, with the following setup
>
> On the host:
> eth0 112.3.4.5/24
> eth1 10.1.2.3/8
> default route via eth0
>
> And a container with two venet IPs:
> 112.3.4.22/24
> 10.1.3.22/8
>
> Then the traffic to 10.0.0.0/8 will go via eth1, and the rest will go via eth0.
>
> In other words, you don't have to do anything special about it, just make
> sure you specify the network masks when assigning IPs.
Kyr, thanks a lot for prompt reply!

It seems like our network settings need to be tuned.

Best regards,
Nikolay.
> _______________________________________________
> Users mailing list
> Users at openvz.org
> https://lists.openvz.org/mailman/listinfo/users


More information about the Users mailing list