From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: Does macvtap support host to guest communication? Date: Mon, 18 Apr 2011 08:58:09 +0200 Message-ID: <201104180858.09828.arnd@arndb.de> References: <4DABD5BC.2040204@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: "Michael S. Tsirkin" , Jason Wang , Pekka Enberg , Ingo Molnar , Amos Kong , kvm@vger.kernel.org To: Asias He Return-path: Received: from moutng.kundenserver.de ([212.227.126.171]:54654 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752821Ab1DRG6d (ORCPT ); Mon, 18 Apr 2011 02:58:33 -0400 In-Reply-To: <4DABD5BC.2040204@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On Monday 18 April 2011, Asias He wrote: > > Hi, folks > > I am trying to use qemu/qemu-kvm with macvtap using following commands: > > # ip link add link eth0 name v0 type macvtap mode {vepa,bridge,private} > # ip link set v0 address da:4e:17:88:42:b1 up > # idx=`ip link show v0 | grep mtu| awk -F":" '{print $1}'` > # kvm -net nic,macaddr=da:4e:17:88:42:b1 -net tap,fd=3 -hda > /home/asias/qemu-stuff/sid.img 3<>/dev/tap${idx} > > I found that guest can access other hosts on the LAN except the host > where guest lives, and host where guest lives can not access guest. > > My question is: Does macvtap support host(hypervisor host) to guest > communication? > You can communicate between macvtap and macvlan devices when they are in bridge mode, but these devices cannot communicate with clients that run on the underlying device. Just add a macvlan device to your hardware interface and use that in the host instead of running on the low-level device directly. The other option is to use a vepa enabled bridge, but these are relatively rare. Arnd