Detailed explanation of STP principle and SMTP case analysis

How STP Works: An MSTP Case Study

1. Overview of STP: Logically disconnect the loop to prevent the generation of broadcast storms. When the line fails and the blocked interface is activated, the communication is restored, and it acts as a backup line.
Second, the working principle of STP

  1. Determine the switch role:

    1. Root Switch—In a VLAN, there is one and only one root switch.
      2. Non-root switch - Except for the switch, other switches are non-root switches.
      Determination principle : mutual comparison between switches: BID (Birdge ID)
      priority MAC
      2 bytes 6 bytes
      First compare the priority, the smaller the better, the default value: 32768
      If the priorities are the same, compare the MAC, the smaller the better .
      Verification command: Display stp View the BID of the switch (the smaller the better)
      Display bridge mac-address View the switch MAC The smaller the better
  2. Determine port roles
    1. Root port: exists only on non-root switches, there is only one, and it is the closest to the root switch;
    2. Specify the port: In any network segment, there is one and only one, for example, the root switch is the closest
    3. Unspecified ports: All other ports are called unspecified ports;
  3. Determine the port status:
    DOWN:
    LISTENING:
    LEARNING:
    FORWARDING: root port, specified port status
    BLOCKING: non-specified port
    3. STP message format—BPDU is the comparison order
    1. Root-Switch: The BID of the root switch contained in this field;
    2. Cost: Indicates the distance from the switch sending the BPDU to the root switch;
    3. BID: Indicates the name of the switch that sent the BPDU; STP works: MSTP case analysis
    4. PID: indicates the port-id, that is, the ID of the outgoing port of the switch that sends the BPDU (port priority + port number) The default port priority is 128

MSTP principle and case analysis

**MSTP**:既可以快速收敛,又提供了数据转发的多个冗余路径,在数据转发过程中实现VLAN数据的负载均衡。

Experimental requirements: configure multi-instance spanning tree to achieve load balancing

Detailed explanation of STP principle and SMTP case analysis
1. Three switches create VLAN14 and VLAN23 at the same time
. 2. Experiment preparation: pc1 and pc4 belong to VLAN14, and pc2 and pc3 belong to VLAN23. And configure the corresponding IP.
3. Sw1 is configured as the root bridge of VLAN14, and the backup bridge of VLAN23.
4. Sw2 is configured as the root bridge of VLAN23 and the backup bridge of
VLAN14 . vlan batch 10 20 [H1]stp region-configuration Enter spanning tree region configuration [H1-mst-region]region-name mao Configure region name mao [H1-mst-region]instance 1 vlan 14 [H1-mst-region]instance 2 vlan 23 Add VLAN14 VLAN23 to tree 1 and tree 2 [H1-mst-region]active region-configuration Active region-configuration [H1]stp instance 1 priority 0 H1 has the highest priority to tree one [H1]stp instance 2 priority 4096 The priority for tree 2 is 4096 (standby) [H1-mst-region]display this View current instance spanning tree information










Similarly, configure switch 2 so that H2 has the highest priority to instance 2, 0, and the priority to instance 1 is 4096 (backup).

Verification summary:

查询H1,为树一的根交换机,树二的备份交换机,H2位树2的根交换机,树一的备份交换机。

Detailed explanation of STP principle and SMTP case analysis

Detailed explanation of STP principle and SMTP case analysis

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325685858&siteId=291194637