1

I have a host using Linux bond mode 1 (active/backup) connected to 2 x independent switches. Please can someone confirm if this is possible for successful failover between NICS or do I have to interconnect the two switches? If this is already answered someplace please point me to the resource

Specification:- The 6.5 linux host is configured with the following ifconfig-bond1 files:-

[Server1 network-scripts]$ cat ifcfg-bond1
DEVICE=bond1
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
DHCP_HOSTNAME=Server1
BOOTPROTO=none
IPADDR=192.168.49.11
NETMASK=255.255.255.0
GATEWAY=192.168.49.254
BONDING_OPTS="mode=1 miimon=100 downdelay=200 updelay=200"

and 1Gbe eth0/1 interface files work like this:-

[server1 network-scripts]$ cat ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
TYPE=Ethernet
MASTER=bond1
SLAVE=yes
USERCTL=no

[Server1 network-scripts]$ cat ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
TYPE=Ethernet
MASTER=bond1
SLAVE=yes
USERCTL=no

eth0 connects to a primay switch whilst eth1 connects to the backup switch (2 x independent Juniper EX3300 models)

thanks

adam

1
  • answer my Q:- kernel.org/doc/Documentation/networking/bonding.txt but I am in the situation where the switches have to remain independent and this part suggests I need to use mode 3 'broadcast':- broadcast: This mode is really a special purpose mode, and is suitable only for very specific needs. For example, if the two switches are not connected (no ISL), and the networks beyond them are totally independent. In this case, if it is necessary for some specific one-way traffic to reach both independent networks, then the broadcast mode may be suitable.
    – adamjth
    Aug 28, 2015 at 17:31

2 Answers 2

1

As long as your bond's IP (192.168.49.11) is reachable VIA either switch, you're fine in mode 1. If you have console access to the server, this is easy enough to test - just bring each of the slave interfaces down one at a time and verify you still have connectivity to the outside world (or wherever you need to reach). However, I wouldn't recommend doing this if you don't have direct console access, as, um, you might cut yourself off from the server if there's an upstream problem.

P.S. I'm not exactly clear on your use of BOTH the terms "independent" and "the backup switch" to refer to your setup.

2
  • Sorry for my late reply. So I went back to this problem and I found the only way to get it to work is to connect the 2 x switches that the bonded NICs connect to and this is reflected in the drawing kernel.org/doc/Documentation/networking/bonding.txt . To clarify the 2 x switches A and B were not previously NOT connected when I used the term backup I meant switch B
    – adamjth
    Sep 12, 2015 at 14:09
  • @adamjth I'm in a similar situation.. could you please explain how you connected the switches? Do you need to keep them in different VLANs? I want to configure same gateway on both switches.. but trunking the 2 switches doesn't let me do that.
    – awsiv
    Dec 16, 2016 at 21:26
0

The switches don't necessarily have to be physically connected to one another but the ports connecting the bond members need to be in the same broadcast domain (usually synonymous with VLAN). Keep in mind that the IP for the interface can potentially show up on either switch. If the connected ports are discontiguous how would the rest of the network know where to send packets?

So - say, for example, you had a common pair of aggregation switches where the L3 gateway resides and runs HSRP/VRRP. Two access switches independently connect to these aggregation switches and are passed the same VLAN. This would be fine.

In contrast, if you hook up to two random switches that each are configured with the same subnet but are otherwise disconnected then it's not only not going to work during failover but would likely be broken under normal circumstances as the rest of the network has no way of knowing which network is currently active vs passive (unless you start dealing with custom tuning metrics and dynamically signaling state somehow - which is definitely gilding the lily for simple NIC failover).

You must log in to answer this question.

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