1

What I have done many times and what works quite well is the following scenario:

1 NIC connected to a bridge and then N VMs connected to the network via that bridge (on Ubuntu 10.4).

My newest server now has 2 NICs and I thought I do the same and in addition simply add the second NIC to the same physical LAN and to the bridge (using bridge_ports eth0 eth1); hopefully getting redundancy and higher throughput. This does not seem to work very well. Network traffic is extremely unstable irrespective of network load. Even my ssh session keeps dropping out and reconnecting all the time.

Now my questions:

  • Should my approach basically work or am I doing something wrong? E.g. fundamentally misunderstanding what bridges can do with 2 NICs?
  • I read that there is also NIC bonding that can combine two NICs. Does this have a higher chance of working? And if yes would I then still add a bridge to the bond and the VMs to the bridge?

For reference my /etc/network/interfaces:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface   
auto lo
iface lo inet loopback

# The primary network interface
auto br0
iface br0 inet dhcp
      bridge_ports eth0 eth1

Note: This question is the same as this one on server fault. Since it got no answers and I am using Ubuntu I hope to have more luck here.

Thanks, Carsten

1
  • 1
    What switch do your NICs connect to? In Cisco terms, you'll need to set up a PortChannel, specifying the two ports. Even then, Cisco only really supports per Mac load balancing, so if the majority of your traffic is to a single client, you'll only use a single NIC. Still very useful for resiliency however and multiple clients will generate hits to each connection. Not sure how to set up the bond on Linux, however (although a quick Google on "ubuntu bond NIC portchannel) generated a few possibilities.
    – Scaine
    Dec 8, 2010 at 12:36

1 Answer 1

1

Bridging both physical interfaces caused the problem. If you want to improve speed, you should use bonding. The configuration downside to this is you have to bond at both ends.

Another possibility load balancing over these 2 interfaces using ECMP and ip-tables. ip-tables provides connection counters (at least i think they do), so use those to select odd and even connections and send them through one or another connection. Be wary if there is NAT in the middle as that can cause problems with establishing related connections. Also, services with several connections may fail.

I cannot provide correct syntax on how to do this as I only can do this on some proprietary system.

2
  • Thanks for your reply. Just to clarify I understand your answer: Having 2 bridged NICs on the same switch, or on 2 switches in the same LAN will confuse the network and is never a good idea?
    – user7054
    Dec 10, 2010 at 1:09
  • if you have dedicated hardware, then it is called switch, same job can be done in software using bridge, so it is not clear for me what exactly you want. If your bridge support STP or RSTP protocol then that should be fine and no network storms should bring your network down if by change some loop appear.
    – Osis
    Jan 28, 2011 at 10:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .