Combining bridging, 802.1q, and tap

From: Chris Adams
Date: Wed Apr 15 2009 - 16:47:12 EST

I have a system with three NICs, one of which is running 802.1q to a
switch with a couple of VLANs. I have eth0, eth1, eth2.20, and eth2.30.
All is well with that setup.

Now I am trying to build a virtual (KVM) system on the system. I need
the same network access on the virtual system as on the physical system,
so I built three bridge interfaces and moved all the physical system's
network config (including the VLANs) to the bridges. So br0, br1,
br2.20, br2.30 (with eth0 in br0, eth1 in br1, eth2 in br2). That all

I am running qemu-kvm with options to create 3 NICs, each one with a tap
interface (tap0, tap1, and tap2). I have scripts called to add each one
to the corresponding bridge (tap0 to br0, tap1 to br1, tap2 to br2).
Everything works in the virtual system except for the VLANs.

Looking with tcpdump on the physical system, it looks like the packets
from the virtual system are going out without the VLAN tags.

Is this something that should work?
Chris Adams <cmadams@xxxxxxxxxx>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at