Cluster 3. Network Switches.
You can use any switches that support VLAN and multicasting groups (also it's possible to use unicast at least with corosync 2.4.0). I'll use Cisco Catalyst 2960-S stackable switches (they form a stack - which can be managed as one switch).
We will use 2 Cisco stack switches (you can use just one switch) in order to make links redundant - eno4 of nodes must be connected to different switches, eno1, eno2, eno3 must be connected to the switch where the other node's eno4 interface is connected.
To setup stack:
We will use 2 Cisco stack switches (you can use just one switch) in order to make links redundant - eno4 of nodes must be connected to different switches, eno1, eno2, eno3 must be connected to the switch where the other node's eno4 interface is connected.
To setup stack:
- Connect stack cables to the proper ports Stack1 to Stack1 and Stack2 to Stack2
- Connect console cable to the Cisco and to your PC/NB
- power on switches
- verify that switch knows whe is a mater and who is a slave:
- do sh sw
- Master switch Role must be - Master, current state - Ready
- Slave switch Role must be - Member, current state - Ready
- Also verify that MSTR led on master switch is green
- Verify stack-ports:
- do sh sw stack-ports - all ports must be - OK
- power-off master switch and verify that slave becomes master:
- do sh sw
- Removed switch Role must change to - Member, State must change to - Removed
- Remaining switch Role must change to - Master, State must change to - Ready
- name stack like agrp-stack01 (agrp is 4 letter owner code, stack01 is simply serial number of the stack, it's our first stack and because of that stack serial number is 01):
- hostname agrp-stack01
- configure username and password (simple passwords are giver for reference only):
- aaa new-model
- aaa authentication login default local
- username admin privilege 15 secret 123456
- enable secret 12345
- create VLANs:
- vlan 100
- name BCN
- vlan 200
- name SN
- vlan 51
- name IFN
- vlan 1000
- name Deafult
- disable all interfaces:
- int range gi 1/0/1 - 28, gi 2/0/1-28
- shut
- do wr
- enable needed interfaces and make them member of the needed VLAN, also disable STP on ports (STP requires blocking traffic to prevent loops, such a behavior can cause nodes think other node is dead while it's however alive):
- disable STP for BCN and SN:
- no spanning-tree vlan 100
- no spanning-tree vlan 200
- no spanning-tree vlan 51
- port 1/0/24 & 2/0/24 will be IFN uplink ports - going to the other switch:
- int ra gi 1/0/24 , gi 2/0/24
- no shut
- create LAG/bonding as in my case other switch is single switch, not a stack:
- channel-group 1 mode on
- configure Port-Channel1:
- int Po1
- sw mode access
- sw nonegotiate
- sw access vlan 51
- show etherchannel summary:
- "Ports" must be - Gi1/0/24(P) Gi2/0/24(P) - meaning that both ports are bundled in a LAG
- Configure iLO port - port 1/0/17 & 2/0/17 will be iLO interface connected ports (here we will insert node1 iLO to the switch1 and node2 iLO to the switch2):
- node1 iLO - 1/0/17 - label this cable c01n01_ipmi
- node2 iLO - 2/0/17 - label this cable c01n02_ipmi
- int ra gi 1/0/17 , gi 2/0/17
- no shut
- sw nonegotiate
- sw mode access
- sw access vlan 100
- int gi1/0/17
- description agrp-c01n01
- int gi2/0/17
- description agrp-c01n02
Switch ports will be used as 5 ports per cluster, so that we can use each switch stack for serving up to 4 clusters:
We have two options to further setup our stack, one is for Linux bonding and bridging and the other is for Open vSwitch.
- 1st cluster - gi1/0/1-4,17 & gi2/0/1-4,17
- 2nd cluster - gi1/0/5-8,19 & gi2/0/5-8,19
- 3rd cluster - gi1/0/9-12,21 & gi2/0/9-12,21
- 4th cluster - gi1/0/13-16,23 & gi2/0/13-16,23
We have two options to further setup our stack, one is for Linux bonding and bridging and the other is for Open vSwitch.
Linux bonding and bridging
Subnet | VID | NIC | Link 1 | NIC | Link 2 | Bond | Net IP |
---|---|---|---|---|---|---|---|
BCN | 100 | eno1 | bcn_link1 | eno4 | back_link.100 | bcn_bond | 10.10.53.0/24 |
SN | 200 | eno2 | sn_link1 | eno4 | back_link.200 | sn_bond | 10.10.52.0/24 |
IFN | 51 | eno3 | ifn_link1 | eno4 | back_link.51 | ifn_bond | 172.16.51.0/24 |
- port 1/0/1 & 2/0/1 will be BCN ports:
- node1 eno1 - 1/0/1
- node2 eno1 - 2/0/1
- int ra gi 1/0/1 , gi 2/0/1
- no shut
- sw mode trunk
- sw nonegotiate
- sw trunk allowed vlan 100
- sw trunk native vl 1000
- port 1/0/2 & 2/0/2 will be SN ports:
- node1 eno2 - 1/0/2
- node2 eno2 - 2/0/2
- int ra gi 1/0/2 , gi 2/0/2
- no shut
- sw mode trunk
- sw nonegotiate
- sw trunk allowed vlan 200
- sw trunk native vl 1000
- port 1/0/3 & 2/0/3 will be IFN ports:
- node1 eno3 - 1/0/3
- node2 eno3 - 2/0/3
- int ra gi 1/0/3 , gi 2/0/3
- no shut
- sw mode trunk
- sw nonegotiate
- sw trunk allowed vlan 51
- sw trunk native vl 1000
- port 1/0/4 & 2/0/4 will be backup ports (here we will insert node1 port eno4 to the switch2 and node2 eno4 to the switch1):
- node1 eno4 - 2/0/4
- node2 eno4 - 1/0/4
- int ra gi 1/0/4 , gi 2/0/4
- no shut
- sw nonegotiate
- sw mode trunk
- sw trunk allowed vlan 100,200,51
- sw trunk native vl 1000
Open vSwitch
We will bond all 4 interfaces (from eno1 through eno4) to the OvS bond - ovs_bond.
And then we'll create OvS internal ports and assign them IP:
And then we'll create OvS internal ports and assign them IP:
Subnet
|
VID
|
OvS internal port
|
Net IP
|
---|---|---|---|
BCN
|
100
|
bcn-bond1
|
10.10.53.0/24
|
SN
|
200
|
sn-bond1
|
10.10.52.0/24
|
IFN
|
51
|
ifn-bond1
|
172.16.51.0/24
|
- ports Gi1/0/1-1/0/4 and Gi2/0/1-2/0/4 will be trunk ports carrying all VLANs:
- node1 eno1 and eno3 - 1/0/1 & 1/0/3 - label this 2 cables eno1_c01n01_ovs_bond and eno3_c01n01_ovs_bond
- node1 eno2 and eno4 - 2/0/2 & 2/0/4 - label this 2 cables eno2_c01n01_ovs_bond and eno4_c01n01_ovs_bond
- node2 eno1 and eno3 - 2/0/1 & 2/0/3 - label this 2 cables eno1_c01n02_ovs_bond and eno3_c01n02_ovs_bond
- node2 eno2 and eno4 - 1/0/2 & 1/0/4 - label this 2 cables eno2_c01n02_ovs_bond and eno4_c01n02_ovs_bond
- int ra gi 1/0/1, gi 1/0/3, gi 2/0/2, gi 2/0/4
- description agrp-c01n01
- channel-group 2 mode active #enabling LACP use different channel-group numbers for nodes
- no shut
- int Po2
- description agrp-c01n01
- sw mode trunk
- sw nonegotiate
- sw trunk allowed vlan 100,200,51
- sw trunk native vl 1000
- no shut
- int ra gi 1/0/2, gi 1/0/4, gi 2/0/1, gi 2/0/3
- description agrp-c01n02
- channel-group 3 mode active #enabling LACP use different channel-group numbers for nodes
- no shut
- int Po3
- description agrp-c01n02
- sw mode trunk
- sw nonegotiate
- sw trunk allowed vlan 100,200,51
- sw trunk native vl 1000
- no shut
- sh int port-channel {1|2|3} # to view info about LAG interfaces (choose needed LAG number)
LACP bandwidth - the maximum through-output will remain equal to the through-output of the single link. In fact you get more lanes to move but the maximum speed remains the same. By enabling LACP you increase maximum overall bandwidth. This achieved using load-balancing (Cisco default LB mechanism is source-MAC balancing).
No comments:
Post a Comment