* [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
* Re: [Qemu-devel] Dynamic bridging
2005-05-18 0:52 [Qemu-devel] Dynamic bridging Ben Taylor
@ 2005-05-18 12:55 ` Paul Brook
0 siblings, 0 replies; 2+ messages in thread
From: Paul Brook @ 2005-05-18 12:55 UTC (permalink / raw)
To: qemu-devel, sol10x86
On Wednesday 18 May 2005 01:52, Ben Taylor wrote:
> 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
This line should be changes to ifconfig br0 ...., and moved to the end of the
script.
You shouldn't give the component devices an IP address, just the br interface.
Using the component interfaces directly is liable to lead to weird problems
on the host.
Also, if youdon't want to use a static IP, you can just run dhclient
(or equivalent) on the br0 interface as normal.
My setup looks someting like:
/sbin/brctl addbr br0
/sbin/ifconfig eth0 0.0.0.0 up
/sbin/brctl addif br0 eth0
dhclient br0
Paul
^ 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).