# Virtual Network Cable

## Spooky Ghost

Hi,

I'm trying to do some modelling of performance between two groups of virtual machines where the latency and bandwidth between the two sets is restricted.  I have one group of VMs connected to br0 and second group connected to br1.  What I would like is to connect these two bridges via a third bridge where I manipulate the bandwidth and latency.  In order to do this I need to find some kind of interface pair with a virtual cable that I can put the receiving side in one bridge and have all the traffic pop out in a second.  Does anyone know of any facility in Linux that can easily achieve this?  In some ways what I want is like the xen netfront/netback but with both parts being in the dom0.

I can see the following possible solutions but they seem more complicated than I would like.

1. Using pairs of tun/tap interfaces with userspace code that just shuffles traffic between the two halves but I would like to avoid writing the code and having the overhead of pulling everything in and out of userspace.

2. Try an ip tunnel between two dummy interfaces, one in each bridge.

----------

## Spooky Ghost

I seem to have found the answer myself after some more digging. The veth kernel module along with "ip link add name ABC type veth peer DEF" looks as though it should be what I want.

----------

