华为生成树协议配置

生成协议的配置
【实训背景】
汽油清净剂学校为了开展计算机教学和网络办公,建立了一个计算机教室和一个校办公区,这两处的计算机网络通过两台交换机互连组成内部校园网;为了提高网络的可靠性,作为网络管理员的你要用2条链路将交换机互连,现要求在交换机上做适当配置,使网络避免环路。
【实训目的】
掌握生成树协议的配置方法,理解生成树协议的作用和特点
【技术原理】
生成树协议( spanning-tree) ,作用是在交换网络中提供冗余备份链路,并且解决交换网络中的环路问题。
生成树协议是利用SPA算法(生成树算法),在存在交换环路的网络中生成一个没有环路的树形网络。运用该算法将交换网络冗余的备份链路逻辑上断开,当主要链路出现故障时,能够自动的切换到备份链路,保证数据的正常转发。
生成树协议的特点是收敛时间长。当主要链路出现故障以后,到切换到备份链路需要 50秒的时间。【实训内容】
1、根据拓扑将主机和交换机进行连接(未形成环路)
2、测试主机之间可以相互ping通
3、配置生成树协议
4、测试(形成环路)
5、测试(断开主要链路)
【实现功能】
使网络在有冗余链路的情况下避免环路的产生,避免广播风暴等。
【实训设备】
s3100(2台),PC(2台)、直连线(4条)
【主要命令】
stp, stp mode , spanning-tree Priority, undo stp
【实训步骤】
1、在每台交换机上开启生成树协议.
对 SwitchA 做如下配置:
<H3C>
<H3C> system-view !进入全局配置模式
[H3C]sysname SwitchA
[SwitchA]vlan 10
[SwitchA-vlan10]quit
[SwitchA]interface fastethernet 0/24
[SwitchA- fastethernet 0/24] port acc vlan 10
[SwitchA] interface f 0/1
[SwitchA-fastethernet]port link-type trunk
[SwitchA] interface f 0/2
[SwitchA-fastethernet]port link-type trunk
[SwitchA-fastethernet]quit
[SwitchA]
对 SwitchB 做如下配置:
<H3C>
<H3C> system-view !进入全局配置模式
[H3C]sysname SwitchB
[SwitchB]vlan 10
[SwitchB –vlan10]quit
[SwitchB]interface fastethernet 0/24
[SwitchB-fastethernet] port acc vlan 10
[SwitchB]interface f 0/1
[SwitchB-fastetherne] port link-type trunk
[SwitchB]interface f 0/2
[SwitchB-fastetherne] port link-type trunk
[SwitchB-fastetherne] quit
[SwitchB]
2、设置生成树模式。
stp mode stp!设置生成树模式为 STP (802.1D)
验证测试:验证生成树协模式为 802.1D
<SwitchA>sys
[SwitchA]stp enable !开启生成树协议
[SwitchA] stp mode stp
[SwitchA]quit
<SwitchB>sys
[SwitchB]stp enable !开启生成树协议
[SwitchB] stp mode stp
[SwitchB]quit
验证测试:验证生成树协议已经开启
SwitchA#disp stp
-------[CIST Global Info][Mode STP]-------
CIST Bridge :32768.000f-e253-8317 本机桥ID
Bridge Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20 CIST Root/ERPC :32768.000f-e249-d546 / 200 根桥ID及路径开销CIST RegRoot/IRPC :32768.000f-e253-8317 / 0
CIST RootPortId :128.1 短口ID
BPDU-Protection :disabled
TC-Protection :enabled / Threshold=6
Bridge Config
Digest Snooping :disabled
TC or TCN received :122
Time since last TC :0 days 0h:0m:9s
----[Port1(Ethernet1/0/1)][FORWARDING]---- 发送状态
Port Protocol :enabled
Port Role :CIST Root Port
Port Priority :128
Port Cost(Legacy) :Config=auto / Active=200
Desg. Bridge/Port :32768.000f-e249-d546 / 128.1
Port Edged :Config=disabled / Active=disabled
Point-to-point :Config=auto / Active=true
Transmit Limit :10 packets/hello-time
Protection Type :None
MSTP BPDU format :Config=legacy
Port Config
Digest Snooping :disabled
Num of Vlans Mapped :1
PortTimes :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 0 BPDU Sent :3
TCN: 1, Config: 2, RST: 0, MST: 0
BPDU Received :39
TCN: 0, Config: 39, RST: 0, MST: 0
-
---[Port2(Ethernet1/0/2)][DISCARDING]---- 阻塞状态
Port Protocol :enabled
Port Role :CIST Alternate Port
Port Priority :128
Port Cost(Legacy) :Config=auto / Active=200
Desg. Bridge/Port :32768.000f-e249-d546 / 128.2
Port Edged :Config=disabled / Active=disabled
Point-to-point :Config=auto / Active=true
Transmit Limit :10 packets/hello-time
Protection Type :None
MSTP BPDU format :Config=legacy
Port Config
Digest Snooping :disabled
Num of Vlans Mapped :1
PortTimes :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 0 BPDU Sent :2
TCN: 0, Config: 2, RST: 0, MST: 0
BPDU Received :59
TCN: 0, Config: 59, RST: 0, MST: 0
[SwitchA] disp stp int e1/0/1 显示接口STP信息
----[CIST][Port1(Ethernet1/0/1)][FORWARDING]----
Port Protocol :enabled
Port Role :CIST Root Port
Port Priority :128 接口优先级
Port Cost(Legacy) :Config=auto / Active=200
Desg. Bridge/Port :32768.000f-e249-d546 / 128.1
Port Edged :Config=disabled / Active=disabled
Point-to-point :Config=auto / Active=true
Transmit Limit :10 packets/hello-time
Protection Type :None
MSTP BPDU format :Config=legacy
Port Config
Digest Snooping :disabled
Num of Vlans Mapped :1
PortTimes :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 0
BPDU Sent :3
TCN: 1, Config: 2, RST: 0, MST: 0
www.kaixin001BPDU Received :195
TCN: 0, Config: 195, RST: 0, MST: 0
3、设置交换机的优先级。
[SwitchA] stp priority 0 !设置交换机 SwitchA 在生成树实例0中的优先级为0, 数值最小的交换机为根交换机(也称根桥),交换机 SwitchB 的优先级采用默认优先级(32768),因此 SwitchA 将成为根交换机。
验证测试:验证交换机 SwitchA 的优先级
[SwitchA]display stp
StpVersion : STP
SysStpStatus : Enabled
BaseNumPorts : 24
MaxAge : 20
HelloTime : 2
ForwardDelay : 15
BridgeMaxAge : 20
BridgeHelloTime : 2
BridgeForwardDelay : 15
MaxHops : 20
TxHoldCount : 3
PathCostMethod : Long
BPDUGuard : Disabled
BPDUFilter : Disabled
BridgeAddr : 00d0.f88c.1da0
Priority : 0
TimeSinceTopologyChange : 0d:0h:7m:21s
TopologyChanges : 0
DesignatedRoot : 000000D0F88C1DA0
RootCost : 0
RootPort : 0
[SwitchB] dis stp拿来主义课堂实录
-------[CIST Global Info][Mode STP]-------
CIST Bridge :32768.000f-e249-d546 本机桥ID
Bridge Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :32768.000f-e249-d546 / 0 根桥ID及路径开销
CIST RegRoot/IRPC :32768.000f-e249-d546 / 0
CIST RootPortId :0.0
BPDU-Protection :disabled
TC-Protection :enabled / Threshold=6
Bridge Config
Digest Snooping :disabled
TC or TCN received :5
Time since last TC :0 days 0h:3m:11s
-
---[Port1(Ethernet1/0/1)][FORWARDING]----
Port Protocol :enabled
Port Role :CIST Designated Port
Port Priority :128
Port Cost(Legacy) :Config=auto / Active=200
Desg. Bridge/Port :32768.000f-e249-d546 / 128.1
Port Edged :Config=disabled / Active=disabled
Point-to-point :Config=auto / Active=true
Transmit Limit :10 packets/hello-time
Protection Type :None
MSTP BPDU format :Config=legacy
Port Config
Digest Snooping :disabled
Num of Vlans Mapped :1
PortTimes :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20 BPDU Sent :114
TCN: 0, Config: 114, RST: 0, MST: 0
BPDU Received :1
TCN: 1, Config: 0, RST: 0, MST: 0
----[Port2(Ethernet1/0/2)][FORWARDING]----
Port Protocol :enabled
Port Role :CIST Designated Port
两国集团
Port Priority :128
Port Cost(Legacy) :Config=auto / Active=200
Desg. Bridge/Port :32768.000f-e249-d546 / 128.2
Port Edged :Config=disabled / Active=disabled
Point-to-point :Config=auto / Active=true
Transmit Limit :10 packets/hello-time
氢溴酸Protection Type :None
MSTP BPDU format :Config=legacy
Port Config
Digest Snooping :disabled
Num of Vlans Mapped :1
PortTimes :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20 BPDU Sent :132
TCN: 0, Config: 132, RST: 0, MST: 0
BPDU Received :0
TCN: 0, Config: 0, RST: 0, MST: 0
4、综合验证测试。
A.验证交换机 SwitchB 的端口 F0/1和 F0/2的状态。[SwitchB]display stp interface ethernet 1/0/1
-[Port1(Ethernet1/0/1)][FORWARDING]----
Port Protocol :enabled
Port Role :CIST Designated Port
Port Priority :128
Port Cost(Legacy) :Config=auto / Active=200
Desg. Bridge/Port :32768.000f-e249-d546 / 128.1
Port Edged :Config=disabled / Active=disabled
Point-to-point :Config=auto / Active=true
Transmit Limit :10 packets/hello-time
Protection Type :None
MSTP BPDU format :Config=legacy
Port Config
Digest Snooping :disabled
Num of Vlans Mapped :1
PortTimes :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
BPDU Sent :114
TCN: 0, Config: 114, RST: 0, MST: 0
BPDU Received :1
三星t220g
TCN: 1, Config: 0, RST: 0, MST: 0
[SwitchB]display stp interface ethernet1/ 0/2
-[Port2(Ethernet1/0/2)][FORWARDING]----
Port Protocol :enabled
Port Role :CIST Designated Port
Port Priority :128
Port Cost(Legacy) :Config=auto / Active=200
Desg. Bridge/Port :32768.000f-e249-d546 / 128.2
Port Edged :Config=disabled / Active=disabled
Point-to-point :Config=auto / Active=true
Transmit Limit :10 packets/hello-time
Protection Type :None
MSTP BPDU format :Config=legacy
Port Config
Digest Snooping :disabled
Num of Vlans Mapped :1
PortTimes :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
BPDU Sent :132
TCN: 0, Config: 132, RST: 0, MST: 0
BPDU Received :0
TCN: 0, Config: 0, RST: 0, MST: 0
B. 验证网络拓扑发生变化时,ping 的丢包情况。
C:\>ping 192.168.10.3 –t !从主机 PC1 ping PC2(用连续 ping),然后拔掉 SwitchA与 SwitchB 的端口 F0/1 之间的连线,观察丢包情况。
C:\>ping 192.168.10.3 -t
Pinging 192.168.10.3 with 32 bytes of data:

本文发布于:2024-09-22 05:25:11,感谢您对本站的认可!

本文链接:https://www.17tex.com/xueshu/550799.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:生成   网络   交换机   链路   协议   验证
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议