Qemu: Assigning two tap devices to one virtual machine
Juergen Lock
nox at jelal.kn-bremen.de
Mon Jun 1 16:42:35 UTC 2009
In article <20090523223024.GA93488 at volt.iem.pw.edu.pl> you write:
>Hello all,
>
>I'm running qemu 0.10.5 on CURRENT machine and experienced an
>interesting problem.
>
>I try to run a single qemu machine with two network interfaces (tap's)
>connected to the same bridge - I need this for playing with m0n0wall for
>example.
>
>The qemu launch looks similiar to this:
>
>qemu -net nic -net tap -net nic -net tap -cdrom cdrom.iso -curses
>
>What happens is that when qemu starts up - my machine locks (sometimes I
>manage to kill qemu and recover it, sometimes not). I see that it's a
>problem with network bridge - looks like the infitine loop of arp
>requests that get replicated infinitely (it also kills/floods my real network
>that is connected through the bridge to the tap devices).
>
>My question is - have any of You tried to use multiple tap devices within
>one qemu machine? Can you replicate this problem in your environments?
>
>One note: there is no problem if I run two qemus and each of them has a
>tap device connected to bridge0. They coexist and I have no network
>issues in both guests. I can post qemu-if{up,down} scripts if needed.
Ok just in case this hasn't been resolved yet...
Try something like
qemu -net nic -net tap -net nic,vlan=1,macaddr=52:54:00:12:34:57 -net tap,vlan=1 -cdrom cdrom.iso -curses
and if you want you can also add `,model=e1000' to the -net nic parameters,
that one (em(4) on FreeBSD) should perform a little better than the default
ne2kpci (ed(4) on FreeBSD.)
Explanation: vlan= is used to associate -net nic with -net tap/user/pcap
connections (default is vlan=0), and macaddr= you need because qemu uses
one single default macaddress (52:54:00:12:34:56 atm) for all -net nic
and you can't have two nics with identical macs on the same network.
Good luck, :)
Juergen
More information about the freebsd-emulation
mailing list