[CentOS] Setup multiple bridges for use with KVM

Wed Jan 13 08:21:11 UTC 2010
Jacob Hydeman <jhydeman at gmail.com>

> No. But you have to tell via config (I don't know how KVM does this) which
> bridge the VM is going to use. And if you want it to be reachable via two
> bridges you have to set it up for two bridges and give it two IP numbers.
> And the packet then has to come in thru the correct interface/bridge, there
> is no "bridging" between the bridges. You would need to set up some
> additional routing to work around this (probably, I'm not a routing
> expert).
>
> Is that possibly not the case? e.g. your VMs are still setup to use only
> one bridge?
>
>
>
> Kai
>

There ended up being 2 things at work against me. 1, stupidity and the other
equipment.

There are 5 Ethernet cards installed... eth0 through eth4. I've been using
eth2 successfully. When I removed all ifcfg-X scripts and recreated them,
the actual ethX devices were added in the opposite order. My eth2 still
worked because it was in the middle, but the other 4 had swapped. I never
noticed since eth2 was still working... id10t (me that is).

The other issue is that any of the bridged network cards would not
communicate with my router. I had to put a switch between them and the
router, nothing else. I saw this by accident in that I could only get 1 ethX
device to work at a time, and it ended up following the cable attached to a
switch, not router. Other routers work... but this one running DD-WRT
doesn't, unless there is a switch between it and the bridged device.

So... the config for all but br2 ended up being what I had originally, but
no IPs assigned at all. I've also enabled STP and haven't bothered to see if
this actually does anything.

So my brX scripts are like this:
DEVICE=br0
TYPE=Bridge
BOOTPROTO=none
ONBOOT=yes
DELAY=0
STP=on

The only device that has a static IP is br2, all others are set to none, but
each VM works. Even the Untangle setup where it bridges the two assigned VM
nics works.

Thanks for all the info and help. Sorry it ended up being stupidity and off
hardware (strange that Xen Server worked fine though).

Now to somehow get this indexed off of google as searching for a solution
brought me to my silly post :)

Thanks again!

Jacob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20100113/e65efecb/attachment-0005.html>