NIC Bonding active-backup

Issues related to configuring your network
Post Reply
jojoe
Posts: 7
Joined: 2020/08/03 15:39:32
Location: Munich, Germany

NIC Bonding active-backup

Post by jojoe » 2020/09/30 06:47:50

CentOS 8.2

slave failover only kicks-in if Interface cable is disconnected on active slave. Reconnecting primary slave cable does not
trigger a switch. Tried ifdown/up on interfaces but no switching.

/etc/sysconfig/network-scripts/ifcfg* contents:

/etc/sysconfig/network-scripts/ifcfg-bond-slave-eno1np0 (slave)
--------------------------------------------------------------------------------
TYPE=Ethernet
NAME=bond-slave-eno1np0
UUID=9feefd47-75c7-4e4f-886b-496c5835d1b8
DEVICE=eno1np0
ONBOOT=yes
MASTER=bond0
SLAVE=yes

/etc/sysconfig/network-scripts/ifcfg-bond-slave-eno2np1 (primary slave)
-----------------------------------------------------------------------------------------
TYPE=Ethernet
NAME=bond-slave-eno2np1
UUID=bfa1679a-ec4e-4243-aabf-7053127ef564
DEVICE=eno2np1
ONBOOT=yes
MASTER=bond0
SLAVE=yes

/etc/sysconfig/network-scripts/ifcfg-bond0
-----------------------------------------------------
BONDING_OPTS="mode=active-backup primary=eno2np1"
TYPE=Bond
BONDING_MASTER=yes
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
IPADDR=10.216.200.56
GATEWAY=10.216.0.1
#VLAN=yes
PREFIX=16
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=bond0
UUID=82b63fe5-f150-4d28-b5c5-3a279335fcec
DEVICE=bond0
ONBOOT=yes



Can anybody help ?

User avatar
jlehtone
Posts: 3107
Joined: 2007/12/11 08:17:33
Location: Finland

Re: NIC Bonding active-backup

Post by jlehtone » 2020/09/30 07:08:52

I've only ever used LACP, so say what active-backup should do.

Red Hat did add teaming as alternative to bonding. I wonder if it behaves differently?
https://access.redhat.com/documentation ... networking

jojoe
Posts: 7
Joined: 2020/08/03 15:39:32
Location: Munich, Germany

Re: NIC Bonding active-backup

Post by jojoe » 2020/09/30 13:31:08

LACP is for bandwidth and also backup.

I have used active-backup in the past on SLES servers and this was not a problem.
Each NIC is connected to different switches with different port speeds (10Gbps and 25 Gbps)

User avatar
jlehtone
Posts: 3107
Joined: 2007/12/11 08:17:33
Location: Finland

Re: NIC Bonding active-backup

Post by jlehtone » 2020/09/30 14:24:37

The https://access.redhat.com/documentation ... rk-bonding
shows how to set up bond with fast primary and slow backup interface.
It shows the nmcli syntax for creating bond.
Overall, I'd guess your files have about the same config, but it is always the details that get us.

The main point is that the documentation implies that your desired setup should be possible with CentOS 8 bond.

User avatar
TrevorH
Forum Moderator
Posts: 29719
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: NIC Bonding active-backup

Post by TrevorH » 2020/09/30 15:14:55

You're missing a bunch of parmeters to tell it to fail back when the primary slave recovers. Here's what I have on 7:

Code: Select all

BONDING_OPTS="mode=1 miimon=100 primary=em2 primary_reselect=always fail_over_mac=follow use_carrier=0"
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

jojoe
Posts: 7
Joined: 2020/08/03 15:39:32
Location: Munich, Germany

Re: NIC Bonding active-backup

Post by jojoe » 2020/10/01 06:45:54

@Trevorti

I updated the bonding defs. as shown below and restarted NetworManager. Failover only works when cable on active slave
is disconnected. Entering ifdown on active slave, no failover is triggered and server is unreachable. Also when cable of
primary slave is reconnected, there is no failover. Only when active slave cable is disconnected ....

[root@icb-znas-store05 ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0
BONDING_OPTS="mode=active-backup primary=eno2np1 miimon=100 primary_reselect=always fail_over_mac=follow use_carrier=0"
TYPE=Bond
BONDING_MASTER=yes
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
IPADDR=10.216.200.56
GATEWAY=10.216.0.1
#VLAN=yes
PREFIX=16
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=bond0
UUID=82b63fe5-f150-4d28-b5c5-3a279335fcec
DEVICE=bond0
ONBOOT=yes

[root@icb-znas-store05 ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: fault-tolerance (active-backup) (fail_over_mac follow)
Primary Slave: eno2np1 (primary_reselect always)
Currently Active Slave: eno2np1
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Peer Notification Delay (ms): 0

Slave Interface: eno1np0
MII Status: down
Speed: Unknown
Duplex: Unknown
Link Failure Count: 3
Permanent HW addr: b0:26:28:4c:62:a0
Slave queue ID: 0

Slave Interface: eno2np1
MII Status: up
Speed: 25000 Mbps
Duplex: full
Link Failure Count: 2
Permanent HW addr: b0:26:28:4c:62:a1
Slave queue ID: 0

Post Reply

Return to “CentOS 8 - Networking Support”