当前位置:网站首页>Basic principles of spanning tree protocol
Basic principles of spanning tree protocol
2022-06-24 22:30:00 【Zhuge iron and steel cloud】
Basic principles of spanning tree protocol
One . What is called a spanning tree protocol
1>.STP(Spanning Tree Protocol, Spanning tree protocol ) It is a protocol used to eliminate the physical loop of data link layer in LAN ;
2>. By switching between bridges BPDU(Bridge Protocol Data Unit, Bridge protocol data unit ), To ensure that the device completes the calculation process of the spanning tree .

expand :
BPDU The type of :
1>. Ordinary BPDU : A message used to compute and maintain a spanning tree
2>.BPDU TCN: When the network topology changes , It will send a message to inform other devices that the network topology has changed .
Two .STP The role of
1>. By blocking redundancy (rong) To eliminate the possible path loopback in the bridge network ;
2>. When the current path fails , Activate the redundant backup link , Restore network connectivity .

3、 ... and . To configure BPDU Generate and pass
1. To configure BPDU Contains the following important information , Complete the spanning tree calculation
a>. Root bridge ID(RootID)
b>. And path overhead (RootPathCost)
c>. Specify the bridge ID(DesignatedBridgeID)
d>. Designated port ID(DesignatedPortID)
2. Each device initially generates its own root bridge (Root Bridge) Configuration messages for , Send out your own configuration messages
3. After the network converges , The root bridge sends the configuration out BPDU, Other devices are not required for this configuration BPDU Forward
4. Root bridge election
a>. Bridge ID There are bridge priorities (BridgePriority) And the bridge MAC Address (BridgeMacAddress) form
b>. Bridge ID The small bridge north is elected as the root bridge

5. Root path overhead
a>. Root path overhead (RootPathCost) Is the cost of all links on the path to the root (Cost) Algebra and ;【 General 100m link cost yes 19, Gigabit link cost yes 10】
b>. When the non root bridge elects the root port , The port with the least root path overhead is the following port ;
c>. When the physical end elects the designated bridge , The bridge with the least path overhead is the designated bridge .

6. Through the bridge ID Determine port roles
a>. At the same path cost , The connected network segment specifies the bridge ID The smallest port is the root port ;
b>. At the same root path cost , Bridge ID The smallest bridge is selected as the designated bridge on the physical segment , The port connecting the specified bridge is the specified port .

7. Through the port ID Determine port roles
At the root path , Specify the bridge ID In the same situation , All specified ports ID The small port is the root port

8. Port status

H3C experiment :
Configure the spanning tree
【 The experiment purpose 】
l master STP Principle and function of
l master STP Election of root bridge and port roles
l master STP Basic configuration
【 The experimental requirements 】
At the switch SW1 and SW2 The system of tried to enable STP, And set up SW1 The priority of 0, In order to make SW1 Is the root bridge ; And configure the connection PC The port of is edge port .
【 Experimental equipment 】
Two switches 、PC Machine 1 、 Two network cables 、console Cable
【 The topology 】

【 Experimental process 】
1、 Configure for the host IP Address
host | IP Address |
Pc1 | 192.168.1.1 |
Pc2 | 192.168.1.2 |
2、 To configure SW1
<SW1>system-view
Turn on STP function
[SW1]stp enable
Set up SW1 The priority of 0
[SW1]stp priority 0
Enter the interface and try to configure the port as an edge port
[SW1]interface e0/4/2
[SW1-Ethernet0/4/2]stp edged-port enable[w1]
3、 To configure SW2
<SW2>system-view
[SW2]stp enable
[SW2]stp priority 0
[SW2]interface e0/4/2
[SW2-Ethernet0/4/2]stp edged-port enable
【 Experimental tests 】
1、 see SW1 STP Information

With It can be seen from the above information that SW1 It's the root bridge , All ports on it are designated ports (DESI), In forwarding state .
2、 see SW2 STP Information

As can be seen from the above information ,SW2 Right and wrong root bridge , port e/4/0 Is the root port , In forwarding state , Responsible for forwarding data between switches ; port e/4/1 Is the backup root port , In a blocking state ; Connect PC Of e/4/2 Is the specified port , In forwarding state .
【 Think and expand 】
If not in the switch E0/4/2 Port configuration edge port (undo stp edged-port), Then disconnect the port e/4/2 The cable , Reconnect , And in SWA View port on e/4/0 The state of , Note that the command is executed every few seconds to view , View the migration process of port status .
The purpose of edge ports is to speed up STP The rate of convergence
When your talent can't support your ambition , You should calm down to learn . When your ability can't control your goal , You should settle down and experience . Ask yourself , What kind of life do you want . Welcome to infrastructure automation operation and maintenance :598432640, big data SRE Advanced road :959042252,DevOps Advanced road :526991186
Reference resources STP Spanning tree protocol foundation _ Disciplined and studious , To ensure that you don't fall into cynicism .-CSDN Blog _stp agreement
边栏推荐
- 树莓派初步使用
- Two implementation methods of stack
- OA system -- save the verification code to session
- Ideal L9, new trend of intelligent cockpit
- ThreadLocal内存泄漏问题
- SAP interface debug setting external breakpoints
- 系统测试主要步骤
- 解决dataframe报错ValueError: Cannot take a larger sample than population when ‘replace=False‘
- img2pdf
- Raspberry pie preliminary use
猜你喜欢

Technology Review: what is the evolution route of container technology? What imagination space is there in the future?

The profound meaning of unlimited ecological development in Poka -- Multidimensional Interpretation of parallel chain

How to refine permissions to buttons?

Balanced binary search tree
How to solve the problem that the computer suddenly can't connect to WiFi

The process from troubleshooting to problem solving: the browser suddenly failed to access the web page, error code: 0x80004005, and the final positioning: "when the computer turns on the hotspot, the

Idea close global search box

The logic of "Ali health" has long changed

重磅!法大大上榜“专精特新”企业

DAO 中常见的投票治理方式
随机推荐
解决dataframe报错ValueError: Cannot take a larger sample than population when ‘replace=False‘
Online filing process
img2pdf
I really want to send a bunch of flowers
如何抓手机的包进行分析,Fiddler神器或许能帮到您!
零代码即可将数据可视化应用到企业管理中
Yida technology signed a contract with seven wolves to help the digital transformation of "Chinese men's wear leader"
seven
Learning notes 23-- basic theory of multi-sensor information fusion (Part I)
How to refine permissions to buttons?
Introduction, installation and use of postman tool
How to solve the problem that the computer suddenly can't connect to WiFi
直播软件app开发,左右自动滑动的轮播图广告
NIO多路复用之Selector的使用
Creating files, recursively creating directories
Description of transparent transmission function before master and slave of kt6368a Bluetooth chip, 2.4G frequency hopping automatic connection
Ansible basic configuration
Find the maximum value in each tree row [extension of one of the hierarchical traversals]
Description of software version selection of kt6368a Bluetooth dual-mode transparent chip
KT6368A蓝牙芯片的主从机之前透传功能说明,2.4G跳频自动连接