stp的基础配置

简介: stp的基础配置

stp的基础配置


原理


1)BPDU bridge protocol data unit 桥协议数据单元


运行了生成树协议的交换机彼此之间用来交流生成树信息的数据包

类型:

配置BPDU   :详细介绍生成树的基本信息
拓扑变更BPDU:把生成树的变化信息告诉别的交换机

内容:

根网桥的网桥ID、自己的网桥ID、到根网桥的成本、端口ID

2)stp端口状态


生成树选举需要一定的时间和过程:stp收敛

收敛:设备从不稳定到稳定的过程

禁用    disabled    强制关闭
阻塞    blocking    不能转发数据帧,可以接收BPDU;
侦听    listening 不能转发数据帧,可以发送和接收BPDU;
学习    leraning    构建 MAC地址表
转发    forwarding  转发数据帧

3)STP计时器


hello时间:2s,交换机发送BPDU的频率和周期

max-age(最大老化时间):20s, 表示的是交换机的接口如果在指定时间没有接收到


  BPDU的更新,那就把原来BPDU信息删除;

forward-relay(转发延迟):15s

侦听---->学习      15s
学习---->转发    15s

拓扑图

配置命令

sw1

<Huawei>sys
[Huawei]sys 
[Huawei]sysname sw1
[sw1]dis stp  
-------[CIST Global Info][Mode MSTP]-------
CIST Bridge         :32768.4c1f-ccf6-5fa1
Config Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC      :32768.4c1f-cc14-43f4 / 200000
CIST RegRoot/IRPC   :32768.4c1f-ccf6-5fa1 / 0
CIST RootPortId     :128.1
BPDU-Protection     :Disabled
TC or TCN received  :5
TC count per hello  :0
STP Converge Mode   :Normal 
Time since last TC  :0 days 0h:31m:2s
Number of TC        :3
[sw1]stp mode stp
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw1]dis stp 
-------[CIST Global Info][Mode STP]-------
CIST Bridge         :32768.4c1f-ccf6-5fa1
Config Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC      :32768.4c1f-cc14-43f4 / 200000
CIST RegRoot/IRPC   :32768.4c1f-ccf6-5fa1 / 0
CIST RootPortId     :128.1
BPDU-Protection     :Disabled
TC or TCN received  :5
TC count per hello  :0
STP Converge Mode   :Normal 
Time since last TC  :0 days 0h:31m:34s
Number of TC        :3
Last TC occurred    :Ethernet0/0/1
[sw1]display stp brief 
 MSTID  Port                        Role  STP State     Protection
   0    Ethernet0/0/1               ROOT  FORWARDING      NONE
   0    Ethernet0/0/2               ALTE  DISCARDING      NONE
[sw1]quit 
<sw1>display bridge mac-address 
System bridge MAC address: 4c1f-ccf6-5fa1
<sw1>

sw2

<Huawei>u t m 
<Huawei>sys 
[Huawei]sys
[Huawei]sysname sw2 
[sw2]dis stp
-------[CIST Global Info][Mode MSTP]-------
CIST Bridge         :32768.4c1f-cc14-43f4
Config Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC      :32768.4c1f-cc14-43f4 / 0
CIST RegRoot/IRPC   :32768.4c1f-cc14-43f4 / 0
CIST RootPortId     :0.0
BPDU-Protection     :Disabled
TC or TCN received  :5
TC count per hello  :0
STP Converge Mode   :Normal 
Time since last TC  :0 days 0h:31m:4s
Number of TC        :5
Last TC occurred    :Ethernet0/0/3
----[Port1(Ethernet0/0/1)][FORWARDING]----
 Port Protocol       :Enabled
 [sw2]stp mode stp
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw2]dis stp 
-------[CIST Global Info][Mode STP]-------
CIST Bridge         :32768.4c1f-cc14-43f4
Config Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC      :32768.4c1f-cc14-43f4 / 0
CIST RegRoot/IRPC   :32768.4c1f-cc14-43f4 / 0
CIST RootPortId     :0.0
BPDU-Protection     :Disabled
TC or TCN received  :5
TC count per hello  :0
STP Converge Mode   :Normal 
[sw2]display  stp brief 
 MSTID  Port                        Role  STP State     Protection
   0    Ethernet0/0/1               DESI  FORWARDING      NONE
   0    Ethernet0/0/3               DESI  FORWARDING      NONE
[sw2]display bridge mac-address 
System bridge MAC address: 4c1f-cc14-43f4
[sw2]

sw3

<Huawei>sys
[Huawei]sysname sw3
[sw3]dis stp
-------[CIST Global Info][Mode MSTP]-------
CIST Bridge         :32768.4c1f-cc96-3d85
Config Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC      :32768.4c1f-cc14-43f4 / 200000
CIST RegRoot/IRPC   :32768.4c1f-cc96-3d85 / 0
CIST RootPortId     :128.3
BPDU-Protection     :Disabled
TC or TCN received  :2
TC count per hello  :0
STP Converge Mode   :Normal 
Time since last TC  :0 days 0h:31m:4s
Number of TC        :4
Last TC occurred    :Ethernet0/0/2
[sw3]stp mode stp
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw3]dis stp 
-------[CIST Global Info][Mode STP]-------
CIST Bridge         :32768.4c1f-cc96-3d85
Config Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC      :32768.4c1f-cc14-43f4 / 200000
CIST RegRoot/IRPC   :32768.4c1f-cc96-3d85 / 0
CIST RootPortId     :128.3
BPDU-Protection     :Disabled
TC or TCN received  :3
TC count per hello  :0
STP Converge Mode   :Normal 
<sw3>display stp brief 
 MSTID  Port                        Role  STP State     Protection
   0    Ethernet0/0/2               DESI  FORWARDING      NONE
   0    Ethernet0/0/3               ROOT  FORWARDING      NONE
<sw3>display
<sw3>display br
<sw3>display bridge mac
<sw3>display bridge mac-address 
System bridge MAC address: 4c1f-cc96-3d85
<sw3>
目录
相关文章
|
网络虚拟化 网络架构
华三vlan配置和 trunk实验配置
华三vlan配置和 trunk实验配置
1022 0
华三vlan配置和 trunk实验配置
|
6月前
|
网络虚拟化
MSTP原理与配置
MSTP原理与配置
|
7月前
|
安全 数据中心 C++
|
7月前
配置STP功能实验
在一个复杂的网络中,网络规划者由于冗余备份的需要,一般都倾向于在设备之间部署多条物理链路,其中一条作主用链路,其他链路作备份。这样就难免会形成环形网络,若网络中存在环路,可能会引起广播风暴和MAC表项被破坏。 网络规划者规划好网络后,可以在网络中部署STP协议预防环路。当网络中存在环路,STP通过阻塞某个端口以达到破除环路的目的。如图1所示,当前网络中存在环路,SwitchA、SwitchB、SwitchC和SwitchD都运行STP,通过彼此交互信息发现网络中的环路,并有选择的对某个端口进行阻塞,最终将环形网络结构修剪成无环路的树形网络结构,从而防止报文在环形网络中不断循环,避免设备由于重复
配置STP功能实验
|
网络虚拟化
VLAN 基础实验1: VLAN 基础配置
VLAN 基础实验1: VLAN 基础配置
65 0
VLAN 基础实验1: VLAN 基础配置
|
网络虚拟化