Bonded Network Connections

From DISI
Jump to navigation Jump to search

Network interface bonding allows several network devices to form a single logical group. There are different types of network bonds you can choose. We are most interested in 802.3ad link aggregation which allows us to use multiple ethernet interfaces in one network bond that provides us the bandwidth of multiple ports.

Creating a 802.3ad bonded network connection requires configuration of a switch with this feature. This is the hardest part! We have Dell PowerConnect 6248 and HP ProCurves.

Configuring HP Procurve J9147A 2910al-48G to Allow Bonded Networks

The first step in the creation of bonded networks is to create an LACP trunk on the switch that your machine is connected to.

1) View the trunks currently in use so you know what trunk number to create. Below, we can see that there are three trunks that have been created: Trk1, Trk2, and Trk4. In this example, I will choose to create Trk5.

switch-3-1# show trunks
Load Balancing
 Port | Name                             Type      | Group Type    
 ---- + -------------------------------- --------- + ----- --------
 6    | LACP to nfshead2.bkslab.org      100/1000T | Trk4  LACP       
 41   | static trunk to QB3 PI Zone      100/1000T | Trk2  Trunk   
 42   | static trunk to QB3 PI Zone      100/1000T | Trk2  Trunk   
 43   | static trunk to QB3 PI Zone      100/1000T | Trk2  Trunk   
 44   | static trunk to QB3 PI Zone      100/1000T | Trk2  Trunk   
 45   | LACP trunk to switch-1-1         100/1000T | Trk1  LACP    
 46   | LACP trunk to switch-1-1         100/1000T | Trk1  LACP    
 47   | LACP trunk to switch-1-1         100/1000T | Trk1  LACP    
 48   | LACP trunk to switch-1-1         100/1000T | Trk1  LACP    

2) In this example, I will combine port 17 and port 25 to form an LACP Trk5. Make sure you are in config mode to run this command.

switch-3-1(config)# trunk ethernet 17,25 trk5 lacp

3) Make the newly created trunk a member of the VLANs you need. In this example, we need trk5 to be a member of the public network, VLAN 100, and the cluster 2 private network, VLAN 200. Check the trunk's VLAN memberships after you run the commands to make sure they work.

switch-3-1(config)# vlan 100 tagged trk5 
switch-3-1(config)# vlan 200 tagged trk5 
switch-3-1(config)# show vlan ports trk5
 Status and Counters - VLAN Information - for ports Trk5
 VLAN ID Name                 | Status     Voice Jumbo
 ------- -------------------- + ---------- ----- -----
 100     26 subnet            | Port-based No    No   
 200     BKS cluster2         | Port-based No    No 

4) Name the ports to provide an accurate description for the ports and what they do.

switch-3-1(config)# interface ethernet 17 name "LACP to futuregadget2"
switch-3-1(config)# interface ethernet 25 name "LACP to futuregadget2"

5) Run 'show trunks' again to see the new trunk, trk5, with the descriptions and the ethernet ports that are assigned to the LACP trunk.

switch-3-1# show trunks
Load Balancing
 Port | Name                             Type      | Group Type    
 ---- + -------------------------------- --------- + ----- --------
 6    | LACP to nfshead2.bkslab.org      100/1000T | Trk4  LACP    
 17   | LACP to futuregadget2            100/1000T | Trk5  LACP    
 25   | LACP to futuregadget2            100/1000T | Trk5  LACP    
 41   | static trunk to QB3 PI Zone      100/1000T | Trk2  Trunk   
 42   | static trunk to QB3 PI Zone      100/1000T | Trk2  Trunk   
 43   | static trunk to QB3 PI Zone      100/1000T | Trk2  Trunk   
 44   | static trunk to QB3 PI Zone      100/1000T | Trk2  Trunk   
 45   | LACP trunk to switch-1-1         100/1000T | Trk1  LACP    
 46   | LACP trunk to switch-1-1         100/1000T | Trk1  LACP    
 47   | LACP trunk to switch-1-1         100/1000T | Trk1  LACP    
 48   | LACP trunk to switch-1-1         100/1000T | Trk1  LACP

6) Once these steps are done, you should be done with the configuration on the switch. The second half is configuring the host connected to the switch to utilize the LACP trunk. See below regarding configuring CentOS with the switch.

Configuring Dell PowerConnect Switch to Allow Bonded Networks

In the following example, I use ports 13 and 15 on our Dell PowerConnect 6248 switch to form an LACP trunk to my machine, futuregadget, which will have a bonded network connection. The trunk name on my switch is called port-channel 7/channel-group 7. Ports 13 & 15 are assigned to port-channel 7 along with several other small config changes.

Explanation of below configuration lines: port 15 on this switch is configured to be a part of channel-group 7. spanning-tree is activated on this port. It is configured to communicate on VLANs 100 and 200 which correspond to the Public network VLANs and the cluster 2 private network.

interface port-channel 7
description 'LAG for futuregadget for bonded connection'
spanning-tree portfast
switchport mode trunk
switchport trunk allowed vlan add 100,200
switchport trunk allowed vlan remove 

switch-2-1#show running-config interface ethernet 1/g15
channel-group 7 mode auto
spanning-tree portfast
switchport mode general
switchport general acceptable-frame-type tagged-only
switchport general allowed vlan add 100,200
switch-2-1#show running-config interface ethernet 1/g15

channel-group 7 mode auto
spanning-tree portfast
switchport mode general
switchport general acceptable-frame-type tagged-only
switchport general allowed vlan add 100,200 

switch-2-1#show interfaces port-channel 7  
Channel   Ports                         Hash Algorithm Type
-------   ----------------------------- -------------------
ch7       Active: 1/g15                 3

Configuration on CentOS 6/7 Server

Below are the configuration files listed under /etc/sysconfig/network-scripts.

ifcfg-bond0

DEVICE=bond0
NAME=bond0
TYPE=Bond
BONDING_MASTER=yes
ONBOOT=yes 
BOOTPROTO=NONE
BONDING_OPTS="mode=4 miimon=100"

ifcfg-bond0.100 - this creates a vlan 100 under network bond0. VLAN 100 corresponds to the VLAN generated on the network switch which is the public network.

VLAN=yes
DEVICE=bond0.100
BOOTPROTO=static
ONBOOT=yes
IPADDR=169.230.26.84
NETMASK=255.255.255.0
GATEWAY=169.230.26.1
TYPE=Ethernet
NM_CONTROLLED="no"

ifcfg-bond0.200 - this creates a vlan 200 under network bond0. VLAN 200 corresponds to the VLAN generated on the network switch which is the cluster 2 private network.

DEVICE=bond0.200
VLAN=yes
ONBOOT=yes
BOOTPROTO=static
IPADDR=10.20.8.19
PREFIX=16
DNS1=10.20.1.1
NM_CONTROLLED=no
TYPE=Ethernet
UUID=e77811ae-8d46-698e-82f3-21a4616413c0

ifcfg-enp3s0 - configuration file for ethernet device connected to port 15 on switch.

TYPE=Ethernet 
BOOTPROTO=none
NAME=enp3s0
UUID=d46b75ef-eb93-41b8-96c1-97b2f8f6cc48
DEVICE=enp3s0
ONBOOT=yes
NM_CONTROLLED=no
MASTER=bond0
SLAVE=yes