From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: tun/tap and Vlans Date: Wed, 20 May 2009 13:38:04 +0300 Message-ID: <4A13DD8C.6090409@redhat.com> References: <0199E0D51A61344794750DC57738F58E66BBF927A9@GVW1118EXC.americas.hpqcorp.net> <4A0A7556.4070406@redhat.com> <0199E0D51A61344794750DC57738F58E66BC980A2D@GVW1118EXC.americas.hpqcorp.net> <4A107E3A.9050209@redhat.com> <1242717491.28272.12.camel@larosa> <4A12638E.9060701@redhat.com> <0199E0D51A61344794750DC57738F58E67D17F040B@GVW1118EXC.americas.hpqcorp.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Lukas Kolbe , "kvm@vger.kernel.org" To: "Fischer, Anna" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:57899 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752859AbZETKiS (ORCPT ); Wed, 20 May 2009 06:38:18 -0400 In-Reply-To: <0199E0D51A61344794750DC57738F58E67D17F040B@GVW1118EXC.americas.hpqcorp.net> Sender: kvm-owner@vger.kernel.org List-ID: Fischer, Anna wrote: >> Subject: Re: tun/tap and Vlans >> >> Lukas Kolbe wrote: >> >>>> Right, I guess you'd see this with a real switch as well? Maybe >>>> >> have >> >>>> your guest send a packet out once in a while so the bridge can learn >>>> >> its >> >>>> MAC address (we do this after migration, for example). >>>> >>>> >>> Does this mean that it is not possible for having each tun device in >>> >> a >> >>> seperate bridge that serves a seperate Vlan? We have experienced a >>> strange problem that we couldn't yet explain. Given this setup: >>> >>> Guest Host >>> kvm1 --- eth0 -+- bridge0 --- vlan1 \ >>> | +-- eth0 >>> kvm2 -+- eth0 -/ / >>> \- eth1 --- bridge1 --- vlan2 + >>> >>> When sending packets through kvm2/eth0, they appear on both bridges >>> >> and >> >>> also vlans, also when sending packets through kvm2/eth1. When the >>> >> guest >> >>> has only one interface, the packets only appear on one bridge and one >>> vlan as it's supposed to be. >>> >>> Can this be worked around? >>> >>> >> This is strange. Can you post the command line you used to start kvm2? >> > > This is exactly my scenario as well. > > When QEMU sends packets through the tun interface coming from a VM then those will be passed to both tap devices of that VM. Simply because it doesn't know where to send the packet to. It just copies the buffer to the tap interface. The tap interface then eventually discards the packet if the MAC address doesn't match its own. > > What you would need is a 1:1 mapping, e.g. one tun interface per tap device. > There ougt to be a 1:1 mapping thought the vlan parameter. -- error compiling committee.c: too many arguments to function