qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Connecting vde and LAN


From: Henrik Nordstrom
Subject: Re: [Qemu-devel] Connecting vde and LAN
Date: Mon, 11 Jul 2005 09:50:11 +0200 (CEST)

On Sun, 10 Jul 2005, Jim C. Brown wrote:

Yes, but if one was running multiple qemu guests, it would be cleaner to
implement this thru vde_switch instead of in qemu directly. That way eth0 is
intercepted by only a single process. (Also no worries about having permissions
to intercept packets and etc for qemu - just run vde_switch as root and qemu
as a regular user.)

I didn't mean to implement this in qemu directly, but rather in a helper similar to vdeq, but the primary method should be via vde_switch. Having this shortcut helper is a future extension.

Inspired by this discussion I now have a prototype vde_packet glue for vde_switch at http://www.henriknordstrom.net/examples/vde_packet.c, connecting the vde_switch to the LAN via a packet socket.

Light testing looks promising, but there is some known issues which may make this approach unfeasible for the intended target:

a) vde_switch 1.5.8 is buggy and bounces packets back the same port they came from if the destination MAC is known to reside there, causing a loop and near meltdown of the host. vde_switch should drop the packet in this case. The fix is trivial: if (target == port) return; at a suitable place near the top of port.c:send_dst(). I haven't looked if this may have been fixed in a later vde_switch release but I think not.

b) can't talk to the host itself. This is due to the packets going directly to the wire and never really "seen" by the host stack. Not sure yet if there is an easy way out, but I suppose it may be possible to set up a dummy tap with the same MAC and IP address as the base Ethernet device and duplicate broadcasts and packet directed to the host there, obviously assuming the administrator does not block this in firewalling..

Regards
Henrik




reply via email to

[Prev in Thread] Current Thread [Next in Thread]