Virtual network with qemu

P.U.Kruppa ulrich at pukruppa.net
Tue Jun 19 18:38:20 UTC 2007


On Tue, 19 Jun 2007, Per Hedeland wrote:

>> What kind of qemu-ifup do you use?
>
> Per above I'm using the ifconfig-based method (on 6.1-RELEASE) - I use
> this in rc.conf for the initial setup of the bridge:
>
> cloned_interfaces="bridge0"
> ifconfig_bridge0="addm bge0 up"
>
> - this creates the bridge and adds the physical interface to it. You can
> of course do it "manually" with
>
> ifconfig bridge0 create
> ifconfig bridge0 addm bge0 up
>
> (you'd use rl0 instead of bge0 of course) - and then my qemu-ifup ups
> the tap device and adds it to the bridge (if needed):
>
> #!/bin/sh
> sudo /sbin/ifconfig $1 up
> case "`ifconfig bridge0`" in
>    *" $1 "*) ;;      # already in the bridge
>    *) sudo /sbin/ifconfig bridge0 addm $1 ;;
> esac
>
> This works to bridge any number of qemus together (I've had as many as
> five running concurrently).
Yes, thanks. That does the trick.

A remark for the records: I found the virtual machines won't be 
able to ping each other if both are run in graphic mode (at 
least on my slow machine). When I start the virtual 
FreeBSD box with -nographic option I get reasonable response 
times.

Again thanks,

Uli.



>
> --Per Hedeland
>
>



Peter Ulrich Kruppa
Wuppertal
Germany



More information about the freebsd-emulation mailing list