DevHeads.net

Pb with bounding

Hi,

We have a Dell server with 4 Ethernet interface. I would to aggregate them in a bond. Everything work but the default gateway doesn’t work on the « bond0 » interface and I have no links.

My configuration:
- CentOS 7:
:/etc/sysconfig/network-scripts# uname -a
Linux nas-mtd2 3.10.0-957.5.1.el7.x86_64 #1 SMP Fri Feb 1 14:54:57 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

- NetworkManager disabled:
:/etc/sysconfig/network-scripts# systemctl list-unit-files | grep NetworkManager
NetworkManager-dispatcher.service disabled
NetworkManager-wait-online.service disabled
NetworkManager.service disabled

- ifcfg-em1 to em4 (they are identical):
:/etc/sysconfig/network-scripts# cat ifcfg-em2
NAME=bond0-slave[1 to 4]
DEVICE=em[1 to 4]
TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
NM_CONTROLLED=no

- the bond0 declaration:
:/etc/sysconfig/network-scripts# cat ifcfg-bond0
DEVICE=bond0
TYPE=Ethernet
BONDING_MASTER=yes
BOOTPROTO=none
ONBOOT=yes
NM_CONTROLLED=no

# IP
IPADDR=172.16.1.128
PREFIX=16
GATEWAY=172.16.0.254

# Bonding
BONDING_OPTS="mode=802.3ad ad_select=stable use_carrier=1 miimon=100 arp_ip_target=172.16.1.128 updelay=100 lacp_rate=fast"
USERCTL=no

After a « systemctl restart network »:
:/etc/sysconfig/network-scripts# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: em1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
link/ether d0:94:66:65:32:0e brd ff:ff:ff:ff:ff:ff
3: em2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
link/ether d0:94:66:65:32:10 brd ff:ff:ff:ff:ff:ff
4: em3: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
link/ether d0:94:66:65:32:10 brd ff:ff:ff:ff:ff:ff
5: em4: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
link/ether d0:94:66:65:32:10 brd ff:ff:ff:ff:ff:ff
6: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether d0:94:66:65:32:10 brd ff:ff:ff:ff:ff:ff
inet 172.16.1.128/16 brd 172.16.255.255 scope global bond0
valid_lft forever preferred_lft forever

And the route command:
:/etc/sysconfig/network-scripts# ip r
default via 172.16.0.254 dev bond0
169.254.0.0/16 dev bond0 scope link metric 1006
169.254.0.0/16 dev bond0.10 scope link metric 1008
172.16.0.0/16 dev bond0 proto kernel scope link src 172.16.1.128

but their is no network connection on « bond0 »!

The only way I found to have a network active connection is keeping my first interface outside the bond and having the default route on this one!
In this case I have a specific IP to it and a bond one on bound.

As I must have also a VLAN connection on the bound, I have create a « ifcfg-bond0.10 » file:
:/etc/sysconfig/network-scripts# cat ifcfg-bond0.10
NAME=bond0.10
DEVICE=bond0.10
#TYPE="Ethernet"
VLAN=yes
NM_CONTROLLED=no
ONPARENT=yes
DEFROUTE="no"
# IP
IPADDR=XXX.XXX.XXX.142
NETMASK=255.255.255.0
NETWORK=XXX.XXX.XXX.0
BROADCAST=XXX.XXX.XXX.255
PREFIX=24
GATEWAY=1XXX.XXX.XXX.126

With that and the first Ethernet interface on a specific address I have:
:/etc/sysconfig/network-scripts# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: em1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether d0:94:66:65:32:0e brd ff:ff:ff:ff:ff:ff
inet 172.16.1.86/16 brd 172.16.255.255 scope global em1
valid_lft forever preferred_lft forever
3: em2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
link/ether d0:94:66:65:32:10 brd ff:ff:ff:ff:ff:ff
4: em3: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
link/ether d0:94:66:65:32:10 brd ff:ff:ff:ff:ff:ff
5: em4: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
link/ether d0:94:66:65:32:10 brd ff:ff:ff:ff:ff:ff
6: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether d0:94:66:65:32:10 brd ff:ff:ff:ff:ff:ff
inet 172.16.1.128/16 brd 172.16.255.255 scope global bond0
valid_lft forever preferred_lft forever
8: bond0.10@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether d0:94:66:65:32:10 brd ff:ff:ff:ff:ff:ff
inet XXX.XXX.XXX.142/24 brd XXX.XXX.XXX.255 scope global bond0.10
valid_lft forever preferred_lft forever
:/etc/sysconfig/network-scripts# ip r
default via 172.16.0.254 dev em1
169.254.0.0/16 dev em1 scope link metric 1002
169.254.0.0/16 dev bond0 scope link metric 1006
169.254.0.0/16 dev bond0.10 scope link metric 1008
172.16.0.0/16 dev em1 proto kernel scope link src 172.16.1.86
172.16.0.0/16 dev bond0 proto kernel scope link src 172.16.1.128
XXX.XXX.XXX.0/24 dev bond0.10 proto kernel scope link src XXX.XXX.XXX.142

And everything is working.

But… I am not satisfy. Is it normal?
Is it a way to have all the Ethernet link on a bond?

Your help is needed :-)

Best wishes

Comments

Re: Pb with bounding

By Gordon Messmer at 02/06/2019 - 20:36

On 2/6/19 9:47 AM, Pierre Malard wrote:

What type of managed switch are you using for those interfaces? Can you
also include the configuration that you gave the switch? Do the switch
logs indicate any errors with the bonded ports?

Re: Pb with bounding

By Pierre Malard at 02/07/2019 - 11:19

Sorry, my answer take a while… but I would test before write.

Effectively, the problem became from switch configuration.
Our switch are a stack of Avaya ERS4870 and I have difficulties to understand the interface. I had configure all ports concerned by my configuration like that for all ports:
In the « VLAN » Configuration:
- VLAN tagging: « tagAll(trunk) »
- « PrivateVlanPortType »: « trunk »
- « DefaultVlanID » : to a LAN not distribued. I don’t understand why they ask for that even I choose « tagAll » (!!!)
For the « LACP » one:
- activate « AdmiEnabled »
- « ActorAdminState » structure: activation of « lacpActive », « aggregation » and « shortTimeout »
- « actorAdminKey »: chose one

In my case the problem come that I have gave one of my real VLAN as « DefaultVlanID ». With this configuration no paquet can pass. Now I have choose the VLAN 1 in this case and everything is Ok.

Best regards and thanks…