CentOS 7 - Channel Bonding interfaces (LACP) with nmcli


Channel bonding enables two or more network interfaces to act as one, simultaneously increasing the bandwidth and providing redundancy.

In our example we use the bonding mode 4 (802.3ad).
IEEE 802.3ad Dynamic link aggregation. Creates aggregation groups that share the same speed and duplex settings. Utilizes all slaves in the active aggregator according to the 802.3ad specification.

Prerequisites:
  • Ethtool support in the base drivers for retrieving the speed and duplex of each slave.
  • A switch that supports IEEE 802.3ad Dynamic link aggregation. Most switches will require some type of configuration to enable 802.3ad mode.  
  1. Overview
To get information of your available network interfaces like IP Address, MAC Address, use the following command as shown below.
[root@node1 ~]# ip addr
1: lo: mtu 65536 qdisc noqueue state UNKNOWN qlen 1
  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: enp3s0f0: mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
3: enp3s0f1: mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
  link/ether 00:**:**:**:26:f4 brd ff:ff:ff:ff:ff:ff
4: enp4s0f0: mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
  link/ether 00:**:**:**:26:f7 brd ff:ff:ff:ff:ff:ff
5: enp4s0f1: mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
  link/ether 00:**:**:**:26:f6 brd ff:ff:ff:ff:ff:ff
6: enp6s0: mtu 1500 qdisc pfifo_fast state UP qlen 1000
  link/ether 68:**:**:**:f4:21 brd ff:ff:ff:ff:ff:ff
  inet 10.0.6.30/26 brd 10.0.6.63 scope global enp6s0
   valid_lft forever preferred_lft forever

One of our network interfaces is used as a management interface.
In our example is this interface enp6s0.

We will bond the other four network interfaces as one logical interface :
  • ifcfg-enp3s0f0
  • ifcfg-enp3s0f1
  • ifcfg-enp4s0f0
  • ifcfg-enp4s0f1

  1. Check service NetworkManager
[root@node1 ~]# systemctl status NetworkManager
  • NetworkManager.service - Network Manager
  Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; disabled; vendor preset: enabled)
   Active: active (running) since *** 20**-12-21 16:12:06 CET; 18s ago
   Docs: man:NetworkManager(8)

  Main PID: 25768 (NetworkManager)
       Tasks: 3
    CGroup: /system.slice/NetworkManager.service
               └─25768 /usr/sbin/NetworkManager --no-daemon
 

  1. Configure the Linux host for LACP bonding
3.1 Overview

3.2 Configure a logical interface

Bond options:
mode= Specifies one of four policies allowed for the bonding module.
miimon= Specifies (in milliseconds) how often MII link monitoring occurs. This is useful if high availability is required because MII is used to verify that the NIC is active.
lacp_rate= Specifies the rate at which link partners should transmit LACPDU packets in 802.3ad mode. Possible values are:
(*) slow or 0 — Default setting. This specifies that partners should transmit LACPDUs every 30 seconds.
(*) fast or 1 — Specifies that partners should transmit LACPDUs every 1 second.
xmit_hash_policy= Selects the transmit hash policy used for slave selection in balance-xor and 802.3ad modes.
updelay= Specifies (in milliseconds) how long to wait before enabling a link.
downdelay= Specifies (in milliseconds) how long to wait after link failure before disabling the link.

To create a bond connection with the nmcli tool, issue the following command:
[root@node1 ~]# nmcli con add type bond ifname bond0 bond.options \
    "mode=802.3ad,miimon=100,lacp_rate=1, \ 
     xmit_hash_policy=layer2+3,updelay=200,downdelay=200"
     ipv4.method disabled ipv6.method ignore

Connection 'bond-bond0' (6787154b-5afb-4b6d-ba44-d4882efd0a68) successfully added.

Note that in this case a bond connection serves only as a "lower interface" for VLAN, and does not get any IP address. Therefore, the ipv4.method disabled and ipv6.method ignore parameters have been added on the command line.


3.3 Physical interfaces to bond

We’ll bond the following four network interfaces:
  • ifcfg-enp3s0f0
  • ifcfg-enp3s0f1
  • ifcfg-enp4s0f0
  • ifcfg-enp4s0f1

Our 4 physical interfaces serves only as a "lower interface" for BOND, and does not get any IP address. Therefore, we modify our physical interface settings with the parameters ipv4.method disabled and ipv6.method ignore:
[root@node1 ~]# nmcli con modify enp3s0f0 ipv4.method disabled ipv6.method ignore
[root@node1 ~]# nmcli con modify enp3s0f1 ipv4.method disabled ipv6.method ignore
[root@node1 ~]# nmcli con modify enp4s0f0 ipv4.method disabled ipv6.method ignore
[root@node1 ~]# nmcli con modify enp4s0f1 ipv4.method disabled ipv6.method ignore

Set the master property to the bond interface name, or to the name of the master connection:
[root@node1 ~]# nmcli con add type ethernet ifname enp3s0f0 master bond0
Connection 'bond-slave-enp3s0f0' (db80fcdd-8490-47f3-8a4f-1abd374490ce) successfully added.

To add a new slave interface, repeat the previous command with the new interface.
[root@node1 ~]# nmcli con add type ethernet ifname enp3s0f1 master bond0
Connection 'bond-slave-enp3s0f1' (bc2b6b88-836f-4b34-8461-4a07d5ed1695) successfully added.

[root@node1 ~]# nmcli con add type ethernet ifname enp4s0f0 master bond0
Connection 'bond-slave-enp4s0f0' (60c68d34-924f-406e-96cb-989c77892aaa) successfully added.

[root@node1 ~]# nmcli con add type ethernet ifname enp4s0f1 master bond0
Connection 'bond-slave-enp4s0f1' (5733df69-c86e-4ec2-8682-9ead10d66260) successfully added.

To activate the slaves, issue a command as follows:
[root@node1 ~]# nmcli con up bond-slave-enp3s0f0
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/234)

[root@node1 ~]# nmcli con up bond-slave-enp3s0f1
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/235)

[root@node1 ~]# nmcli con up bond-slave-enp4s0f0
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/241)

[root@node1 ~]# nmcli con up bond-slave-enp4s0f1
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/242)

When you activate a slave, the master connection also starts.



3.4 Setting up network bridges
A network bridge is a Link Layer device which forwards traffic between networks based on MAC addresses and is therefore also referred to as a Layer 2 device. It makes forwarding decisions based on tables of MAC addresses which it builds by learning what hosts are connected to each network. A software bridge can be used within a Linux host in order to emulate a hardware bridge, for example in virtualization applications for sharing a NIC with one or more virtual NICs.

Install first the package bridge-utils.
[root@node1 ~]# yum -y install bridge-utils

To create a bridge connection with the nmcli tool, issue the following command:
[root@node1 ~]# nmcli con add type bridge ifname LAN
Connection 'bridge-LAN' (2c4e6eba-6e37-409f-883b-a537faa5c608) successfully added.

Let's do this the same for our other bridge interfaces with the nmcli tool, issue the following command:
[root@node1 ~]# nmcli con add type bridge ifname wireless
Connection 'bridge-wireless' (a40c5dd9-b73a-4488-9cd1-0c11d44a4d55) successfully added.

[root@node1 ~]# nmcli con add type bridge ifname server
Connection 'bridge-server' (4ac8dc66-9c46-48e2-a378-72a6d7f7a14a) successfully added.

[root@node1 ~]# nmcli con add type bridge ifname internet
Connection 'bridge-internet' (aabc5b85-d2fe-42a8-ad07-76416d4db9b6) successfully added.


Disable IPv4 and IPv6 on our bridge interfaces:
[root@node1 ~]# nmcli con modify bridge-internet ipv4.method disabled ipv6.method ignore
[root@node1 ~]# nmcli con modify bridge-server ipv4.method disabled ipv6.method ignore
[root@node1 ~]# nmcli con modify bridge-wireless ipv4.method disabled ipv6.method ignore
[root@node1 ~]# nmcli con modify bridge-LAN ipv4.method disabled ipv6.method ignore

To activate the bridges, issue a command as follows:
[root@node1 ~]# nmcli con up bridge-internet
Connection successfully activated (master waiting for slaves) (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/85)

[root@node1 ~]# nmcli con up bridge-server
Connection successfully activated (master waiting for slaves) (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/86)

[root@node1 ~]# nmcli con up bridge-wireless
Connection successfully activated (master waiting for slaves) (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/87)

[root@node1 ~]# nmcli con up bridge-LAN
Connection successfully activated (master waiting for slaves) (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/88)

Using brctl show, you can view all available ethernet bridges on your server.
[root@node1 ~]# brctl show
bridge name bridge id STP enabled interfaces
LAN 8000.000000000000 yes
internet 8000.000000000000 yes
server 8000.000000000000 yes
wireless 8000.000000000000 yes



3.5 Setting up 802.1Q VLAN tagging

In Red Hat Enterprise Linux 7, the 8021q module is loaded by default. If necessary, you can make sure that the module is loaded by issuing the following command as root:
[root@node1 ~]# modprobe --first-time 8021q

To display information about the module, issue the following command:
[root@node1 ~]# modinfo 8021q
filename: /lib/modules/3.10.0-514.2.2.el7.x86_64/kernel/net/8021q/8021q.ko
version: 1.8
license: GPL
alias: rtnl-link-vlan
rhelversion: 7.3
srcversion: 7E3D79395FFBC56AFC109DE
depends: mrp,garp
intree: Y
vermagic: 3.10.0-514.2.2.el7.x86_64 SMP mod_unload modversions
signer: CentOS Linux kernel signing key
sig_key: 54:CE:18:D5:47:AB:70:33:F7:FE:23:16:22:13:74:77:98:1A:31:81
sig_hashalgo: sha256

Add a VLAN interface on top of bond, enslaved to the bridge device:
[root@node1 ~]# nmcli con add type vlan ifname bond0.5 master internet dev bond0 id 5
Connection 'bridge-slave-bond0.5' (7ed13631-4714-42d1-821e-d8ef651cff56) successfully added.

Let's create our other VLAN interfaces on top of bond, enslaved to the bridge devices:
[root@node1 ~]# nmcli con add type vlan ifname bond0.6 master server dev bond0 id 6
Connection 'bridge-slave-bond0.6' (8a1c4910-d894-4531-950a-fedc8609af02) successfully added.

[root@node1 ~]# nmcli con add type vlan ifname bond0.7 master wireless dev bond0 id 7
Connection 'bridge-slave-bond0.7' (bde315fe-6eec-4d0f-acfa-4681a8da9aeb) successfully added.

[root@node1 ~]# nmcli con add type vlan ifname bond0.8 master LAN dev bond0 id 8
Connection 'bridge-slave-bond0.8' (24d61080-268f-42ac-8f11-1420f7f74343) successfully added.

To activate the VLANs, issue a command as follows:
[root@node1 ~]# nmcli con up bridge-slave-bond0.5
Connection successfully activated (master waiting for slaves) (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/16)

[root@node1 ~]# nmcli con up bridge-slave-bond0.6
Connection successfully activated (master waiting for slaves) (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/17)

[root@node1 ~]# nmcli con up bridge-slave-bond0.7
Connection successfully activated (master waiting for slaves) (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/18)

[root@node1 ~]# nmcli con up bridge-slave-bond0.8
Connection successfully activated (master waiting for slaves) (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/19)



3.6 Restart the service

Do a service restart.
[root@node1 ~]# systemctl restart NetworkManager

Check the service status.
[root@node1 ~]# systemctl status NetworkManager
1: lo: mtu 65536 qdisc noqueue state UNKNOWN qlen 1
  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: enp3s0f0: mtu 1500 qdisc pfifo_fast master bond0 state DOWN qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
3: enp3s0f1: mtu 1500 qdisc pfifo_fast master bond0 state DOWN qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
4: enp4s0f0: mtu 1500 qdisc pfifo_fast master bond0 state DOWN qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
5: enp4s0f1: mtu 1500 qdisc pfifo_fast master bond0 state DOWN qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
6: enp6s0: mtu 1500 qdisc pfifo_fast state UP qlen 1000
  link/ether 68:**:**:**:f4:21 brd ff:ff:ff:ff:ff:ff
  inet 10.0.6.30/26 brd 10.0.6.63 scope global enp6s0
   valid_lft forever preferred_lft forever
7: bond0: mtu 1500 qdisc noqueue state DOWN qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
16: bond0.6@bond0: mtu 1500 qdisc noqueue master server state LOWERLAYERDOWN qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
17: server: mtu 1500 qdisc noqueue state DOWN qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
18: bond0.7@bond0: mtu 1500 qdisc noqueue master wireless state LOWERLAYERDOWN qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
19: wireless: mtu 1500 qdisc noqueue state DOWN qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
20: bond0.8@bond0: mtu 1500 qdisc noqueue master lan state LOWERLAYERDOWN qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
21: lan: mtu 1500 qdisc noqueue state DOWN qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
22: bond0.5@bond0: mtu 1500 qdisc noqueue master internet state LOWERLAYERDOWN qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
23: internet: mtu 1500 qdisc noqueue state DOWN qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff

In our example are our physical, logical, vlan and bridge interfaces down. The physical interfaces aren’t connected to our switch and even our switch isn't yet configured for LACP.


  1. Firewall settings
Did you install the package firewalld like described on page CentOS 7 - Initial settings?
If so, check if the our firewall is running using the firewall-cmd command.
[root@node1 ~]# firewall-cmd --state
running

Set default zone for connections and interfaces where no zone has been selected.
[root@node1 ~]# firewall-cmd --set-default-zone=public
success

Print default zone for connections and interfaces.
[root@node1 ~]# firewall-cmd --get-default-zone
public

Print currently active zones altogether with interfaces and sources used in these zones.
[root@node1 ~]# firewall-cmd --get-active-zones
public
 interfaces: bond0 enp6s0 internet lan server wireless

Move the management interface to the firewall zone dmz.
[root@node1 ~]# firewall-cmd --zone=dmz --change-interface=enp6s0
success
[root@node1 ~]# firewall-cmd --zone=dmz --change-interface=enp6s0 --permanent
success

Reload firewall rules and keep state information. Current permanent configuration will become new runtime configuration, i.e. all runtime only changes done until reload are lost with reload if they have not been also in permanent configuration.
[root@node1 ~]# firewall-cmd --reload
success

List everything added for or enabled in zone.
[root@node1 ~]# firewall-cmd --list-all --zone=public
public (active)
 target: default
 icmp-block-inversion: no
 interfaces: bond0 internet lan server wireless
 sources:
 services: dhcpv6-client ssh
 ports:
 protocols:
 masquerade: no
 forward-ports:
 sourceports:
 icmp-blocks:
 rich rules:
 success

[root@node1 ~]# firewall-cmd --list-all --zone=dmz
dmz (active)
 target: default
 icmp-block-inversion: no
 interfaces: enp6s0
 sources:
 services: ssh
 ports:
 protocols:
 masquerade: no
 forward-ports:
 sourceports:
 icmp-blocks:
 rich rules:

Remove a service.
[root@node1 ]~]# firewall-cmd --zone=public --remove-service=dhcpv6-client
success
[root@node1 ~]# firewall-cmd --zone=public --remove-service=dhcpv6-client --permanent
success
[root@node1 ~]# firewall-cmd --zone=public --remove-service=ssh
success
[root@node1 ~]# firewall-cmd --zone=public --remove-service=ssh --permanent
success
[root@node1 ~]# firewall-cmd --reload
success
[root@node1 ~]# firewall-cmd --list-all --zone=public
public (active)
 target: default
 icmp-block-inversion: no
 interfaces: bond0 internet lan server wireless
 sources:
 services:
 ports:
 protocols:
 masquerade: no
 forward-ports:
 sourceports:
 icmp-blocks:
 rich rules:
 success


  1. Configure our Cisco switch for LACP bonding
6.1 Create VLANs

You can use virtual LANs (VLANs) to divide the network into separate logical areas. VLANs can also be considered as broadcast domains.
VLANs are numbered from 1 to 4094. All configured ports belong to the default VLAN when you first bring up the switch. The default VLAN (VLAN1) uses only default values, and you cannot create, delete, or suspend activity in the default VLAN.
To create a VLAN, perform this task:
switch#  configure terminal
switch(config)#  vlan 5
switch(config-vlan)#  name Internet
switch(config-vlan)#  vlan 6
switch(config-vlan)#  name Server
switch(config-vlan)#  vlan 7
switch(config-vlan)#  name Wireless
switch(config-vlan)#  vlan 8
switch(config-vlan)#  name LAN
switch(config-vlan)#  exit
switch(config)#  exit
switch#  

To display VLAN configuration information:
switch#  show vlan brief
VLAN Name Status Ports
----------- ------------------------------- ----------- -----------------------------------------
1 default active Gi0/1, Gi0/2, Gi0/3, Gi0/4, Gi0/5, Gi0/6, Gi0/7, Gi0/8
5 Internet active
6 Server active
7 Wireless active
8 LAN active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 frnet-default act/unsup


6.2 Reset interfaces

To reset the configuration of an interface back to its default values, use the default command in global configuration mode.
switch#  configure terminal
switch(config)#  default interface range GigabitEthernet 0/1 - 4
switch(config)#  default interface GigabitEthernet 0/7

Remove the port-channel interface, if exist.
switch(config)#  no interface port-channel 1


6.3 Management interface

Configure the interface where your plugged your UTP cable on the management interface of your server Node1.
switch(config)#  interface GigabitEthernet 0/7
switch(config-if-range)#  description Mgm – Node1
switch(config-if-range)#  switchport mode access
switch(config-if-range)#  switchport access vlan 6
switch(config-if-range)#  switchport port-security maximum 2
switch(config-if-range)#  switchport port-security violation restrict
switch(config-if-range)#  switchport port-security aging time 1
switch(config-if-range)#  switchport port-security aging type inactivity
switch(config-if-range)#  switchport port-security
switch(config-if-range)#  storm-control broadcast level 20.00
switch(config-if-range)#  storm-control unicast level 89.00 67.00
switch(config-if-range)#  snmp trap link-status
switch(config-if-range)#  spanning-tree portfast
switch(config-if-range)#  spanning-tree bpduguard enable
switch(config-if-range)#  no shutdown
switch(config-if-range)#  exit
switch(config)#  


6.4 Physical interface to bond

Configure our physical interfaces.
switch(config)#  interface range GigabitEthernet 0/1 - 4
switch(config-if-range)#  description LACP po1 - Node1
switch(config-if-range)#  switchport trunk encapsulation dot1q
switch(config-if-range)#  switchport mode trunk
switch(config-if-range)#  switchport trunk allowed vlan 5,6,7,8
switch(config-if-range)#  spanning-tree portfast trunk
switch(config-if-range)#  ip dhcp snooping trust
switch(config-if-range)#  channel-group 1 mode active
Creating a port-channel interface Port-channel 1

switch(config-if-range)#  exit
switch(config)#  


6.5 Configure our logical interface

Let’s configure our port-channel.
switch(config)#  interface port-channel 1
switch(config-if-range)#  description srv Node1
switch(config-if-range)#  switchport trunk encapsulation dot1q
switch(config-if-range)#  switchport mode trunk
switch(config-if-range)#  switchport trunk allowed vlan 5,6,7,8
switch(config-if-range)#  spanning-tree portfast trunk
switch(config-if-range)#  ip dhcp snooping trust
switch(config-if-range)#  storm-control broadcast level 40
switch(config-if-range)#  storm-control unicast level 89 67
switch(config-if-range)#  snmp trap link-status
switch(config-if-range)#  no shutdown
switch(config-if-range)#  exit
switch(config)#  exit
switch#  exit


6.6 Check the interfaces

You can view summary or detailed information on the switch ports using the show interfaces status command. To see summary information on all ports on the switch, enter the show interfaces status command with no arguments.
switch#  show interface status

Port Name Status Vlan Duplex Speed Type
Gi0/1 LACP po1 - Node1 connected trunk a-full a-1000 10/100/1000BaseTX
Gi0/2 LACP po1 - Node1 connected trunk a-full a-1000 10/100/1000BaseTX
Gi0/3 LACP po1 - Node1 connected trunk a-full a-1000 10/100/1000BaseTX
Gi0/4 LACP po1 - Node1 connected trunk a-full a-1000 10/100/1000BaseTX
Gi0/5 notconnect 1 auto auto 10/100/1000BaseTX
Gi0/6 notconnect 1 auto auto 10/100/1000BaseTX
Gi0/7 Mgm - Node1 connected 6 a-full a-1000 10/100/1000BaseTX
Gi0/8 notconnect 1 auto auto 10/100/1000BaseTX
Po1 srv Node1 connected trunk a-full

Display information about all trunk interfaces.
switch#  show interface trunk

Port Mode Encapsulation Status Native vlan
Po1 on 802.1q trunking 1

Port Vlans allowed on trunk
Po1 5-8

Port Vlans allowed and active in management domain
Po1 5-8

Port Vlans in spanning tree forwarding state and not pruned
Po1 5-8

Displays the status of a port-channel interface.
switch#  show interface port-channel 1

Port-channel1 is up, line protocol is up (connected)
 Hardware is EtherChannel, address is 6c**.****.0102 (bia 6c**.****.0102)
 Description: srv Node1
 MTU 1500 bytes, BW 4000000 Kbit/sec, DLY 10 usec,
  reliability 255/255, txload 1/255, rxload 1/255
 Encapsulation ARPA, loopback not set
 Keepalive set (10 sec)
 Full-duplex, 1000Mb/s, link type is auto, media type is unknown
 input flow-control is off, output flow-control is unsupported
 Members in this channel: Gi0/1 Gi0/2 Gi0/3 Gi0/4
 ARP type: ARPA, ARP Timeout 04:00:00
 Last input never, output 00:00:00, output hang never
 Last clearing of "show interface" counters never
 Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
 Queueing strategy: fifo
 Output queue: 0/40 (size/max)
 5 minute input rate 0 bits/sec, 0 packets/sec
 5 minute output rate 22000 bits/sec, 35 packets/sec
  152 packets input, 19456 bytes, 0 no buffer
  Received 152 broadcasts (152 multicasts)
  0 runts, 0 giants, 0 throttles
  0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
  0 watchdog, 152 multicast, 0 pause input
  0 input packets with dribble condition detected
  42329 packets output, 3291437 bytes, 0 underruns
  0 output errors, 0 collisions, 1 interface resets
  0 unknown protocol drops
  0 babbles, 0 late collision, 0 deferred
  0 lost carrier, 0 no carrier, 0 pause output
  0 output buffer failures, 0 output buffers swapped out

To display LACP information, use the show lacp command in privileged EXEC mode. Displays information about the LACP neighbor.
switch#  show lacp 1 neighbor

Flags:  S - Device is requesting Slow LACPDUs
   F - Device is requesting Fast LACPDUs
   A - Device is in Active mode   P - Device is in Passive mode

Channel group 1 neighbors

Partner's information:
Port LACP Flags Port Priority Dev ID Age Admin key Oper Key Port Number Port State
Gi0/1 FA 255 00**.****.26f5 26s 0x0 0x9 0x4 0x3F
Gi0/2 FA 255 00**.****.26f5 26s 0x0 0x9 0x1 0x3F
Gi0/3 FA 255 00**.****.26f5 26s 0x0 0x9 0x3 0x3F
Gi0/4 FA 255 00**.****.26f5 26s 0x0 0x9 0x2 0x3F

Displays information about the LACP traffic statistics.
switch#  show lacp 1 counters
Port LACPDUs Sent Recv Marker Sent Recv Marker Response Sent Recv LACPDUs Pkts Err
--------- --------- --------- --------- --------- ------------------ ------------------ ------------------
Gi0/1 1970 65 0 0 0 0 0
Gi0/2 1933 66 0 0 0 0 0
Gi0/3 1978 66 0 0 0 0 0
Gi0/4 1988 66 0 0 0 0 0


  1. Check LACP on the Linux host

Show protocols (IP or Ipv6) address on a device.
[root@node1 ~]# ip addr
1: lo: mtu 65536 qdisc noqueue state UNKNOWN qlen 1
  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: enp3s0f0: mtu 1500 qdisc pfifo_fast master bond0 state UP qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
3: enp3s0f1: mtu 1500 qdisc pfifo_fast master bond0 state UP qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
4: enp4s0f0: mtu 1500 qdisc pfifo_fast master bond0 state UP qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
5: enp4s0f1: mtu 1500 qdisc pfifo_fast master bond0 state UP qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
6: enp6s0: mtu 1500 qdisc pfifo_fast state UP qlen 1000
  link/ether 68:**:**:**:f4:21 brd ff:ff:ff:ff:ff:ff
  inet 10.0.6.30/26 brd 10.0.6.63 scope global enp6s0
   valid_lft forever preferred_lft forever
7: bond0: mtu 1500 qdisc noqueue state UP qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
24: bond0.6@bond0: mtu 1500 qdisc noqueue master server state UP qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
25: server: mtu 1500 qdisc noqueue state UP qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
26: bond0.7@bond0: mtu 1500 qdisc noqueue master wireless state UP qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
27: wireless: mtu 1500 qdisc noqueue state UP qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
28: bond0.8@bond0: mtu 1500 qdisc noqueue master lan state UP qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
29: LAN: mtu 1500 qdisc noqueue state UP qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
30: bond0.5@bond0: mtu 1500 qdisc noqueue master internet state UP qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff
31: internet: mtu 1500 qdisc noqueue state UP qlen 1000
  link/ether 00:**:**:**:26:f5 brd ff:ff:ff:ff:ff:ff

Using brctl show, we can view all available ethernet bridges on your server.
[root@node1 ~]# brctl show
bridge name bridge id STP enabled interfaces
LAN 8000.002655e126f5 yes bond0.8
internet 8000.002655e126f5 yes bond0.5
server 8000.002655e126f5 yes bond0.6
wireless 8000.002655e126f5 yes bond0.7

View the created connections with command nmcli: .
[root@node1 ~]# nmcli connection show
NAME UUID TYPE DEVICE
bond-bond0 6787154b-5afb-4b6d-ba44-d4882efd0a68 bond bond0
bond-slave-enp3s0f0 db80fcdd-8490-47f3-8a4f-1abd374490ce ethernet enp3s0f0
bond-slave-enp3s0f1 bc2b6b88-836f-4b34-8461-4a07d5ed1695 ethernet enp3s0f1
bond-slave-enp4s0f0 60c68d34-924f-406e-96cb-989c77892aaa ethernet enp4s0f0
bond-slave-enp4s0f1 5733df69-c86e-4ec2-8682-9ead10d66260 ethernet enp4s0f1
bridge-internet aabc5b85-d2fe-42a8-ad07-76416d4db9b6 bridge internet
bridge-server 4ac8dc66-9c46-48e2-a378-72a6d7f7a14a bridge server
bridge-wireless a40c5dd9-b73a-4488-9cd1-0c11d44a4d55 bridge wireless
bridge-LAN 2c4e6eba-6e37-409f-883b-a537faa5c608 bridge LAN
bridge-slave-bond0.5 7ed13631-4714-42d1-821e-d8ef651cff56 vlan bond0.5
bridge-slave-bond0.6 8a1c4910-d894-4531-950a-fedc8609af02 vlan bond0.6
bridge-slave-bond0.7 bde315fe-6eec-4d0f-acfa-4681a8da9aeb vlan bond0.7
bridge-slave-bond0.8 24d61080-268f-42ac-8f11-1420f7f74343 vlan bond0.8
enp6s0 6175c7d2-61e7-4a3d-baf2-d05529b612d9 ethernet enp6s0
enp3s0f0 8e63e1ca-d966-4011-badd-f63eb3f5f9e9 ethernet --
enp3s0f1 b87952f7-7506-4676-aa4c-33dd017e8374 ethernet --
enp4s0f0 b07926ad-9f19-48d2-a9db-89a68fcc6fd8 ethernet --
enp4s0f1 a53c8a4d-ee7c-4fd7-aa13-73aabef36223 ethernet --

Checking the Status of the bonded LACP interface.
[root@node1 ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2+3 (2)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 200
Down Delay (ms): 200

802.3ad info
LACP rate: fast
Min links: 0
Aggregator selection policy (ad_select): stable
System priority: 65535
System MAC address: 00:**:**:**:26:f5
Active Aggregator Info:
   Aggregator ID: 17
   Number of ports: 4
   Actor Key: 9
   Partner Key: 1
   Partner MAC Address: 6c:**:**:**:01:00

Slave Interface: enp3s0f0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:**:**:**:26:f5
Slave queue ID: 0
Aggregator ID: 17
Actor Churn State: monitoring
Partner Churn State: monitoring
Actor Churned Count: 0
Partner Churned Count: 0
details actor lacp pdu:
  system priority: 65535
  system mac address: 00:**:**:**:26:f5
  port key: 9
  port priority: 255
  port number: 1
  port state: 63
details partner lacp pdu:
  system priority: 32768
  system mac address: 6c:**:**:**:01:00
  oper key: 1
  port priority: 32768
  port number: 259
  port state: 61

Slave Interface: enp3s0f1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:**:**:**:26:f4
Slave queue ID: 0
Aggregator ID: 17
Actor Churn State: monitoring
Partner Churn State: monitoring
Actor Churned Count: 0
Partner Churned Count: 0
details actor lacp pdu:
  system priority: 65535
  system mac address: 00:**:**:**:26:f5
  port key: 9
  port priority: 255
  port number: 2
  port state: 63
details partner lacp pdu:
  system priority: 32768
  system mac address: 6c:**:**:**:01:00
  oper key: 1
  port priority: 32768
  port number: 261
  port state: 61

Slave Interface: enp4s0f0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:**:**:**:26:f7
Slave queue ID: 0
Aggregator ID: 17
Actor Churn State: monitoring
Partner Churn State: monitoring
Actor Churned Count: 0
Partner Churned Count: 0
details actor lacp pdu:
  system priority: 65535
  system mac address: 00:**:**:**:26:f5
  port key: 9
  port priority: 255
  port number: 3
  port state: 63
details partner lacp pdu:
  system priority: 32768
  system mac address: 6c:**:**:**:01:00
  oper key: 1
  port priority: 32768
  port number: 260
  port state: 61

Slave Interface: enp4s0f1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:**:**:**:26:f6
Slave queue ID: 0
Aggregator ID: 17
Actor Churn State: monitoring
Partner Churn State: monitoring
Actor Churned Count: 0
Partner Churned Count: 0
details actor lacp pdu:
  system priority: 65535
  system mac address: 00:**:**:**:26:f5
  port key: 9
  port priority: 255
  port number: 4
  port state: 63
details partner lacp pdu:
  system priority: 32768
  system mac address: 6c:**:**:**:01:00
  oper key: 1
  port priority: 32768
  port number: 258
  port state: 61

Geen opmerkingen:

Een reactie posten