From: J L Subject: Re: Multiple TAP Interfaces, with multiple bridges Date: Wed, 3 Feb 2010 17:44:56 +0000 Message-ID: <15f314a41002030944t2d8642a3sbb3347ea58501615@mail.gmail.com> References: <15f314a41002030856o70066267pc2e8f2b768fd3d83@mail.gmail.com> <201002031816.02035.arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE To: arnd@arndb.de, kvm@vger.kernel.org, tahm@linux.vnet.ibm.com Return-path: Received: from gv-out-0910.google.com ([216.239.58.188]:21653 "EHLO gv-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932768Ab0BCRpA convert rfc822-to-8bit (ORCPT ); Wed, 3 Feb 2010 12:45:00 -0500 Received: by gv-out-0910.google.com with SMTP id l14so126569gvf.37 for ; Wed, 03 Feb 2010 09:44:59 -0800 (PST) In-Reply-To: <201002031816.02035.arnd@arndb.de> Sender: kvm-owner@vger.kernel.org List-ID: On 3 February 2010 17:16, wrote: > On Wednesday 03 February 2010 17:56:43 J L wrote: >> I am having an odd networking issue. It is one of those "it used to >> work, and now it doesn't" kind of things. I can't work out what I am >> doing differently. >> >> I have a virtual machine, started with (among other things): >> =C2=A0 -net nic,macaddr=3Dfa:9e:0b:53:d2:7d,model=3Drtl8139 -net >> tap,script=3D/images/1/ifup-eth0,downscript=3D/images/1/ifdown-eth0 >> =C2=A0 -net nic,macaddr=3Dfa:02:4e:86:ed:ce,model=3De1000 -net >> tap,script=3D/images/1/ifup-eth1,downscript=3D/images/1/ifdown-eth1 > > This seems to be missing a vlan=3D option at least for the second pai= r: > >> What I actually get: >> =C2=A0 * VM: eth1, dest MAC of Host's tap1/br0 >> =C2=A0 * Host: tap1, dest MAC of Host's tap1/br0 >> =C2=A0 * Host: br1, dest MAC of Host's tap1/br0 >> =C2=A0 * Host should, but does not route from br0 to br1 >> =C2=A0 * Host: tap0, dest MAC of ***Host's tap1/br0*** >> =C2=A0 * Host: br0, dest MAC of ***Host's tap1/br0** >> =C2=A0 * Host: eth0, no packet >> =C2=A0 * Server: eth0, no packet >> >> As you can see, the packet has egressed both tap interfaces! Is this >> expected behaviour? What can I do about this? > > Qemu forwards this packet to everything inside of the same vlan, whic= h > is 0 by default. Does it work with this? > > =C2=A0 -net nic,vlan=3D1,macaddr=3Dfa:9e:0b:53:d2:7d,model=3Drtl8139 = -net tap,vlan=3D1,script=3D/images/1/ifup-eth0,downscript=3D/images/1/i= fdown-eth0 > =C2=A0 -net nic,vlan=3D2,macaddr=3Dfa:02:4e:86:ed:ce,model=3De1000 -n= et tap,vlan=3D2,script=3D/images/1/ifup-eth1,downscript=3D/images/1/ifd= own-eth1 Thanks, both to you and Tom, who both emailed this piece of clue at the same time :) My misunderstanding was in thinking that vlan=3DXX would mean the packets would land on the bridge with that VLAN tag, not what it seems to actually be doing, of being used to tie one-or-more '-net nic' sections with one-or-more '-net tap' sections. That is, I though the vlan=3DXX was host-wide, not guest-wide. Don't know how it worked before - probably I just never noticed the extra packets. >> If I remove tap0 from the bridge, I then get: >> =C2=A0 * VM: eth1, dest MAC of Host's tap1/br0 >> =C2=A0 * Host: tap1, dest MAC of Host's tap1/br0 >> =C2=A0 * Host: br1, dest MAC of Host's tap1/br0 >> =C2=A0 * Host should, but does not, route from br0 to br1 >> =C2=A0 * Host: tap0, no packet >> =C2=A0 * Host: br0, no packet >> =C2=A0 * Host: eth0, no packet >> =C2=A0 * Server: eth0, no packet >> >> This is the other half of my problem: in this case, with effectively >> only one tap, the host is not routing between br1 and br0. The packe= t >> just gets silently dropped. Does anyone know what I am doing wrong? > > Maybe /proc/sys/net/ipv4/ip_forward is disabled? Sorry, forgot to mention that bit. It is '1'. I added a '-j LOG' rule to the FORWARD table (as the only rule, policy ACCEPT), and can see that the packets from the VM never make it to the =46ORWARD table. > > =C2=A0 =C2=A0 =C2=A0 =C2=A0Arnd > Thanks, --=20 Jarrod Lowe