Pb with bounding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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


--
Pierre Malard

  « Si l'on veut croire en l'humanité,
     il faut voir et comprendre l'inhumanité »
   |\      _,,,---,,_
   /,`.-'`'    -.  ;-;;,_
  |,4-  ) )-,_. ,\ (  `'-'
 '---''(_/--'  `-'\_)   πr

perl -e '$_=q#: 3|\ 5_,3-3,2_: 3/,`.'"'"'`'"'"' 5-.  ;-;;,_:  |,A-  ) )-,_. ,\ (  `'"'"'-'"'"': '"'"'-3'"'"'2(_/--'"'"'  `-'"'"'\_): 24πr::#;y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print'
- --> Ce message n’engage que son auteur <--

Attachment: signature.asc
Description: Message signed with OpenPGP

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux