15Ethernet link aggregation and switch stacking and clustering

1. Network reliability requirements

1. Network reliability

  • Network reliability refers to the ability to ensure uninterrupted network services when single or multiple points of equipment or links fail.
  • Network reliability can be achieved at multiple levels, including boards, devices, and links.

2. Single board reliability

2.1.Single board reliability-1

  • A modular switch consists of a chassis, power module, fan module, main control board, switching unit (SFU), and line board (LPU).
  • Frame: Provides slots for various boards and modules to realize communication between boards.
  • Power module: the power supply system of the device
  • Fan module: the cooling system of the device
  • Main control board (MPU, Main ProcessingUnit): Responsible for the control plane and management plane of the entire system.
  • Switch Fabric Unit (SFU, Switch Fabric Unit): Responsible for the data plane of the entire system. The data plane provides high-speed, non-blocking data channels to implement business exchange functions between various business modules.
  • Circuit board (LPU, Line Processing Unit): The line processing unit is a physical device
  • A module used to provide data forwarding function, providing optical ports and electrical ports at different rates.

2.2. Single board reliability-2

  • Taking the S12700E-8 as an example, the device provides 8 circuit board slots, 4 switching network board slots, 2 main control board slots, 6 power module slots, and 4 fan module slots.
  • A modular switch configured with multiple main control boards and switching fabric boards can ensure the reliability of the device itself. Damage to the switching fabric board and main control board in a single slot will not affect the normal operation of the device.
  • After the circuit board of a modular switch is damaged, the interface on the board cannot forward data normally.

3. Equipment reliability

4. Link reliability

  • To ensure link reliability between devices, multiple physical lines are deployed between devices. To prevent loops, STP only reserves one link to forward traffic, and the remaining links become backup links.

2. Principle and configuration of link aggregation technology

1. Improve link bandwidth

  • When there are multiple links between devices, due to the existence of STP, only one link will actually forward traffic, and the link bandwidth between devices cannot be improved.

2. Ethernet link aggregation

  • Ethernet link aggregation Eth-Trunk: referred to as link aggregation, by bundling multiple physical interfaces into a logical interface, the purpose of increasing link bandwidth can be achieved without hardware upgrades.

3. Basic terms/concepts of link aggregation

  • Link Aggregation Group (LAG): A logical link formed by bundling several links together. Each aggregation group uniquely corresponds to a logical interface, which is also called a link aggregation interface or an Eth-Trunk interface.
  • Member interfaces and member links: Each physical interface that makes up an Eth-Trunk interface is called a member interface. The link corresponding to a member interface is called a member link.
  • Active interfaces and active links: Active interfaces are also called selected interfaces and are member interfaces that participate in data forwarding. The link corresponding to the active interface is called an active link (Active link)
  • Inactive interfaces and inactive links: also called unselected interfaces, are member interfaces that do not participate in forwarding data. The link corresponding to the inactive interface is called an inactive link.
  • Aggregation mode: Depending on whether LACP (LinkAggregation Control Protocol) is enabled, link aggregation can be divided into manual mode and LACP mode.
  • Other concepts: upper active interface threshold and lower active interface threshold.

4. Manual mode

  • Manual mode: The establishment of Eth-Trunk and the addition of member interfaces are configured manually, and LACP is not used for negotiation between the two systems.
  • Under normal circumstances, all links are active links. In this mode, all active links participate in data forwarding and share the traffic equally. If an active link fails, the link aggregation group automatically distributes traffic equally among the remaining active links. Share traffic.
  • When one of the devices at both ends of the aggregation does not support the LACP protocol, you can use manual mode.

4.1 Example

LSW1
interface Eth-Trunk 1 //Create Eth-Trunk interface 1
int g0/0/1 //Enter interface 0/0/1
eth-trunk 1 //Add Eth-Trunk interface 1
int g0/0/2 //Enter interface 0/0/2
eth-trunk 1 //Add Eth-Trunk interface 1
LSW2
interface Eth-Trunk 1 //Create Eth-Trunk interface 1
int g0/0/1 //Enter interface 0/0/1
eth-trunk 1 //Add Eth-Trunk interface 1
int g0/0/2 //Enter interface 0/0/2
eth-trunk 1 //Add Eth-Trunk interface 1

The above completes the manual aggregation mode

The following tests connectivity
LSW1
vlan 10
interface Vlanif 10
IP address 1.1.1.1 255.255.255.0
interface Eth-Trunk 1
port link-type access
port default vlan 10
LSW2
vlan 10
interface Vlanif 10
IP address 1.1.1.2 255.255.255.0
interface Eth-Trunk 1
port link-type access
port default vlan 10

4.2 Manual mode defects

4.2.1

  • In order for the link aggregation interface to work properly, the peer interfaces of all member interfaces in the local link aggregation interface must be ensured:
    • Belong to the same device
    • Join the same link aggregation interface
  • In manual mode, there is no packet exchange between devices, so it can only be manually confirmed by the administrator.
4.2.2
  • In manual mode, the device can only determine whether the peer interface is working normally through the physical layer status.

5.LACP mode

  • LACP mode: A link aggregation mode using the LACP protocol. Devices interact through Link Aggregation Control Protocol Data Unit (LACPDU), and protocol negotiation ensures that the opposite end is a member interface of the same device and the same aggregate interface.
  • LACPDU packets contain device priority, MAC address, interface priority, interface number, etc.

5.1 System Priority

  • In LACP mode, the number of active interfaces selected by the devices at both ends must be consistent, otherwise the link aggregation group cannot be established. At this time, one end can be made the active end, and the other end (passive end) selects the active interface based on the active end.
  • The active end is determined by the system LACP priority. The smaller the value, the higher the priority.

5.2 Interface priority

  • After the active end is selected, both ends will select the active interface based on the interface priority of the active end. The interface with a higher priority will be selected as the active interface first. The smaller the interface LACP priority value, the higher the priority.

5.3LACP mode link aggregation configuration example

5.3.1. Case requirement description:
  • SW1 and SW2 are both connected to the networks of VLAN10 and VLAN20.
  • “SW1 and SW2 are interconnected through three Ethernet links. In order to provide link redundancy and ensure transmission reliability, link aggregation in LACP mode is configured between SW1 and SW2, and the priority is manually adjusted to make SW1 the active end. , and configure the maximum active port to be 2, and another link as backup.

LSW1
interface eth-trunk 1 //Create eth-trunk1
mode lacp //Set to lacp dynamic mode
max active-linknumber 2 //Activate two links (there are three lines in the above experiment, only two are used)
trunkport gigabitethernet 0/0/1 to 0/0/3 //Add 0/0/1 to 0/0/3 to the eth-trunk1
port link-type trunk
port trunk allow-pass vlan 10 20
lacp priority 30000 //Set the priority to 30000, the default system LACP priority is 32768
LSW2
interface eth-trunk 1 //Create eth-trunk1
mode lacp //Set to lacp dynamic mode
max active-linknumber 2 //Activate two links (there are three lines in the above experiment, only two are used)
trunkport gigabitethernet 0/0/1 to 0/0/3 //Add 0/0/1 to 0/0/3 to the eth-trunk1
port link-type trunk
port trunk allow-pass vlan 10 20

6. Active link election

6.1. Active link election-1

  • SW1 and SW2 configure link aggregation in LACP mode. Set the maximum number of active interfaces on both ends to 2.
  • The switch SW1 with higher priority is elected through LACPDU as the active end of the LACP negotiation process.

6.2. Active link election-2

  • SW1 selects an active interface on the local end by comparing the interface priority and interface number. Interfaces 1 and 2 have smaller interface numbers under the same interface priority and become active interfaces.

6.3. Active link election-3

  • SW1 notifies the peer of the local active port election results through LACPDU.

6.4. Active link election-4

  • SW2 determines the local active interface based on the election results of SW1, and the corresponding link becomes the active link.
  • At this point, the Eth-Trunk active link election process is completed.

7. Load sharing

7.1. Packet-based load balancing

When using Eth-Trunk to forward data, since there are multiple physical links between the devices at both ends of the aggregation group, if each data frame is forwarded on a different link, the arrival time of the data frame at the opposite end may be inconsistent, thus Causing data disorder.

7.2. Flow-based load sharing (commonly used)

Eth-Trunk recommends using flow-by-flow load balancing, that is, the same flow is loaded to one link. This not only ensures that the data frames of the same data flow are forwarded on the same physical link, but also realizes the flow of traffic within the aggregation group. Load sharing on physical links.

8. Load sharing mode

  • Eth-trunk supports load balancing based on the IP address or MAC address of packets. Different modes (valid locally and valid for outbound packets) can be configured to distribute data flows to different member interfaces.
  • Common patterns are: source IP, source MAC, destination IP, destination MAC, source and destination IP, source and destination MAC.
  • In actual business, users need to choose and configure appropriate load sharing methods based on business traffic characteristics. The more frequently a certain parameter in business traffic changes, the easier it is to achieve load balancing by choosing a load sharing method related to this parameter.

9. Typical usage scenarios

9.1 Typical usage scenarios-1

9.2 Typical usage scenarios-2

10. Configuration examples

10.1 Configuration Command Introduction

10.1.1. Create a link aggregation group
[Huawei] interface eth-trunk trunk-id

Create an Eth-Trunk interface and enter the Eth-Trunk interface view.

10.1.2. Configuring link aggregation mode
[Huawei-Eth-Trunk1] mode {lacp / manual load-balance}

Mode lacp configures the link aggregation mode to lacp mode, and mode manual load-balance configures the link aggregation mode to manual mode.
Note: The link aggregation mode at both ends needs to be consistent.

10.1.3. Add the interface to the link aggregation group (Ethernet interface view)
[Huawei-GigabitEthernet0/0/1] eth-trunk trunk-id

In the interface view, add the interface to the Eth-Trunk.

10.1.4. Add the interface to the link aggregation group (Eth-Trunk view)
[Huawei-Eth-Trunk1] trunkport interface-type { interface-number}

Add the interface to the link aggregation group in Eth-Trunk view. Both methods 3 and 4 can add the interface to the link aggregation group.

10.1.5. Enable the function of allowing ports with different speeds to join the same Eth-Trunk interface
[Huawei-Eth-Trunk1] mixed-rate link enable

By default, the device does not enable the function of allowing ports with different speeds to join the same Eth-Trunk interface. Only interfaces with the same speed can be added to the same Eth-Trunk interface.

10.1.6. Configuring system LACP priority
[Huawei] lacp priority priority

The smaller the system LACP priority value, the higher the priority. By default, the system LACP priority is 32768.

10.1.7. Configure interface LACP priority
[Huawei-GigabitEthernet0/0/1] lacp priority priority

Configure the interface LACP priority in interface view. By default, the LACP priority of the interface is 32768. The smaller the interface priority value, the higher the LACP priority of the interface.

This command can be configured only when the interface has been added to link aggregation.

10.1.8. Configure the maximum number of active interfaces
[Huawei-Eth-Trunk1] max active-linknumber {number}

When configuring, be sure to keep the maximum number of active interfaces on the local end and the peer end consistent. Only LACP mode supports configuring the maximum number of active interfaces.

10.1.9. Configure the minimum number of active interfaces
[Huawei-Eth>Trunk1] least active-linknumber {number}

The lower thresholds for the number of active interfaces on the local device and the peer device can be different. Both manual mode and LACP mode support configuring the minimum number of active interfaces.
The minimum number of active interfaces is configured to ensure minimum bandwidth. When the current number of active links is less than the lower threshold, the status of the Eth-Trunk interface turns Down.

3. Overview of stacking/clustering

1. What is stacking and clustering

  • Stacking (iStack): Multiple switches that support stacking features are connected together through stacking cables, logically becoming a switching device and participating in data forwarding as a whole.
  • Cluster Switch System (CSS): Two switch devices that support cluster features are combined together to logically form one switching device.
  • The cluster only supports two devices. Generally, modular switches support CSS and box devices support iStack.

2. Advantages of stacking and clustering

  • Multiple switches are virtualized into one: The stacked switch appears as a logical switch to the outside world, with the control plane unified and managed in a unified manner.
  • Unified forwarding plane: The forwarding planes of the physical devices in the stack are unified, and forwarding information is shared and synchronized in real time.
  • Cross-device link aggregation: Links across physical devices are aggregated into an Fth-Trunk port to interconnect with downstream devices.

3.Practical application

3.1 Practical Application-1

3.2 Practical Application-2

  • Two devices form a cluster and are virtualized into a single logical device. The simplified networking no longer requires the use of MSTP, VRRP and other protocols, simplifying network configuration. At the same time, it relies on cross-device link aggregation to achieve rapid convergence and improve reliability.

4. Recommended architecture