Connecting Linux system to switch from 2 interfaces

To get proper redundancy, we've installed 2 switches in our network and connected them to eachother. We now want to hook our servers to both switches. Since all servers have 2 ethernet ports, this should be possible.

The big problem is that we want to do this using just 1 IP address per server. Does anyone know how to configure Linux (and Windows too actually) so it supports this, at the same time avoiding any form of looping ? I know it's possible to just set the IP on both interfaces, but that causes ARP issues when disconnecting 1 of the switches.


Solution 1:

With Linux the simplest bonding method to use is active-backup mode when connecting to two different switches. With this only one is active at a time and you can set which one you want to have priority. This method requires no special configuration on the switches.

With windows you are going to need to install a utility that comes from the vendor of your NICs. For Broadcom NICs you want Broadcom Advanced Control Suite (BACS). Intel has a similar utility. The bonding on Windows can cause problems with certain things (I.E. not a good idea on domain controllers from my experience).

Oh, and do set up STP or RSTP to prevent switching loops ... it is really quite easy usually. Often something like spanning-tree

Solution 2:

Use link aggregation, which is otherwise known as bonding or teaming. The exact methods of implementation vary depending upon the OS and distribution.

It will allow you to use both interfaces as a single interface, which will provide load balancing and enable high availability for the network interfaces. It's highly configurable depending upon your exact specification.