qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Bridge with qemu VMs & VDE


From: James Oakley
Subject: Re: [Qemu-devel] Bridge with qemu VMs & VDE
Date: Mon, 21 Aug 2006 12:23:02 -0300
User-agent: KMail/1.9.4

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.
address@hidden
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.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++




reply via email to

[Prev in Thread] Current Thread [Next in Thread]