qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Dynamic bridging


From: Ben Taylor
Subject: [Qemu-devel] Dynamic bridging
Date: Tue, 17 May 2005 20:52:08 -0400

I was trying to get the bridging working (with the help
of pbrook and nox- on the irc #qemu channel) and
eventually got it working under Sun JDS/3 (Suse 9.1)
after adding the bridge-util's rpm.

After some experimentation, I found that once I setup
the bridge on my primary interface, (eth0) and I used
the qemu-ifup script, the tunnels would automatcially
attach to the bridge, and when qemu shuts down, they
automatically go away.

primary-ifup
Code:

#!/bin/sh
/sbin/brctl addbr br0
/sbin/ifconfig eth0 0.0.0.0 promisc up
/sbin/ifconfig eth0 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255 up
/sbin/brctl stp br0 off
/sbin/brctl setfd br0 1
/sbin/brctl sethello br0 1
/sbin/brctl addif br0 eth0
/sbin/route add default gw 192.168.1.1

Then I ran qemu with a "-n ./qemu-ifup" (not the default /etc/qemu-ifup script) 
and the Damn Small Linux connected to the tun0 interface and got a DHCP address 
from the LAN's dhcp server.  This was pretty exciting, given that I asked
a bunch of non-qemu networking questions trying to 
understand the tunnels and bridges.

qemu-ifup

#!/bin/sh
/sbin/ifconfig $1 0.0.0.0 promisc up
/sbin/brctl addif br0 $1 

Thanks to pbrook and nox- for helping my find this
gem. Now if I could only get bridging to work on
Solaris like this. 






reply via email to

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