From: James Oakley <joakley@solutioninc.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Bridge with qemu VMs & VDE
Date: Mon, 21 Aug 2006 12:23:02 -0300 [thread overview]
Message-ID: <200608211223.02255.joakley@solutioninc.com> (raw)
In-Reply-To: <e8lves$jvo$1@sea.gmane.org>
On Friday 07 July 2006 12:36 pm, Adrian Gschwend wrote:
> Hi all,
>
> I try to connect my qemu sessions to the "normal" local network, I would
> like to do it bridged, which means I don't want to port/ip forwards or
> anything like this.
>
> I set up VDEv2.0 and launched vde_switch, tap0 gets created. As long as
> I work like this and start qemu with vdeqemu everything works fine, I
> can use the whole setup as a virtual switch and ping the tun0 IP and the
> VMs.
>
> Now I thought I will create a bridge interface, let's call it br0. I add
> eth0 to the bridge with "brctl addif eth0", and I do the same for tap0.
You don't need VDE at all for this setup. In fact, you probably don't want it.
Here is what I do:
On the qemu commandline, add the following options:
-net nic,macaddr=<specify_unique_mac>,vlan=0
-net tap,vlan=0,ifname=<specify_interface_name>
I often have machines with 2 or 3 interfaces, so I add the above options n
times, increasing the vlan each time. I also use descriptive interface names
to avoid confusion. Also, having unique mac addresses is very important. If
you have multiple interfaces on the same bridge with the same mac, they will
not be able to talk to each other.
Now create the bridge:
brctl addbr <bridge_name>
Add the interfaces:
brctl addif <bridge_name> <your_external_interface>
brctl addif <bridge_name> <your_qemu_interface>
Bring the bridge up:
ip link set <bridge_name> up
You may have to wait a few seconds before the bridge starts passing traffic.
Now if you have SUSE, I can help you more. Using SUSE's neat network scripts,
I automated all of this. Once I start some instance of qemu, the interfaces
get automatically placed into the proper existing bridges, or new bridges are
created and populated, depending on configuration. I can send the script and
instructions, if you are interested.
--
James Oakley
Engineering - SolutionInc Ltd.
joakley@solutioninc.com
http://www.solutioninc.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
This e-mail is CONFIDENTIAL and contains information intended only for the
person(s) named. Any other distribution, copying or disclosure is strictly
prohibited. If you have received this e-mail in error, please notify me
immediately at 902 420 0077 or reply by e-mail to the sender and destroy
the original communication.
Thank You.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
prev parent reply other threads:[~2006-08-21 15:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-07 15:50 [Qemu-devel] Bridge with qemu VMs & VDE Adrian Gschwend
2006-08-21 15:23 ` James Oakley [this message]
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=200608211223.02255.joakley@solutioninc.com \
--to=joakley@solutioninc.com \
--cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).