【原创】H3C交换机STP协议测试

网络拓扑图

在这里插入图片描述

交换机信息

交换机1信息:

<H3C>dis stp
-------[CIST Global Info][Mode MSTP]-------
 Bridge ID           : 32768.06fd-8165-0100
 Bridge times        : Hello 2s MaxAge 20s FwdDelay 15s MaxHops 20
 Root ID/ERPC        : 0.08c0-212c-0ff0, 22002
 RegRoot ID/IRPC     : 32768.06fd-8165-0100, 0
 RootPort ID         : 128.51
 BPDU-Protection     : Disabled
 Bridge Config-
 Digest-Snooping     : Disabled
 TC or TCN received  : 10
 Time since last TC  : 0 days 0h:3m:17s

交换机2信息:

<H3C>dis stp
-------[CIST Global Info][Mode MSTP]-------
 Bridge ID           : 32768.06fd-8651-0200
 Bridge times        : Hello 2s MaxAge 20s FwdDelay 15s MaxHops 20
 Root ID/ERPC        : 0.08c0-212c-0ff0, 22022
 RegRoot ID/IRPC     : 32768.06fd-8651-0200, 0
 RootPort ID         : 128.2
 BPDU-Protection     : Disabled
 Bridge Config-
 Digest-Snooping     : Disabled
 TC or TCN received  : 11
 Time since last TC  : 0 days 0h:4m:45s

交换机3信息

<H3C>display stp
-------[CIST Global Info][Mode MSTP]-------
 Bridge ID           : 32768.06fd-8d6a-0300
 Bridge times        : Hello 2s MaxAge 20s FwdDelay 15s MaxHops 20
 Root ID/ERPC        : 0.08c0-212c-0ff0, 22022
 RegRoot ID/IRPC     : 32768.06fd-8d6a-0300, 0
 RootPort ID         : 128.4
 BPDU-Protection     : Disabled
 Bridge Config-
 Digest-Snooping     : Disabled
 TC or TCN received  : 18
 Time since last TC  : 0 days 0h:5m:28s

交换机4信息

<H3C>display stp
-------[CIST Global Info][Mode MSTP]-------
 Bridge ID           : 32768.06fd-93dc-0400
 Bridge times        : Hello 2s MaxAge 20s FwdDelay 15s MaxHops 20
 Root ID/ERPC        : 0.08c0-212c-0ff0, 22022
 RegRoot ID/IRPC     : 32768.06fd-93dc-0400, 0
 RootPort ID         : 128.2 
 BPDU-Protection     : Disabled
 Bridge Config-
 Digest-Snooping     : Disabled
 TC or TCN received  : 20
 Time since last TC  : 0 days 0h:5m:52s

根桥判断

交换机1:32768.06fd-8165-0100
交换机2:32768.06fd-8651-0200
交换机3:32768.06fd-8d6a-0300
交换机4:32768.06fd-93dc-0400
从上面比较可以看出“交换机1”的网桥ID最小,因此此交换机将作为网桥的“根”。

检测端口

交换机1

<H3C>display stp brief
 MST ID   Port                                Role  STP State   Protection
 0        GigabitEthernet1/0/1                DESI  FORWARDING  NONE
 0        GigabitEthernet1/0/2                DESI  FORWARDING  NONE
 0        GigabitEthernet1/0/3                DESI  FORWARDING  NONE
 0        Ten-GigabitEthernet1/0/50           ROOT  FORWARDING  NONE

交换机2:

<H3C>display stp brief
 MST ID   Port                                Role  STP State   Protection
 0        GigabitEthernet1/0/1                ROOT  FORWARDING  NONE
 0        GigabitEthernet1/0/2                DESI  FORWARDING  NONE
 0        GigabitEthernet1/0/3                DESI  FORWARDING  NONE

交换机3

<H3C>display stp brief
 MST ID   Port                                Role  STP State   Protection
 0        GigabitEthernet1/0/1                ALTE  DISCARDING  NONE
 0        GigabitEthernet1/0/2                DESI  FORWARDING  NONE
 0        GigabitEthernet1/0/3                ROOT  FORWARDING  NONE
 0        Ten-GigabitEthernet1/0/50           DESI  FORWARDING  NONE

交换机4

<H3C>display stp brief
 MST ID   Port                                Role  STP State   Protection
 0        GigabitEthernet1/0/1                ROOT  FORWARDING  NONE
 0        GigabitEthernet1/0/2                ALTE  DISCARDING  NONE
 0        GigabitEthernet1/0/3                ALTE  DISCARDING  NONE

标记端口

在这里插入图片描述
ALT,意味着端口是有STP协议关闭的。

最后结果

去掉ALTE标记所在线路,最终结果如下:
在这里插入图片描述

模拟断路

手动关闭交换机4上的G1/01端口

[H3C-GigabitEthernet1/0/1]shu
[H3C-GigabitEthernet1/0/1]shutdown

接下来会出现一些提示信息

%Sep  1 10:43:12:614 2023 H3C STP/6/STP_DETECTED_TC: Instance 0's port GigabitEthernet1/0/3 detected a topology change.
%Sep  1 10:43:12:616 2023 H3C IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/1 changed to down.
%Sep  1 10:43:12:616 2023 H3C IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet1/0/1 changed to down.

检查线路

交换机1

<H3C>display stp brief
 MST ID   Port                                Role  STP State   Protection
 0        GigabitEthernet1/0/1                DESI  FORWARDING  NONE
 0        GigabitEthernet1/0/2                DESI  FORWARDING  NONE
 0        GigabitEthernet1/0/3                DESI  FORWARDING  NONE
 0        Ten-GigabitEthernet1/0/50           ROOT  FORWARDING  NONE

变为:

<H3C>dis stp brief
 MST ID   Port                                Role  STP State   Protection
 0        GigabitEthernet1/0/1                DESI  FORWARDING  NONE
 0        GigabitEthernet1/0/3                DESI  FORWARDING  NONE
 0        Ten-GigabitEthernet1/0/50           ROOT  FORWARDING  NONE

GigabitEthernet1/0/2 端口没有信息,也就是“物理断开了”

交换机2:

<H3C>display stp brief
 MST ID   Port                                Role  STP State   Protection
 0        GigabitEthernet1/0/1                ROOT  FORWARDING  NONE
 0        GigabitEthernet1/0/2                DESI  FORWARDING  NONE
 0        GigabitEthernet1/0/3                DESI  FORWARDING  NONE

交换机3

<H3C>display stp brief
 MST ID   Port                                Role  STP State   Protection
 0        GigabitEthernet1/0/1                ALTE  DISCARDING  NONE
 0        GigabitEthernet1/0/2                DESI  FORWARDING  NONE
 0        GigabitEthernet1/0/3                ROOT  FORWARDING  NONE
 0        Ten-GigabitEthernet1/0/50           DESI  FORWARDING  NONE

交换机4

<H3C>display stp brief
 MST ID   Port                                Role  STP State   Protection
 0        GigabitEthernet1/0/1                ROOT  FORWARDING  NONE
 0        GigabitEthernet1/0/2                ALTE  DISCARDING  NONE
 0        GigabitEthernet1/0/3                ALTE  DISCARDING  NONE

改变为:

[H3C]dis stp brief
 MST ID   Port                                Role  STP State   Protection
 0        GigabitEthernet1/0/2                ALTE  DISCARDING  NONE
 0        GigabitEthernet1/0/3                ROOT  FORWARDING  NONE

GigabitEthernet1/0/1 线路“物理断开”了,
GigabitEthernet1/0/3 变成了ROOT

标记端口

在这里插入图片描述

最后结果

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

赵庆明老师

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值