Skip site navigation (1)Skip section navigation (2)
Date:      07 Apr 2006 14:20:37 -0400
From:      Lowell Gilbert <lowell@be-well.ilk.org>
To:        freebsd-net@freebsd.org
Subject:   Re: qemu + 802.1Q VLANs
Message-ID:  <44odzdnt6y.fsf@be-well.ilk.org>
In-Reply-To: <1144265008.00498663.1144252202@10.7.7.3>
References:  <1144265008.00498663.1144252202@10.7.7.3>

next in thread | previous in thread | raw e-mail | index | archive | help
Oliver Fromme <olli@lurza.secnetix.de> writes:

> I'm running FreeBSD/i386 RELENG_6 as a guest within qemu
> on a FreeBSD host.  Guest and host are connected through
> the usual tap0/ed0 virtual ethernet.
> 
> The host receives an 802.1Q VLAN trunk from a VLAN-capable
> Cisco switch, and uses several VLANs from within that trunk.
> I would like to access some of the VLANs from the guest OS
> running in qemu, too, but haven't been able to find out how
> to do that.
> 
> So, here's the question:  Is it possible to "forward" a
> VLAN trunk into a qemu guest somehow, so that both host
> and guest can use VLANs from it?

Yes.  [Fabulously useful technique, by the way; I have set up some
very complicated test configurations on a single fiber this way.]

You need to bridge to the guest's interface.  I think this is the
minimum example you'll need as a hint:

ifconfig bridge0 create
ifconfig vlan11 create
ifconfig vlan11 vlan 11 vlandev ti0 up
qemu -net nic,vlan=0,macaddr=52:54:00:12:12:01 -net tap,ifname=/dev/tap0,vlan=0 disk.image
ifconfig bridge0 addm vlan11 addm tap0 up



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44odzdnt6y.fsf>