qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Dynamic bridging
@ 2005-05-18  0:52 Ben Taylor
  2005-05-18 12:55 ` Paul Brook
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Taylor @ 2005-05-18  0:52 UTC (permalink / raw)
  To: Qemu-devel

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. 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-05-18 13:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-18  0:52 [Qemu-devel] Dynamic bridging Ben Taylor
2005-05-18 12:55 ` Paul Brook

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).