librelist archives

« back to archive

How to do simple packet forwarding between VMs?

How to do simple packet forwarding between VMs?

From:
Ramona Koch
Date:
2014-06-25 @ 12:19
<html><head></head><body><div style="font-family: Verdana;font-size: 
12.0px;"><div>
<pre wrap="">Hi all,

I'm new to Click and I have a question, if the following scenario is
feasible with Click in user mode.
If so, could you give me a hint with which elements I have to use.

Scenario:

I have two VMs both running on the same host. Each one has an virtual
network interface with IPs within the same network, but different from
the hosts network.

    VM1---eth0 | tap0 -----> CLICK ------> tap1|eth0---VM2

Now I want to get the packets from the corresponding TAP device and
forward them to the second one using Click.
So I'm looking for something like:
fromDevice(tap0, SNIFFER false) -> Print(from_tap0) -> toDevice(tap1)
fromDevice(tap1, SNIFFER false) -> Print(from_tap1) -> toDevice(tap0)


I tried it already with fromDevice and fromHost, but I didn't manage to
get the packet, so that I guess, that the packets are dropped before.
Could it be that my scenario cannot be done with the user-mode Click? Or
am I missing something?

Thanks for your support,
Ramona
</pre>
</div></div></body></html>

How to do simple packet forwarding between VMs?

From:
Ramona Koch
Date:
2014-06-25 @ 12:25
Hi all,

I'm new to Click and I have a question, if the following scenario is
feasible with Click in user mode.
If so, could you give me a hint with which elements I have to use.

Scenario:

I have two VMs both running on the same host. Each one has an virtual
network interface with IPs within the same network, but different from
the hosts network.

    VM1---eth0|tap0 -----> CLICK ------> tap1|eth0---VM2

Now I want to get the packets from the corresponding TAP device and
forward them to the second one using Click.
So I'm looking for something like:
fromDevice(tap0, SNIFFER false) -> Print(from_tap0) -> toDevice(tap1)
fromDevice(tap1, SNIFFER false) -> Print(from_tap1) -> toDevice(tap0)


I tried it already with fromDevice and fromHost, but I didn't manage to
get the packet, so that I guess, that the packets are dropped before.
Could it be that my scenario cannot be done with the user-mode Click? Or
am I missing something?

Thanks for your support,
Ramona

Re: [click] How to do simple packet forwarding between VMs?

From:
Antonie Henning
Date:
2014-06-25 @ 16:04
Hi Ramona,

Some hypervisor drop traffic if the source/destination mac address is not 
the same as the one specified by the software virtual link. 'Assuming' the
click configs are fine, enabling promiscuous/bridging/Mac-spoofing might 
resolved the problem.

Regards
A


On Wednesday, June 25, 2014 2:25 PM, Ramona Koch <dev@ramona-koch.de> wrote:
 


Hi all,

I'm new to Click and I have a question, if the following scenario is
feasible with Click in user mode.
If so, could you give me a hint with which elements I have to use.

Scenario:

I have two VMs both running on the same host. Each one has an virtual
network interface with IPs within the same network, but different from
the hosts network.

    VM1---eth0|tap0 -----> CLICK ------> tap1|eth0---VM2

Now I want to get the packets from the corresponding TAP device and
forward them to the second one using Click.
So I'm looking for something like:
fromDevice(tap0, SNIFFER false) -> Print(from_tap0) -> toDevice(tap1)
fromDevice(tap1, SNIFFER false) -> Print(from_tap1) -> toDevice(tap0)


I tried it already with fromDevice and fromHost, but I didn't manage to
get the packet, so that I guess, that the packets are dropped before.
Could it be that my scenario cannot be done with the user-mode Click? Or
am I missing something?

Thanks for your support,
Ramona