Bonded Network Connections: Difference between revisions

From DISI
Jump to navigation Jump to search
(A page describing how to create the conditions for network bonding to a server. Includes configs of the network switch and the server)
 
 
(9 intermediate revisions by the same user not shown)
Line 3: Line 3:
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.
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.


===Dell PowerConnect Switch Configuration to Allow Bonded Networks===
===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.   
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.   
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.  
 
  switch-2-1#show running-config interface ethernet 1/g15
  switch-2-1#show running-config interface port-channel 7
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/g13
  channel-group 7 mode auto
  channel-group 7 mode auto
description 'LACP trunk to futuregadget'
  spanning-tree portfast
  spanning-tree portfast
  switchport mode general
  switchport mode general
  switchport general acceptable-frame-type tagged-only
  switchport general acceptable-frame-type tagged-only
  switchport general allowed vlan add 100,200
  switchport general allowed vlan add 100,200
 
  switch-2-1#show interfaces port-channel 7   
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
  Channel  Ports                        Hash Algorithm Type
  -------  ----------------------------- -------------------
  -------  ----------------------------- -------------------
  ch7      Active: 1/g15                 3
  ch7      Active: 1/g15, 1/g13          3


===Configuration on CentOS 7 Server===
===Configuration on CentOS 7 Server===
Below are the configuration files listed under /etc/sysconfig/network-scripts.   
Below are the configuration files listed under /etc/sysconfig/network-scripts.  The configurations should work for both CentOS6/7 with the exception that the device names for ethernet devices be eth# on CentOS 6 and enp#s# on CentOS 7.   


ifcfg-bond0
ifcfg-bond0
Line 53: Line 126:
  NM_CONTROLLED=no
  NM_CONTROLLED=no
  TYPE=Ethernet
  TYPE=Ethernet
#DOMAIN="cluster.ucsf.bkslab.org bkslab.org ucsf.bkslab.org"
#NAME="Vlan bond0.200"
  UUID=e77811ae-8d46-698e-82f3-21a4616413c0
  UUID=e77811ae-8d46-698e-82f3-21a4616413c0


ifcfg-enp3s0 - configuration file for ethernet device connected to port 15 on switch.   
//Below are configs for CentOS 7 network-scripts.  CentOS 7 uses a different naming scheme for ethernet devices compared to CentOS 6 (uses enp#s# format as opposed to eth#)  <br />
ifcfg-enp2s0 - configuration file for ethernet device connect to port 13 on switch-1-1
NAME="enp2s0"
DEVICE="enp2s0"
ONBOOT="yes"
UUID="637499f1-45fd-4670-98d4-05c51ef0c6b2"
BOOTPROTO="none"
TYPE="Ethernet"
#DNS1=10.20.1.1
NM_CONTROLLED=no
MASTER=bond0
SLAVE=yes
 
ifcfg-enp3s0 - configuration file for ethernet device connected to port 15 on switch-1-1.   
  TYPE=Ethernet  
  TYPE=Ethernet  
  BOOTPROTO=none
  BOOTPROTO=none

Latest revision as of 18:47, 27 July 2017

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.

switch-2-1#show running-config interface port-channel 7
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/g13
channel-group 7 mode auto
description 'LACP trunk to futuregadget'
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, 1/g13          3

Configuration on CentOS 7 Server

Below are the configuration files listed under /etc/sysconfig/network-scripts. The configurations should work for both CentOS6/7 with the exception that the device names for ethernet devices be eth# on CentOS 6 and enp#s# on CentOS 7.

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

//Below are configs for CentOS 7 network-scripts. CentOS 7 uses a different naming scheme for ethernet devices compared to CentOS 6 (uses enp#s# format as opposed to eth#)
ifcfg-enp2s0 - configuration file for ethernet device connect to port 13 on switch-1-1

NAME="enp2s0"
DEVICE="enp2s0"
ONBOOT="yes"
UUID="637499f1-45fd-4670-98d4-05c51ef0c6b2"
BOOTPROTO="none"
TYPE="Ethernet"
#DNS1=10.20.1.1
NM_CONTROLLED=no
MASTER=bond0
SLAVE=yes

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

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