Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

STP spanning tree

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

First, why there is STP? we should start with the working principle of the switch. As shown in the figure below, in the connection of the switch, there is often a spare link, but it is easy to make a loop between the switches. LW2 sends data to LW1 and broadcasts after receiving the data message. It will send a broadcast from 0pm to LW3, and it will also send a broadcast from 0pm to 2pm. LW3 receives data and broadcasts to LW1, while LW2 receives broadcasts from LW1 and sends broadcasts to LW1, and broadcasts sent by LW3 are also sent to LW1, which forms an infinite loop, which is also a broadcast storm, which will eventually lead to network resources exhaustion and switch crashes. In order to solve this problem, there is STP! [] (https://s1.51cto.com/images/blog/201805/08/d25db7e0d5eea9962b5701f0f461cb17.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=) II, .STP concept and function-Spanning Tree Protocol spanning Tree Protocol

Logically disconnect the loop to prevent broadcast storms (prevent layer 2 data forwarding loops when layer 2 redundant links are provided)

When the line fails, the blocking interface is activated to restore communication and act as a backup line.

Message: BPDU-bridge protocol data unit bridging protocol data unit 4. Principle: 1. Determine the role of the switch 2. Determine the role of the port 3. Determine the port status 4. Finally, the logical structure acyclic topology is formed! [] (https://s1.51cto.com/images/blog/201805/08/601b1667a7d59d09fac5c0cf68dc823b.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=) (1). Role: * * root bridge * * (root switch): the bridge ID is unique, and the switch with the smallest BID is selected between the switches as the root bridge in the network

Judgment rule: first compare the priority, the smaller the better, the default value is 32768. If the priority is the same, compare MAC. The smaller the better.

(2) Port role: root port: the opposite port connected to the root bridge is the root port. It only exists in the non-root switch, and there is only one, which is closest to the root switch: the lowest root path cost to the root bridge, the lowest cost of the  directly connected bridge, the lowest  port identification of the ID directly connected bridge.

Path cost: the default gigabit link cost is 20000 100 megabytes and 200000

Port ID: the smaller the port ID, the better the priority, which is determined by the port priority and port number. The priority is configurable. The default is 128.

Designated port: in any network segment, there is only one, closest to the root switch

Non-designated port (blocking port): all other ports are called "non-designated port"

(3)。 Port status:

# down: disable, force shutdown

# listening: listening: building an active topology

# learning: learning: building Bridge Table

# forwarding: forward: send / receive user data

# blocking: blocking: only receive BPDU

5. BPDU (1) contains key fields: root bridge ID, root path cost, sending bridge ID, port ID (2) working process: when the switch starts, assume that it is the root bridge, fill in its own bridge ID in the root bridge ID field of the outgoing BPDU, when all the switches in the network receive all the BPDU and make a comparison You can choose a unique root bridge. VI. Convergence of STP (1) STP status in switch port 5! [] (https://s1.51cto.com/images/blog/201805/08/2aee957033b08bc32edc290986053d09.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90, Type_ZmFuZ3poZW5naGVpdGk=) (2) three timers of STP: Hello time-forwarding delay-maximum aging time 0-20s: blocking 20-35s: listening 35-50s: learning 7. MSTP (1) MSTP multi-process is an enhanced technology based on STP protocol. The ports on the layer 2 switching equipment are bound to different processes, and the STP protocol calculation is carried out in terms of processes, and the ports not in the same process do not participate in the MSTP protocol calculation in this process, so that the spanning tree calculation in each process is independent and does not affect each other. (2) the MSTP network contains one or more MST domains (MST region), and each MST region contains one or more MST domains. MSTI is made up of switching equipment running spanning Tree Protocol (3) MSTP compatible STP can not only converge quickly, but also provide multiple redundant paths for data forwarding, and realize the load balancing of vlan data in the process of data forwarding.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report