Re: [CentOS] Setup multiple bridges for use with KVM

2010-01-13 Thread Kai Schaetzl
Jacob Hydeman wrote on Wed, 13 Jan 2010 00:21:11 -0800:

> The only device that has a static IP is br2, all others are set to none, but
> each VM works.

Interesting. I bear this in mind, in case I need it some time in the future.

Kai

-- 
Get your web at Conactive Internet Services: http://www.conactive.com



___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Setup multiple bridges for use with KVM

2010-01-13 Thread Jacob Hydeman
> 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
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Setup multiple bridges for use with KVM

2010-01-12 Thread Kai Schaetzl
Jacob Hydeman wrote on Mon, 11 Jan 2010 10:50:17 -0800:

> I've setup just the IPADDR= and NETMASK= to have different static IPs in
> different subnets and changed to the BOOTPROTO=static in each of the
> ifcfg-brX scripts.
> 
> This hasn't fixed my issue. Perhaps it's because of the way I'm trying to
> use it (or I don't get it). Does each VM that is using a specific bridged
> device need to have the same IP subnet as that of the static brX address?

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

-- 
Get your web at Conactive Internet Services: http://www.conactive.com



___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Setup multiple bridges for use with KVM

2010-01-11 Thread Jacob Hydeman
>
> I'm using the same setup for multiple bridges for Xen, no problem. But I
> use static IP addresses. You *have* to use IP numbers from different
> subnets.
>
>
I've setup just the IPADDR= and NETMASK= to have different static IPs in
different subnets and changed to the BOOTPROTO=static in each of the
ifcfg-brX scripts.

This hasn't fixed my issue. Perhaps it's because of the way I'm trying to
use it (or I don't get it). Does each VM that is using a specific bridged
device need to have the same IP subnet as that of the static brX address?

What I am trying to accomplish here is this:

Router (192.168.7.1) -> eth0/br0 (10.1.10.1) -> VM01
(with internal vr0 and vr1 attached to br0 and br1 and a bridged IP of
192.168.7.253, running Untangle in bridge mode)

VM01 > eth1/br1 ---> local switch -> eth2/br2
--> other running VMs.

Thinking that the internal bridging done by the Untangle VM might have
caused an issue... I setup just a stock Win Server 2003 install with a
single ethernet device attached to br0 and set a static IP in the
192.168.7.X range (in Win 2k3 VM). The untangle VM is shutdown. I still
can't ping 192.168.7.1 from the Win2k3 VM.

Thanks,

Jacob
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Setup multiple bridges for use with KVM

2010-01-10 Thread Eduardo Grosclaude
On Sat, Jan 9, 2010 at 11:15 PM, Jacob Hydeman  wrote:
> Running CentOS 5.4 x64.
>
> Have successfully bridged eth2 with br2 by following the instructions here:
> http://wiki.libvirt.org/page/Networking (under the RHEL section)
>
> Have been running several KVM VMs successfully via this bridge.
>
> I am now trying to bridge additional interfaces by using the same routine.
> Each bridge is named to correspond with the ethX device its bridged with.
>
> Example of ifcfg-eth0 script:
> DEVICE=eth0
> HWADDR=00:16:76:D6:C9:45
> ONBOOT=yes
> BRIDGE=br0
>
> then of ifcfg-br0 script:
> DEVICE=br0
> TYPE=Bridge
> BOOTPROTO=dhcp
> ONBOOT=yes
> DELAY=0
>
> This is repeated 3 times for eth0-eth2 and br0-br2.
>
> I've read somewhere that STP needs to be enabled when using multiple
> bridges. I've tried adding STP=on to the ifcfg-brX scripts but with the same
> result. Yes, brctl shows that STP is on.
>
> The original bridge eth2-br2 continues to work but I can't get any traffic
> across any other bridge. Either by dhcp or static ips.
>
> Is multiple bridges a possibility?
>
> Previous to moving to KVM I was running Xen Server on the same hardware. I
> am just trying to recreate the network setup I had. I believe Xen Server
> runs on top of a linux platform so such a thing should be possible.

I am curious as to what exactly is your topology and which is its
intended use. I have found no issues wrt STP but you seemingly need to
assign different vlans to your VM interfaces, depending on which
bridge they are attached to (i.e. roughly 1 bridge = 1 vlan).
I am confused about what interfaces are attached to which bridge in
your setup, would like to see the scripts you are using to start your
VMs...
Thank you in advance

-- 
Eduardo Grosclaude
Universidad Nacional del Comahue
Neuquen, Argentina
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Setup multiple bridges for use with KVM

2010-01-10 Thread Kai Schaetzl
Jacob Hydeman wrote on Sat, 9 Jan 2010 18:15:14 -0800:

> BOOTPROTO=dhcp

I'm using the same setup for multiple bridges for Xen, no problem. But I 
use static IP addresses. You *have* to use IP numbers from different 
subnets.

> I've read somewhere that STP needs to be enabled when using multiple
> bridges

No.

Kai

-- 
Get your web at Conactive Internet Services: http://www.conactive.com



___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos