实验八、九 生成树配置—生成树协议 STP 和快速生成树协议 RSTP一.实验名称生成树协议 STP、快速生成树 RSTP二.实验目的理解生成树协议 STP 和快速生成树协议 RSTP三.背景描述某学校为了开展计算机教学和网络办公,建立了一个计算机教室和一个校办公区,这两处的计算机网络通过两台交换机互联组成内部校园网,为了提高网络的可靠性,网络管理员用 2 条链路将交换机互联,现要在交换机上做适当配置,使网络避开环路。本实验以 2 台 S3550-24 交换机为例,2 台交换机分别命名为 SwitchA 和SwitchB。PC1 和 PC2 在同一个网段,假设 IP 地址分别为192.168.0.137,192.168.0.136,网络掩码为 255.255.255.0。四.实验功能使网络在有冗余链路的情况下避开环路的产生,避开广播风暴等。五.实验步骤1.生成树协议 STP步骤 1.在每台交换机说那个开启生成树协议。SwitchA>enable 14Password:SwitchA#configure terminalEnter configuration commands, one per line. End with CNTL/Z.SwitchA(config)#spanning-tree2025-10-16 19:10:41 @5-CONFIG:Configured from outbandSwitchA(config)#end2025-10-16 19:10:43 @5-CONFIG:Configured from outband验证测试:验证生成树协议已经开启SwitchA#show spanning-treeStpVersion : MSTPSysStpStatus : EnabledBaseNumPorts : 24MaxAge : 20HelloTime : 2ForwardDelay : 15BridgeMaxAge : 20BridgeHelloTime : 2BridgeForwardDelay : 15MaxHops : 20TxHoldCount : 3PathCostMethod : LongBPDUGuard : DisabledBPDUFilter : Disabled###### MST 0 vlans mapped : AllBridgeAddr : 00d0.f8ff.837cPriority : 32768TimeSinceTopologyChange : 0d:0h:6m:47sTopologyChanges : 0DesignatedRoot : D0F8FF837CRootCost : 0RootPort : 0CistRegionRoot : D0F8FF837CCistPathCost : 0SwitchA#show spanning-tree interface fastethernet 0/1PortAdminPortfast : DisabledPortOperPortfast : DisabledPortAdminLinkType : autoPortOperLinkType : point-to-pointPortBPDUGuard: DisabledPortBPDUFilter: Disabled###### MST 0 vlans mapped : AllPortState : discardingPortPriority : 128PortDesignatedRoot : D0F8FF837CPortDesignatedCost : 0PortDesignatedBridge : D0F8FF837CPortDes...