Ethernet Bridge development
 help / color / mirror / Atom feed
* [Bridge] Using 2 Bridges Simultaneously for "Load Balancing"
@ 2008-11-24 11:04 Andre iosT
  2008-11-24 11:19 ` Dietmar Maurer
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Andre iosT @ 2008-11-24 11:04 UTC (permalink / raw)
  To: bridge

Hello,

I have trouble entirely understanding the bridging concept in Linux. My 
problem:

I have a rather powerful workstation running Ubuntu 8.10 64 Bit. On this 
I want to use 4 virtual machines using VirtualBox. To split the network 
load I installed a second NIC in addition to the built-in one.

According to the VirtualBox Manual to use Host Interface Networking I 
need to create a bridge with a physical interface assigned to it. Then, 
virtual host interfaces are created and added to the bridge. These 
virtual interfaces then communicate via the bridge (and therefore, the 
physical interface) with the outside network/internet.

Now I thought it was possible to create to of those bridges, each one 
with one physical NIC. Then I could assign two virtual machines to each 
bridge/NIC in order to balance or distribute the load.

My trials weren't successful and I have the suspicion that the 
simultaneous use of two bridges is impossible. Can anyone make a 
suggestion for a working configuration or rid me of my illusions ;)?

Configuration:

Dell Precision T5400 with one built-in NIC and an additional one.

eth0: internal NIC
	should be assigned to bridge br0
	with vbox0 and vbox1 assigned (for the virtual boxes 0 and 1)
eth1: additional NIC
	should be assigned to bridge br1
	with vbox2 and vbox3 assigned (for the virtual boxes 2 and 3)

My (not working) /etc/network/interfaces configuration:

auto br0 br1

iface br0 inet static
	address xxx.xxx.xxx.1
	netmask 255.255.255.0
	gateway xxx.xxx.xxx.254
	bridge_ports eth0	

iface br1 inet static
	address xxx.xxx.xxx.2
	netmask 255.255.255.0
	gateway xxx.xxx.xxx.254
	bridge_ports eth1

The nameserver is defined in the resolv.conf. I did not alter or adapt 
the routing tables, maybe that's the whole problem? On the other hand I 
read about STP but don't know if this applies here. If br1 is down I 
have access to the internet. After the activation of br1 in addition to 
br0, I have no connections to the outside world.

Any help would be greatly appreciated!
Waldgeist
	

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

* Re: [Bridge] Using 2 Bridges Simultaneously for "Load Balancing"
  2008-11-24 11:04 [Bridge] Using 2 Bridges Simultaneously for "Load Balancing" Andre iosT
@ 2008-11-24 11:19 ` Dietmar Maurer
  2008-11-24 11:20 ` Dietmar Maurer
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Dietmar Maurer @ 2008-11-24 11:19 UTC (permalink / raw)
  To: noway, bridge

> My trials weren't successful and I have the suspicion that the
> simultaneous use of two bridges is impossible. Can anyone make a

It is possible. We use such configuration for pve.proxmox.com - works
perfectly.

- Dietmar


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

* Re: [Bridge] Using 2 Bridges Simultaneously for "Load Balancing"
  2008-11-24 11:04 [Bridge] Using 2 Bridges Simultaneously for "Load Balancing" Andre iosT
  2008-11-24 11:19 ` Dietmar Maurer
@ 2008-11-24 11:20 ` Dietmar Maurer
  2008-11-24 11:25 ` Dietmar Maurer
  2008-11-25  7:21 ` Thomas Mueller
  3 siblings, 0 replies; 8+ messages in thread
From: Dietmar Maurer @ 2008-11-24 11:20 UTC (permalink / raw)
  To: noway, bridge

> iface br0 inet static
> 	address xxx.xxx.xxx.1
> 	netmask 255.255.255.0
> 	gateway xxx.xxx.xxx.254
> 	bridge_ports eth0
> 
> iface br1 inet static
> 	address xxx.xxx.xxx.2
> 	netmask 255.255.255.0
> 	gateway xxx.xxx.xxx.254
> 	bridge_ports eth1

But AFAIK you can only have one gateway in debian.

- Dietmar


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

* Re: [Bridge] Using 2 Bridges Simultaneously for "Load Balancing"
  2008-11-24 11:04 [Bridge] Using 2 Bridges Simultaneously for "Load Balancing" Andre iosT
  2008-11-24 11:19 ` Dietmar Maurer
  2008-11-24 11:20 ` Dietmar Maurer
@ 2008-11-24 11:25 ` Dietmar Maurer
  2008-11-25  7:21 ` Thomas Mueller
  3 siblings, 0 replies; 8+ messages in thread
From: Dietmar Maurer @ 2008-11-24 11:25 UTC (permalink / raw)
  To: noway, bridge

I think you do not need 2 addresses - try the following instead:

iface br0 inet static
	address xxx.xxx.xxx.1
	netmask 255.255.255.0
	gateway xxx.xxx.xxx.254
	bridge_ports eth0	
	bridge_stp off
	bridge_fd 0

iface br1 inet manual
	bridge_ports eth1
	bridge_stp off
	bridge_fd 0



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

* Re: [Bridge] Using 2 Bridges Simultaneously for "Load Balancing"
@ 2008-11-25  4:37 Andre iosT
  2008-11-25  7:30 ` Dietmar Maurer
  0 siblings, 1 reply; 8+ messages in thread
From: Andre iosT @ 2008-11-25  4:37 UTC (permalink / raw)
  To: bridge, dietmar

Thanks a lot, that worked like a charm! Would you be so kind as to 
enlighten me ;)? I guess, the "bridge_stp off" disables the spanning 
tree protocol, or whatever this is called, right? What is the "bridge_fd 
  0" for?

Again, thanks for this fast solution!

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

* Re: [Bridge] Using 2 Bridges Simultaneously for "Load Balancing"
  2008-11-24 11:04 [Bridge] Using 2 Bridges Simultaneously for "Load Balancing" Andre iosT
                   ` (2 preceding siblings ...)
  2008-11-24 11:25 ` Dietmar Maurer
@ 2008-11-25  7:21 ` Thomas Mueller
  2008-11-25  8:22   ` Andre iosT
  3 siblings, 1 reply; 8+ messages in thread
From: Thomas Mueller @ 2008-11-25  7:21 UTC (permalink / raw)
  To: bridge



> 
> Now I thought it was possible to create to of those bridges, each one
> with one physical NIC. Then I could assign two virtual machines to each
> bridge/NIC in order to balance or distribute the load.

if you just want load balancing/distribute the load on the two NIC's: why 
dont you create a bond (some people/manufacturers  call it also "trunk" 
or "LAG" ) out of physical NIC's and then bridge the bond?

http://www.mjmwired.net/kernel/Documentation/networking/bonding.txt
http://www.debianhelp.co.uk/bonding.htm

- Thomas



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

* Re: [Bridge] Using 2 Bridges Simultaneously for "Load Balancing"
  2008-11-25  4:37 Andre iosT
@ 2008-11-25  7:30 ` Dietmar Maurer
  0 siblings, 0 replies; 8+ messages in thread
From: Dietmar Maurer @ 2008-11-25  7:30 UTC (permalink / raw)
  To: andre.iost, bridge

> Thanks a lot, that worked like a charm! Would you be so kind as to
> enlighten me ;)? I guess, the "bridge_stp off" disables the spanning
> tree protocol, or whatever this is called, right? What is the

Yes. I guess you don't need it with your configuration.

> "bridge_fd 0" for?

sets the bridge forward delay to 0 seconds. That way you do not
have delays when you boot your host.

see "man brctl"

- Dietmar


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

* Re: [Bridge] Using 2 Bridges Simultaneously for "Load Balancing"
  2008-11-25  7:21 ` Thomas Mueller
@ 2008-11-25  8:22   ` Andre iosT
  0 siblings, 0 replies; 8+ messages in thread
From: Andre iosT @ 2008-11-25  8:22 UTC (permalink / raw)
  To: Thomas Mueller, Bridge

That was my first thought, but one of the two NICs doesn't seem to 
support that properly. I got the bond (without the bridge) up and 
running, but the additional (cheap) NIC wasn't used at all (I monitored 
the traffic via gkrellm). Pulling the plug out of the internal NIC 
resulted in the total loss of connectivity. That's not supposed to 
happen with a bond. I would have thought that the other NIC, in that 
case the additional one, would still provide network connection, albeit 
with reduced bandwidth.

Anyway, the proposal from Dietmar works perfectly now.



Thomas Mueller schrieb:
> 
>> Now I thought it was possible to create to of those bridges, each one
>> with one physical NIC. Then I could assign two virtual machines to each
>> bridge/NIC in order to balance or distribute the load.
> 
> if you just want load balancing/distribute the load on the two NIC's: why 
> dont you create a bond (some people/manufacturers  call it also "trunk" 
> or "LAG" ) out of physical NIC's and then bridge the bond?
> 
> http://www.mjmwired.net/kernel/Documentation/networking/bonding.txt
> http://www.debianhelp.co.uk/bonding.htm
> 
> - Thomas
> 
> 
> _______________________________________________
> Bridge mailing list
> Bridge@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/bridge

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

end of thread, other threads:[~2008-11-25  8:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-24 11:04 [Bridge] Using 2 Bridges Simultaneously for "Load Balancing" Andre iosT
2008-11-24 11:19 ` Dietmar Maurer
2008-11-24 11:20 ` Dietmar Maurer
2008-11-24 11:25 ` Dietmar Maurer
2008-11-25  7:21 ` Thomas Mueller
2008-11-25  8:22   ` Andre iosT
  -- strict thread matches above, loose matches on Subject: below --
2008-11-25  4:37 Andre iosT
2008-11-25  7:30 ` Dietmar Maurer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox