All of lore.kernel.org
 help / color / mirror / Atom feed
From: Asias He <asias.hejun@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	Pekka Enberg <penberg@kernel.org>, Ingo Molnar <mingo@elte.hu>,
	Amos Kong <akong@redhat.com>,
	kvm@vger.kernel.org
Subject: Re: Does macvtap support host to guest communication?
Date: Mon, 18 Apr 2011 18:21:19 +0800	[thread overview]
Message-ID: <4DAC109F.1060807@gmail.com> (raw)
In-Reply-To: <201104180858.09828.arnd@arndb.de>

On 04/18/2011 02:58 PM, Arnd Bergmann wrote:
> 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.

Hi, Arnd

Works for me now. Thanks!

Here are some thoughts on the macvtap:

(1) Is it possible to add an interface to macvtap like /dev/net/tun,
eg, /dev/net/macvtap. Currently, it is hard to use macvtap programmatically.

(2) Adding another macvlan device(e.g., macvlan0) to the hardware
interface(e.g., eth0) and using it as the old eth0 make the process of
using macvtap complicate. One has to reconfigure the network. This is
not optimal from the user perspective. Is it possible to leave the
low-level device as is when using the macvtap device?

> 
> The other option is to use a vepa enabled bridge, but these are relatively
> rare.
> 
> 	Arnd
> 


-- 
Best Regards,
Asias He

  reply	other threads:[~2011-04-18 10:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-18  6:10 Does macvtap support host to guest communication? Asias He
2011-04-18  6:58 ` Arnd Bergmann
2011-04-18 10:21   ` Asias He [this message]
2011-04-18 10:53     ` Arnd Bergmann
2011-04-18 12:01       ` Ingo Molnar
2011-04-18 13:20         ` Arnd Bergmann
2011-04-18 14:30           ` Asias He
2011-04-18 15:05             ` Arnd Bergmann
2011-04-18 15:28               ` Asias He
2011-04-19 12:14                 ` Arnd Bergmann
     [not found]                   ` <BANLkTi=MYexojZrCS_EMuHq+A1=zFyxM6g@mail.gmail.com>
2011-04-21 14:54                     ` Arnd Bergmann
2011-04-26  9:34                   ` Michael S. Tsirkin
2011-04-18 13:29         ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DAC109F.1060807@gmail.com \
    --to=asias.hejun@gmail.com \
    --cc=akong@redhat.com \
    --cc=arnd@arndb.de \
    --cc=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mst@redhat.com \
    --cc=penberg@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.