当前位置:网站首页>STP configuration instance learning record
STP configuration instance learning record
2022-07-23 13:00:00 【Amateur visionary】
STP Configure the instance
STP(Spanning Tree Protocol) Is the English abbreviation of spanning tree protocol , It can be applied to the establishment of tree topology in computer network , The main function is to prevent redundant links in the bridge network from forming a loop .
List of articles
1、 The goal of the experiment
Master the switch STP Configuration of , Received relevant configuration commands
2、 Network topology
notes :PC Of IP Address 、 Subnet mask and gateway , Click on PC Enter self configuration 
3、 Configuration steps
(1) Turn on the switch STP function
Some devices may be turned on by default STP, So we can manually set STP close , An example of the close command is as follows :
[SW1]undo stp enable // close STP
stay 3 Switch on STP function , And will STP The mode of is changed to 802.1D The standard STP
SW1:
<Huawei>system-view // Enter the system view
[Huawei]sysname SW1 // Rename the device
[SW1]stp mode stp // take STP The mode of is changed to 802.1D The standard STP
[SW1]stp enable // Turn on STP
SW2:
<Huawei>system-view // Enter the system view
[Huawei]sysname SW2 // Rename the device
[SW2]stp mode stp // take STP The mode of is changed to 802.1D The standard STP
[SW2]stp enable // Turn on STP
SW3:
<Huawei>system-view // Enter the system view
[Huawei]sysname SW3 // Rename the device
[SW3]stp mode stp // take STP The mode of is changed to 802.1D The standard STP
[SW3]stp enable // Turn on STP
(2) Set switch priority
To configure SW1 The priority for 0,SW2 The priority for 4096
Method 1 :
SW1:
[SW1]stp root primary // The priority of configuring the switch is 0, That is, the highest prioritySW2:
[SW2]stp root secondary // The priority of configuring the switch is 4096, I.e. ratio 0 One level down
Method 2 :
SW1:
[SW1]stp priority 0 // The priority of configuring the switch is 0, That is, the highest prioritySW2:
[SW2]stp priority 4096 // The priority of configuring the switch is 4096, I.e. ratio 0 One level down
4、 test
(1) Check whether the device trims the loop according to the configured parameters , Complete spanning tree
Observe PC1 and PC2 Interworking status of , If PC1 and PC2 Can communicate with each other , It means that the spanning tree has worked
use PC1 Go to ping PC2 Of IP Address , It is found that it can be connected 
use PC2 Go to ping PC1 Of IP Address , I found that it can also pass 
(2) Observe the operation of the spanning tree after the topology changes
notes : There may be a small amount of packet loss
To break off SW1 and SW2 Post link observation PC1 and PC2 Interoperability of 
use PC1 Go to ping PC2 Of IP Address , It can also be found that 
use PC2 Go to ping PC1 Of IP Address , Discovery can also pass 
5、 Summary
STP Working process of :
- Select root bridge (Root Bridge): Root bridge , It's the root of the tree , It is the core of tree network .
- Select the root port (Root Port): The root port is the port with the shortest path to the root bridge , The root port is responsible for forwarding data to the root bridge .
- Select the specified port (Designated Port): The specified port is the port closest to the root on each network segment , It forwards the data sent to the network segment .
- Prepare blocking port (Alternate Port): If a port is neither the root port nor the specified port , Is the preparatory port .
STP Port status of :
| Port status | describe | explain |
|---|---|---|
| Disabled Disabled state | The port in this state does not forward data frames , Don't work MAC Address table , Do not participate in spanning tree calculation | The port status is Down |
| Listening Listening state | The port in this state does not forward data frames , Don't work MAC Address table , Only participate in spanning tree calculation , Receive and send BPDU | Transition state , increase Learning Status can prevent temporary loops |
| Blocking Blocked state | The port in this state does not forward data frames , Don't work MAC Address table , receive BPDU, But don't send it out BPDU | The final state of the blocking port |
| Learning Learning state | The port in this state does not forward data frames , But learning MAC Address table , Participate in spanning tree calculation , Receive and send BPDU | Transition state |
| Forwarding Forwarding status | The port in this state forwards data frames normally , Study MAC Address table , Participate in spanning tree calculation , Receive and send BPDU | Only the root port and the specified port can enter Forwarding state |
If there are mistakes in the article , Welcome to criticize and correct
边栏推荐
- How far is the first kind of mistake from us
- jenkins部署
- How to write a web page with a common text editor
- Unity used trilib plug-in under URP pipeline to load model material incorrectly
- 制作本地apt源离线安装
- Static route configuration instance learning record
- Sword finger offer summary
- 学习日记——(路由与交换技术)三层交换机
- How many seats do you need for 1000 people to eat in 2 hours?
- Make local apt source offline installation
猜你喜欢

Hcip-hcia knowledge review (II)

Static route configuration instance learning record

学习日记——(路由与交换技术)三层交换机

Depth first find all simple paths from vertex u to vertex v in the graph

融e学答案脚本制作(2020最新)

FTP实验及概述

Solution rapide: xshell ne peut pas glisser dans un dossier ou un paquet

OSPF single area configuration instance learning record

Default routing configuration instance learning record

Unity3d: vector calculation, AOE graph intersection
随机推荐
为什么要搭建本地yum仓库?
Summary of basic SQL operations
2020-09-20
ftp部署
Knowledge points and skills of Wireshark network analysis is so simple
2020-09-22
Unity3d: script execution sequence on scene loading gameobejct
Telnet 配置实例学习记录
Instant messaging websocket
学习日记——(路由与交换技术)OSPF协议
Routing and switching technology - static routing
Analysis ideas of strong consistency and weak consistency and concurrency skills of distributed scenarios
Unity3d: special effect object pool, timeout delete GameObject in the pool, GC weight
2020-09-22
Rip configuration instance learning record
Leetcode problem solution summary
三层交换配置实例学习记录
Hcip - first experiment
PostgreSQL k8s部署模板
Unity3d:ugui, UI and special effect particle level, bakemesh above 2018.2, particles between two images and in Scrollview