当前位置:网站首页>Exchange the STP/network knowledge
Exchange the STP/network knowledge
2022-07-29 17:18:00 【HUAWEI CLOUD】
STPis applied to the switch,Its purpose is to split the broadcast storm.we are in the actual situation,There must be a loop in the connection to the switch(物理上),STPIt is to use the logical link to control a path to turn off.,Make its physical ring logic without ring.
STP是自动生成的,Through multicast when established(运行STP的交换机)的方式发送BPDU来学习MAC地址,to automatically formSTP拓扑,Not to mention the specific theory.
STPAlgorithms are divided into3个步骤:
1.Choose root bridge per broadcast domain
----》选择网桥ID小的作为RB.
网桥ID=优先级(0-65535,默认:32768,steps:4096)+MAC地址
2.每个非RBChoosing one root portRP
----》(1).该非RBThe port of the switch has the lowest path cost to the root bridge(千:2W,百:20W)
(2).一样的话.Port at the other end of the bridge of the equipmentID最小.
(3).still the same.Select the port with the smaller ID.
(端口优先级(0-240,默认128,steps 16)+端口号(e0/0/0这样的)).基本不用
3.Each network segment must select a designated portDP(DESIGNATED PORT)
----》The root bridge is full ofDP,So is the oppositeRP.
(1)The switch where the port is located goes toRB路径成本最低
(2)一样的话.The switch bridgeID最小
实际操作:
命令:、
display bridge mac-address //查看MAC地址display stp brief //查看stp状态
- 先找RB,优先级都是32768.那么MACThe small address is the bridgeID小的.明显的S4就是RB.
- S4是RB,因为非RBThe root port needs to go toRBminimum path cost,其默认cost都是一样.So the opposite isRP.即,S5/G2是S5的RP,S3/G1是S3的RP. S1的G2和G3到S4cost一样,then than the bridge on the switch opposite the portID,S3<S5.所以S1/G2是S1的RP.S2/G2是S2的RP.
S1:G2
S2:G2
S3:G1
S5:G2 - 找指定端口.S4:G1/G2都是DP.S1<----->S3网段是S3到S4代价低,所以是S3/G2of this network segmentDP.S1<----->S5明显S5近,所以是S5/G3.S1<----->S2成本一样,So than the bridgeID,那么S1/G1是DP.S2<----->S5,因为是S2/G2是RP,So the opposite isDP.
- 综上.S1/G3和S2/G1被堵塞.如下图标识.

命令验证:


以上就是STP的原理.The line of the blocked port,Also our backup link.The port was blocked by a logical use mechanism.但是还是可以接受BPDU报文的,or receive topology updates.If there is a problem with the link, it will automatically start to regenerateSTP拓扑.Time to update details.
The following command can changeRB,Practice will still own configurationSTP优先级的.
stp priority <优先级:4096*n,n属于自然数>
MSTP

图上STPThe blocked port is marked.用PC1 ping PC2Catch it and see that it's not at allICMP包通过.Then think if we were a lotvlanmany hosts,Do they all go through this link??这是不现实的,所以要用到MSTP.
We can create two instances,如图.这叫负载均衡,Each link can be used to,The other line is the backup link for this instance.If one goes wrong, go the other way.容错.Instance is the same physical topology,创建不同的STP树.
[S1]stp region-configuration //创建stp区域设置[S1-mst-region]region-name PROJECT1 //区域名[S1-mst-region]instance 1 vlan 10 20 //创建实例1并添加vlan10 20[S1-mst-region]instance 2 vlan 30 40 //创建实例2并添加vlan30 40[S1-mst-region]active region-configuration //激活[S1-mst-region]q[S1]stp instance 1 priority 4096 //实例1的主根[S1]stp instance 2 priority 8192 //实例2的次根[S2]stp region-configuration [S2-mst-region]region-name PROJECT1[S2-mst-region]instance 1 vlan 10 20[S2-mst-region]instance 2 vlan 30 40[S2-mst-region]active region-configuration [S2-mst-region]q[S2]stp instance 2 priority 4096 //实例2的主根[S3]stp region-configuration [S3-mst-region]region-name PROJECT1[S3-mst-region]instance 1 vlan 10 20[S3-mst-region]instance 2 vlan 30 40[S3-mst-region]active region-configuration [S3-mst-region]q[S3]stp instance 1 priority 8192 //实例1的次根
全部端口pc设为vlan10或20,用PC3 ping PC2,在S2----S3Caught between a network segment.正确.
downDrop a port of China Unicom,会转变为S3as taproot.turn on again.
全部端口pc设为vlan30或40,用PC3 ping PC1,在S21----S3Caught between a network segment.正确
display stp instance 1display stp instance 1 briefdisplay stp brief边栏推荐
- uni-app进阶之Weex/nvu
- [网络]路由BGP
- Google Play 政策更新 | 2022 年 7 月
- 商城商品的知识图谱构建
- 【高并发】我用多线程进一步优化了亿级流量电商业务下的海量数据校对系统,性能再次提升了200%!!(全程干货,建议收藏)
- Moving forward steadily without forgetting the original intention, Volvo's sense of security comes from the public's recognition
- 召回 i2i
- Nuggets quantification: Obtain data through the history method, and use the same proportional weighting factor as Sina Finance and Snowball.different from a flush
- #夏日挑战赛# HarmonyOS - 实现签名功能
- ASCII code sorting
猜你喜欢

稳步向前不忘初心,沃尔沃的安全感来自公众的认可

Greedy (1) interval complete coverage problem

干货!如何使用仪表构造SRv6-TE性能测试环境

Talking about the memory layout of the program

How should small and medium-sized financial enterprises carry out disaster recovery construction?

Texture 】 【 terrain 】 【 virtual virtual terrain texture technology is introduced

阶乘因式分解

Ernie-gram, 显式、完备的 n-gram 掩码语言模型,实现了显式的 n-gram 语义单元知识建模。

【地形】【虚拟纹理】地形虚拟纹理技术介绍

中小型金融企业该如何进行灾备建设?
随机推荐
【上传文件】
Flutter dynamic | Fair server new version features
Loadrunner与Jmeter区别与相同
pjax无法生效解决办法,butterfly主题维护你的pjax
mysql的sql分页查询语句怎么写_sql 分页查询语句(mysql分页语句)「建议收藏」
新建和编辑共用一个表单,编辑之后新建,form表单resetFields失效
设置工作模式与环境
地平线获得舜宇集团战略投资并与舜宇智领签署战略合作协议
环球晶圆成功以43.5亿欧元获得Siltronic控股权
58 security - image quality assessment technology practice
LinkedList 5-141. The circular linked list
Store Information Management System
商城商品的知识图谱构建
ASCII code sorting
虚拟远程桌面
Dry goods!How to Construct SRv6-TE Performance Test Environment Using Instrumentation
浅聊对比学习(Contrastive Learning)
【Swoole系列3.2】Swoole 异步进程服务系统
什么时候使用UserCF,什么时候使用ItemCF?
GMAT考什么?



