MSTP的配置

合集下载

总结mstp的功能及其配置步骤

总结mstp的功能及其配置步骤

MSTP(多生成树协议)的主要功能是将一个交换网络划分成多个域,每个域内形成多棵生成树,生成树之间彼此独立,实现不同VLAN流量的分离,达到网络负载均衡的目的。

它解决了STP(生成树协议)的各种问题,如初始化慢、直连故障需要等待30秒、非直连需要等待50秒、拓扑变化处理机制复杂等。

MSTP的配置步骤如下:
1. 给交换设备配置MSTP的工作模式、配置域并激活。

2. 启动MSTP,MSTP开始进行生成树计算,将网络修剪成树状,破除环路。

3. 若网络规划者需要人为干预生成树计算的结果,可以采取以下方式:
* 手动配置指定根桥和备份根桥设备。

* 配置交换设备在指定生成树实例中的优先级数值:数值越小,交换设备在该生成树实例中的优先级越高,成为根桥的可能性越大;数值越大,交换设备在该生成树实例中的优先级越低,成为根桥的可能性越小。

* 配置端口在指定生成树实例中的路径开销数值:在同一种计算方法下,数值越小,端口在该生成树实例中到根桥的路径开销越小,
成为根端口的可能性就越大;数值越大,端口在该生成树实例中到根桥的路径开销越大,成为根端口的可能性越小。

* 配置端口在指定生成树实例中的优先级数值:数值越小,端口在该生成树实例中成为指定端口的可能性就越大;数值越大,端口在该生成树实例中成为指定端口的可能性越小。

以上信息仅供参考,建议咨询专业人士获取更准确的信息。

MSTP配置

MSTP配置

Cisco MSTP配置(多生成树)一、什么是MSTP当前和STP相关的协议有:IEEE 802.1D(STP),802.1W(RSTP),802.1(MSTP)。

其中802.1D是最早关于STP的标准。

RSTP(Rapid Spanning Tree Protocol)是STP 的扩展,其主要特点是增加了端口状态快速切换的机制,能够实现网络拓扑的快速转换。

MSTP(Multiple Spanning Tree Protocol)提出了多生成树的概念,可以把不同的vlan 映射到不同的生成树,从而达到网络负载均衡的目的。

Configuring IEEE 802.1s MSTRelease 12.1(13)E and later releases support MST. These sections describe how to configure MST:Enabling MST (1)Displaying MST Configurations (4)Configuring MST Instance Parameters(参数) (8)Configuring MST Instance Port Parameters (10)Restarting Protocol Migration (11)Enabling MSTTo enable and configure MST on the switch, perform these tasks in privileged mode:These examples show how to enable MST:Router# show spanning-tree mst configuration% Switch is not in mst modeName []Revision 0Instance Vlans mapped----------------------------------------------------------------------------- 0 1-4094-------------------------------------------------------------------------------Router# configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)# spanning-tree mode mstRouter(config)# spanning-tree mst configurationRouter(config-mst)# show currentCurrent MST configurationName []Revision 0Instance Vlans mapped----------------------------------------------------------------------------- 0 1-4094-------------------------------------------------------------------------------Router(config-mst)# name ciscoRouter(config-mst)# revision 2Router(config-mst)# instance 1 vlan 1Router(config-mst)# instance 2 vlan 1-1000Router(config-mst)# show pendingPending MST configurationName [cisco]Revision 2Instance Vlans mapped----------------------------------------------------------------------------- 0 1001-40942 1-1000-------------------------------------------------------------------------------Router(config-mst)# no instance 2Router(config-mst)# show pendingPending MST configurationName [cisco]Revision 2Instance Vlans mapped----------------------------------------------------------------------------- 0 1-4094-------------------------------------------------------------------------------Router(config-mst)# instance 1 vlan 2000-3000Router(config-mst)# no instance 1 vlan 2500Router(config-mst)# show pendingPending MST configurationName [cisco]Revision 2Instance Vlans mapped-----------------------------------------------------------------------------0 1-1999,2500,3001-40941 2000-2499,2501-3000-------------------------------------------------------------------------------Router(config)# exitRouter(config)# no spanning-tree mst configurationRouter(config)# do show spanning-tree mst configurationName []Revision 0Instance Vlans mapped----------------------------------------------------------------------------- 0 1-4094-------------------------------------------------------------------------------Displaying MST ConfigurationsTo display MST configurations, perform these tasks in MST mode:These examples show how to display spanning tree VLAN configurations in MST mode:Router(config)# spanning-tree mst configurationRouter(config-mst)# instance 1 vlan 1-10Router(config-mst)# name ciscoRouter(config-mst)# revision 1Router(config-mst)# ^ZRouter# show spanning-tree mst configurationName [cisco]Revision 1Instance Vlans mapped-----------------------------------------------------------------------------0 11-40941 1-10-------------------------------------------------------------------------------Router# show spanning-tree mst###### MST00 vlans mapped: 11-4094Bridge address 00d0.00b8.1400 priority 32768 (32768 sysid 0) Root address 00d0.004a.3c1c priority 32768 (32768 sysid 0) port Fa4/48 path cost 203100IST master this switchOperational hello time 2, forward delay 15, max age 20, max hops 20 Configured hello time 2, forward delay 15, max age 20, max hops 20Interface Role Sts Cost Prio.Nbr Status---------------- ---- --- --------- ----------------------------------------Fa4/4 Back BLK 1000 160.196 P2pFa4/5 Desg FWD 200000 128.197 P2pFa4/48 Root FWD 200000 128.240 P2p Bound(STP)###### MST01 vlans mapped: 1-10Bridge address 00d0.00b8.1400 priority 32769 (32768 sysid 1) Root this switch for MST01Interface Role Sts Cost Prio.Nbr Status---------------- ---- --- --------- ----------------------------------------Fa4/4 Back BLK 1000 160.196 P2pFa4/5 Desg FWD 200000 128.197 P2pFa4/48 Boun FWD 200000 128.240 P2p Bound(STP)Router# show spanning-tree mst 1###### MST01 vlans mapped: 1-10Bridge address 00d0.00b8.1400 priority 32769 (32768 sysid 1) Root this switch for MST01Interface Role Sts Cost Prio.Nbr Status---------------- ---- --- --------- ----------------------------------------Fa4/4 Back BLK 1000 160.196 P2pFa4/5 Desg FWD 200000 128.197 P2pFa4/48 Boun FWD 200000 128.240 P2p Bound(STP)Router# show spanning-tree mst interface fastEthernet 4/4FastEthernet4/4 of MST00 is backup blockingEdge port:no (default) port guard :none (default)Link type:point-to-point (auto) bpdu filter:disable (default)Boundary :internal bpdu guard :disable (default)Bpdus sent 2, received 368Instance Role Sts Cost Prio.Nbr Vlans mapped-------- ---- --- --------- -------- -------------------------------0 Back BLK 1000 160.196 11-40941 Back BLK 1000 160.196 1-10Router# show spanning-tree mst 1 interface fastEthernet 4/4FastEthernet4/4 of MST01 is backup blockingEdge port:no (default) port guard :none (default)Link type:point-to-point (auto) bpdu filter:disable (default)Boundary :internal bpdu guard :disable (default)Bpdus (MRecords) sent 2, received 364Instance Role Sts Cost Prio.Nbr Vlans mapped-------- ---- --- --------- -------- ------------------------------- 1 Back BLK 1000 160.196 1-10Router# show spanning-tree mst 1 detail###### MST01 vlans mapped: 1-10Bridge address 00d0.00b8.1400 priority 32769 (32768 sysid 1) Root this switch for MST01FastEthernet4/4 of MST01 is backup blockingPort info port id 160.196 priority 160 cost 1000Designated root address 00d0.00b8.1400 priority 32769 cost 0Designated bridge address 00d0.00b8.1400 priority 32769 port id128.197Timers:message expires in 5 sec, forward delay 0, forward transitions 0Bpdus (MRecords) sent 123, received 1188FastEthernet4/5 of MST01 is designated forwardingPort info port id 128.197 priority 128 cost 200000Designated root address 00d0.00b8.1400 priority 32769 cost 0Designated bridge address 00d0.00b8.1400 priority 32769 port id128.197Timers:message expires in 0 sec, forward delay 0, forward transitions 1Bpdus (MRecords) sent 1188, received 123FastEthernet4/48 of MST01 is boundary forwardingPort info port id 128.240 priority 128 cost 200000Designated root address 00d0.00b8.1400 priority 32769 cost 0Designated bridge address 00d0.00b8.1400 priority 32769 port id128.240Timers:message expires in 0 sec, forward delay 0, forward transitions 1Bpdus (MRecords) sent 78, received 0Router# show spanning-tree vlan 10MST01Spanning tree enabled protocol mstpRoot ID Priority 32769Address 00d0.00b8.1400This bridge is the rootHello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32769 (priority 32768 sys-id-ext 1)Address 00d0.00b8.1400Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Interface Role Sts Cost Prio.Nbr Status---------------- ---- --- --------- ----------------------------------------Fa4/4 Back BLK 1000 160.196 P2pFa4/5 Desg FWD 200000 128.197 P2pRouter# show spanning-tree summaryRoot bridge for:MST01EtherChannel misconfiguration guard is enabledExtended system ID is enabledPortfast is disabled by defaultPortFast BPDU Guard is disabled by defaultPortfast BPDU Filter is disabled by defaultLoopguard is disabled by defaultUplinkFast is disabledBackboneFast is disabledPathcost method used is longName Blocking Listening Learning Forwarding STPActive---------------------- -------- --------- -------- --------------------MST00 1 0 0 2 3 MST01 1 0 0 2 3 ---------------------- -------- --------- -------- --------------------2 msts 2 0 0 4 6 Router#Configuring MST Instance Parameters(参数)To configure MST instance parameters, perform these tasks:This example shows how to configure MST instance parameters:Router(config)# spanning-tree mst 1 priority ?<0-61440> bridge priority in increments of 4096Router(config)# spanning-tree mst 1 priority 1% Bridge Priority must be in increments of 4096.% Allowed values are:0 4096 8192 12288 16384 20480 24576 2867232768 36864 40960 45056 49152 53248 57344 61440Router(config)# spanning-tree mst 1 priority 49152Router(config)#Router(config)# spanning-tree mst 0 root primarymst 0 bridge priority set to 24576mst bridge max aging time unchanged at 20mst bridge hello time unchanged at 2mst bridge forward delay unchanged at 15Router(config)# ^ZRouter#Router# show spanning-tree mst###### MST00 vlans mapped: 11-4094Bridge address 00d0.00b8.1400 priority 24576 (24576 sysid 0) Root this switch for CST and ISTConfigured hello time 2, forward delay 15, max age 20, max hops 20Interface Role Sts Cost Prio.Nbr Status---------------- ---- --- --------- ----------------------------------------Fa4/4 Back BLK 1000 160.196 P2pFa4/5 Desg FWD 200000 128.197 P2pFa4/48 Desg FWD 200000 128.240 P2p Bound(STP)###### MST01 vlans mapped: 1-10Bridge address 00d0.00b8.1400 priority 49153 (49152 sysid 1) Root this switch for MST01Interface Role Sts Cost Prio.Nbr Status---------------- ---- --- --------- ----------------------------------------Fa4/4 Back BLK 1000 160.196 P2pFa4/5 Desg FWD 200000 128.197 P2pFa4/48 Boun FWD 200000 128.240 P2p Bound(STP)Router#Configuring MST Instance Port ParametersTo configure MST instance port parameters, perform these tasks:This example shows how to configure MST instance port parameters:Router(config)# interface fastEthernet 4/4Router(config-if)# spanning-tree mst 1 ?cost Change the interface spanning tree path cost for an instanceport-priority Change the spanning tree port priority for an instanceRouter(config-if)# spanning-tree mst 1 cost 1234567Router(config-if)# spanning-tree mst 1 port-priority 240Router(config-if)# ^ZRouter# show spanning-tree mst 1 interface fastEthernet 4/4FastEthernet4/4 of MST01 is backup blockingEdge port:no (default) port guard :none (default)Link type:point-to-point (auto) bpdu filter:disable (default)Boundary :internal bpdu guard :disable (default)Bpdus (MRecords) sent 125, received 1782Instance Role Sts Cost Prio.Nbr Vlans mapped-------- ---- --- --------- -------- ------------------------------- 1 Back BLK 1234567 240.196 1-10Router#Restarting Protocol MigrationA switch running both MSTP and RSTP supports a built-in protocol migration mechanism that enables the switch to interoperate with legacy 802.1D switches. If this switch receives a legacy 802.1D configuration BPDU (a BPDU with the protocol version set to 0), it sends only 802.1D BPDUs on that port. An MSTP switch can also detect that a port is at the boundary of a region when it receives a legacy BPDU, an MST BPDU (version 3) associated with a different region, or an RST BPDU (version 2).However, the switch does not automatically revert to the MSTP mode if it no longer receives 802.1D BPDUs because it cannot determine whether the legacy switch has been removed from the link unless the legacy switch is the designated switch. A switch also might continue to assign a boundary role to a port when the switch to which it is connected has joined the region.To restart the protocol migration process (force the renegotiation with neighboring switches) on the entire switch, you can use the clear spanning-tree detected-protocols privileged EXEC command. Use the clear spanning-tree detected-protocols interface interface-id privileged EXEC command to restart the protocol migration process on a specific interface.This example shows how to restart protocol migration:Router# clear spanning-tree detected-protocols interface fastEthernet 4/4Router#。

MSTP以太业务不同厂家设备互通配置参考

MSTP以太业务不同厂家设备互通配置参考

结合中央级传输骨干网业务开通模式及电路开通中出现的问题,为提高中央级传输骨干网业务开通效率,减少各地方不同设备厂家MSTP传输设备与中央级传输骨干网阿尔卡特MSTP传输设备间的互通配置问题,结合?国家电子政务网络中央级传输骨干网业务开通配置技术标准?及几次全国电路组网开通测试中获取的珍贵经历,再次明确中央级传输骨干网不同厂家间MSTP设备互通的配置要求,愿能为电路开通及设备选择提供帮助。

一、一样厂家或不同厂家间设备互通必须配置及调整的内容〔一〕开销字节1.J0、J1、J2字节J0、J1、J2字节应配置为15个连续的“0”〔ASCII值〕。

2.C2字节假设采用VC3、VC4虚级联,C2字节要设置为“0x1B〞。

3.V5字节假设采用VC12虚级联,V5字节的b5、b6、b7应配置为“101〞,K4复帧的b12-b19应设为“0000 1101〞(0D)。

或理解为V5字节的应发和应收都应为“0x0D〞。

〔二〕内部端口LCAS状态中央级传输骨干网电路要求LCAS设置在“使能〞状态,地方用户端MSTP设备需检查LCAS的状态,并设置在“使能〞〔或开启〕状态。

〔三〕外部端口工作模式以太端口工作模式需依据地方用户端网络设备的端口进展调整,一般要配置为100M全双工模式二、一样厂家或不同厂家间设备互通需核对、检查内部端口封装映射的设置内容1.映射协议选择:GFP2.扰码选择:X43+13.检验字段长途:无4.扩展头选项:无三、各厂家设备互通应注意的内容中央级传输骨干网用户中心节点一般采用阿尔卡特1660SM设备,因此各地方设备应分别满足与该设备的互通要求,结合?国家电子政务网络中央级传输骨干网业务开通配置技术标准?,汇总电路全程测试中发现的问题,分别说明如下。

(一)阿尔卡特1642与阿尔卡特1660互通需注意的内容1.阿尔卡特1642工作模式应配置为:ETS方式〔透传〕。

2.阿尔卡特1642 J2字节1642默认J2字节为alcatel, 必须调整为15个连续的“0”〔ASCII值〕。

mstp知识点汇总

mstp知识点汇总

mstp知识点汇总MSTP(Multiple Spanning Tree Protocol)是一种用于交换机网络中的冗余路径选择的协议。

它可以有效地解决网络中的环路问题,并提供快速的故障恢复能力。

本文将对MSTP的知识点进行汇总,包括MSTP的基本原理、配置方法以及优势等。

一、MSTP的基本原理MSTP是基于IEEE 802.1Q标准的一种冗余路径选择协议,它通过构建多个生成树来实现环路的消除。

MSTP使用了一种称为RSTP (Rapid Spanning Tree Protocol)的快速生成树协议来计算生成树,同时允许多个生成树的存在,这些生成树可以根据网络的拓扑结构进行划分。

二、MSTP的配置方法1. 配置根桥:在MSTP网络中,根桥是生成树的根节点,负责计算生成树的路径。

可以通过配置根桥的优先级来确定根桥。

优先级越低的交换机将成为根桥。

2. 配置生成树实例:MSTP支持同时存在多个生成树实例,每个实例可以独立配置。

可以通过命令行或者图形界面来配置生成树实例,并指定对应的VLAN。

3. 配置端口角色:MSTP中的端口可以分为根端口、指定端口和替代端口三种角色。

根端口是直接连接到根桥的端口,指定端口是连接到其他交换机的端口,替代端口是备用的路径。

可以通过配置端口的优先级来确定端口的角色。

三、MSTP的优势1. 冗余路径选择:MSTP可以构建多个生成树,通过选择最佳路径来提供冗余和容错能力,确保网络的可靠性和稳定性。

2. 快速收敛:MSTP使用RSTP协议计算生成树,可以在网络发生故障时快速收敛,减少网络中断时间。

3. 灵活性:MSTP可以根据网络的拓扑结构进行生成树的划分,可以更好地适应不同规模和复杂度的网络环境。

4. 可扩展性:MSTP支持多个生成树实例,可以根据需求配置不同的实例,提供更多的灵活性和可扩展性。

5. 兼容性:MSTP基于IEEE 802.1Q标准,与其他兼容该标准的设备和协议兼容,可以与现有网络设备无缝集成。

MSTP配置

MSTP配置

目录第1章 MSTP配置...................................................................................................................1-11.1 MSTP简介..........................................................................................................................1-11.1.1 STP简介..................................................................................................................1-11.1.2 MSTP简介...............................................................................................................1-91.1.3 协议规范................................................................................................................1-151.2 配置任务简介...................................................................................................................1-151.3 配置根桥...........................................................................................................................1-161.3.1 配置MST域............................................................................................................1-161.3.2 指定当前设备为根桥或备份根桥............................................................................1-181.3.3 配置MSTP的工作模式...........................................................................................1-191.3.4 配置当前设备的优先级..........................................................................................1-201.3.5 配置MST域的最大跳数..........................................................................................1-201.3.6 配置交换网络的网络直径.......................................................................................1-211.3.7 配置MSTP的时间参数...........................................................................................1-221.3.8 配置超时时间因子..................................................................................................1-231.3.9 配置端口的最大发送速率.......................................................................................1-241.3.10 配置端口为边缘端口............................................................................................1-251.3.11 配置端口是否与点对点链路相连..........................................................................1-261.3.12 配置端口识别/发送MSTP报文的方式..................................................................1-271.3.13 开启MSTP特性....................................................................................................1-281.4 配置叶子节点...................................................................................................................1-281.4.1 配置MST域............................................................................................................1-281.4.2 配置MSTP的工作模式...........................................................................................1-291.4.3 配置超时时间因子..................................................................................................1-291.4.4 配置端口的最大发送速率.......................................................................................1-291.4.5 配置端口为边缘端口..............................................................................................1-291.4.6 配置端口的Path Cost............................................................................................1-291.4.7 配置端口的优先级..................................................................................................1-311.4.8 配置端口是否与点对点链路相连............................................................................1-321.4.9 配置端口识别/发送MSTP报文的方式....................................................................1-321.4.10 开启MSTP特性....................................................................................................1-321.5 执行mCheck操作.............................................................................................................1-331.6 配置VLAN Ignore特性......................................................................................................1-341.6.1 VLAN Ignore特性简介...........................................................................................1-341.6.2 配置VLAN Ignore特性...........................................................................................1-341.6.3 VLAN Ignore特性配置举例....................................................................................1-351.7 配置摘要侦听特性............................................................................................................1-361.7.1 配置准备................................................................................................................1-361.7.2 配置摘要侦听特性..................................................................................................1-361.7.3 摘要侦听特性配置举例..........................................................................................1-37 1.8 配置No Agreement Check特性........................................................................................1-381.8.1 配置准备................................................................................................................1-391.8.2 配置No Agreement Check特性.............................................................................1-391.8.3 No Agreement Check特性配置举例......................................................................1-40 1.9 配置设备的保护功能........................................................................................................1-401.9.1 配置准备................................................................................................................1-421.9.2 配置BPDU保护功能...............................................................................................1-421.9.3 配置根保护功能.....................................................................................................1-431.9.4 配置环路保护功能..................................................................................................1-431.9.5 配置防止TC-BPDU报文攻击的保护功能...............................................................1-44 1.10 MSTP显示和维护...........................................................................................................1-45 1.11 MSTP典型配置举例.......................................................................................................1-45第1章 MSTP配置1.1 MSTP简介1.1.1 STP简介1. STP的用途STP(Spanning Tree Protocol,生成树协议)是根据IEEE(Institute of Electrical andElectronics Engineers,电气与电子工程师协会)制定的802.1D标准建立的,用于在局域网中消除数据链路层物理环路的协议。

MSTP培训教程

MSTP培训教程

MSTP培训教程一、引言MSTP(Multiple Spanning Tree Protocol,多树协议)是一种网络协议,用于在复杂的网络环境中实现冗余链路的优化,提高网络的可靠性和稳定性。

本教程旨在帮助读者了解MSTP的基本原理、配置方法和应用场景,从而在实际工作中更好地运用MSTP技术。

二、MSTP基本原理1. 树协议概述树协议(Spanning Tree Protocol,STP)是一种链路层协议,用于在存在环路的网络环境中,自动选择一条最优路径,确保数据包能够正确地从一个节点传输到另一个节点,同时避免数据包在网络中无限循环。

2. MSTP概述MSTP是树协议的一种扩展,它允许多个树在同一个网络中运行,从而实现不同VLAN之间的数据隔离。

MSTP通过将网络划分为多个区域(Region),并为每个区域配置一个独立的树实例,使得网络中的冗余链路得到充分利用,提高了网络的可靠性和稳定性。

3. MSTP关键概念(1)Region:一个Region是一组交换机及其连接的网段,它们共同构成一个广播域。

在MSTP中,每个Region都有一个唯一的Region标识符(Region ID)。

(2)实例(Instance):在MSTP中,每个树实例都对应一个唯一的实例标识符(Instance ID)。

每个实例负责一组VLAN的转发,这些VLAN被称为实例VLAN(Instance VLAN)。

(3)根桥(Root Bridge):在MSTP中,每个树实例都有一个根桥,它是该实例中所有交换机的逻辑中心。

根桥负责维护树的状态信息,并根据这些信息计算最优路径。

三、MSTP配置方法1. 配置MSTP(1)开启MSTP:在交换机上执行“stp enable”命令,开启MSTP功能。

(2)配置Region:执行“stp region-configuration”命令,进入Region配置模式,设置Region名称、版本和实例VLAN映射表。

MSTP配置(迈普路由器)

MSTP 配置手册本手册著作权属迈普通信技术有限公司所有,未经著作权人书面许可,任何单位或个人不得以任何方式摘录、复制或翻译。

侵权必究。

策划:研究院资料服务处* * *迈普(四川)通信技术有限公司地址:成都市高新区九兴大道16号迈普大厦技术支持热线:400 886 8669传真:(+8628)85148948E-mail:support@网址:邮编:610041* * *版本:2008年6月第1版编号:MP/DC-RD-CPSJ-114前言读者对象z网络工程师z技术推广人员z网络管理人员适用范围本手册适用于迈普路由器6.1.X的版本及对应的设备。

本书约定命令行关键字用加粗表示;命令行参数用斜体表示。

大括号“{ }”表示括号中的选项是必选的;中括号“[ ]”表示括号中的选项是可选的;尖括号“<>”表示括号中的信息不被显示出来;方括号“【】”表示括号中的内容需要用户注意;竖线“|”用于分隔若干选项,表示二选一或多选一;正斜线“/”用于分隔若干选项,表示被分隔的各选项是可以被同时选中的;“ 注意”表示需要读者注意的事项,是配置系统的关键之处,希望用户能认真阅读。

“ 注”表示对前面内容的注解;“ 图解”表示对图例的文字解释。

声明由于产品版本升级或其它原因,本手册内容会不定期进行更新。

除非另有约定,本手册仅作为使用指导,本手册中的所有陈述、信息和建议不构成任何明示或暗示的担保。

目录第1章MSTP配置 (1)第2章MSTP协议简介 (2)第3章MSTP基本配置指令 (4)第4章MSTP协议互操作性 (15)第5章MSTP保护功能特性 (17)第6章应用实例 (20)第7章显示与维护 (23)7.1 显示命令实例 (24)7.2 调试命令 (25)7.3 调试命令实例 (25)第1章 MSTP配置本章主要介绍交换机的MSTP配置。

本章主要内容:z MSTP协议简介z MSTP基本配置指令z MSTP协议互操作性z MSTP保护功能特性z MSTP典型应用实例z MSTP显示与维护第2章 MSTP协议简介Spanning Tree Protocol(STP,生成树协议)是IEEE组织制订的用于在网络中消除数据链路层物理环路的协议;狭义的STP是指IEEE802.1D标准中定义的STP协议,广义的STP是指包括IEEE802.1D定义的STP协议以及各种在其基础上经过改进的生成树协议。

MSTP配置指导

一、组网图以及端口规划交换机C交换机D端口规划表格所有业务vlan都部署在交换机AB,A/B两台交换机启用VRRP,虚拟地址为各个VLAN的网管,网络启用MSTP,A做为根交换机,B做为备用根交换机。

C、D两台交换机与A、B交换机互联阻塞链路为C-B、D-B交换机链路。

二、交换机配置1、交换机A配置1)vlan以及IP相关配置#vlan batch 10 20 30#interface vlanif 10ip address 192.168.1.2 255.255.255.0vrrp vrid 10 virtual-ip 192.168.1.1vrrp vrid 10 priority 120#interface vlanif 20ip address 192.168.2.2 255.255.255.0vrrp vrid 20 virtual-ip 192.168.2.1vrrp vrid 20 priority 120#interface vlanif 30ip address 192.168.3.2 255.255.255.0vrrp vrid 30 virtual-ip 192.168.3.1vrrp vrid 30 priority 120#2)端口相关配置#interface GigabitEthernet0/0/1description TO—B-G0/0/1port link-type trunkport trunk allow-pass vlan 10 20 30#interface GigabitEthernet0/0/2description TO—C-G0/0/1port link-type trunkport trunk allow-pass vlan 10 20 30#interface GigabitEthernet0/0/3description TO—D-G0/0/1port link-type trunkport trunk allow-pass vlan 10 20 30#3)MSTP相关配置stp enable ////使能STPstp mode mstp ////默认就应该是MSTP模式stp instance 0 root primary ////指定交换机为instance 0 的根stp bpdu-protection ////开启设备的BPDU保护stp tc-protection ////使能MSTP进程对TC类型BPDU报文的保护功能stp tc-protection threshold 1 ////配置MSTP进程在收到TC类型BPDU报文后,单位时间内,处理TC类型BPDU报文并立即刷新转发表项的阈值stp region-configuration ////进入MST域视图region-name 123 ////配置MST域的域名instance 0 vlan 10 20 30 ////将vlan10、20、30加入instance 0active region-configuration ////激活MST域的配置,注意每次修改MST域配置后都要执行此命令激活4)2、交换机B配置1)vlan以及IP相关配置#vlan batch 10 20 30#interface vlanif 10ip address 192.168.1.3 255.255.255.0vrrp vrid 10 virtual-ip 192.168.1.1#interface vlanif 20ip address 192.168.2.3 255.255.255.0vrrp vrid 20 virtual-ip 192.168.2.1#interface vlanif 30ip address 192.168.3.3 255.255.255.0vrrp vrid 30 virtual-ip 192.168.3.1#2)端口相关配置#interface GigabitEthernet0/0/1description TO—A-G0/0/1port link-type trunkport trunk allow-pass vlan 10 20 30#interface GigabitEthernet0/0/2description TO—C-G0/0/2port link-type trunkport trunk allow-pass vlan 10 20 30#interface GigabitEthernet0/0/3description TO—D-G0/0/2port link-type trunkport trunk allow-pass vlan 10 20 30#3)MSTP相关配置stp enablestp mode mstpstp instance 0 root secondary ///指定交换机B为备用根stp bpdu-protectionstp tc-protectionstp tc-protection threshold 1stp region-configuration ////此部分配置所有MSTP域内交换机配置必须相同region-name 123instance 0 vlan 10 20 30active region-configuration3、交换机C配置1)vlan以及IP相关配置#vlan batch 10 20 30#interface vlanif 10ip address 192.168.1.4 255.255.255.0#2)端口相关配置#interface GigabitEthernet0/0/1description TO—A-G0/0/2port link-type trunkport trunk allow-pass vlan 10 20 30#interface GigabitEthernet0/0/2description TO—B-G0/0/2port link-type trunkport trunk allow-pass vlan 10 20 30#其他下行端口需要配置为边缘端口,未使用端口尽量shutdown,一般端口为access口,并加入相应vlan即可,以下为举例配置interface GigabitEthernet0/0/Xport link-type accessport default vlan 20stp edged-port enable3)MSTP相关配置stp enablestp mode mstpstp bpdu-protectionstp region-configuration ////此部分配置所有MSTP域内交换机配置必须相同region-name 123instance 0 vlan 10 20 30active region-configuration4、交换机D配置1)vlan以及IP相关配置#vlan batch 10 20 30#interface vlanif 10ip address 192.168.1.4 255.255.255.0#2)端口相关配置#interface GigabitEthernet0/0/1description TO—A-G0/0/3port link-type trunkport trunk allow-pass vlan 10 20 30#interface GigabitEthernet0/0/2description TO—B-G0/0/3port link-type trunkport trunk allow-pass vlan 10 20 30#其他下行端口需要配置为边缘端口,未使用端口尽量shutdown,一般端口为access口,并加入相应vlan即可,以下为举例配置interface GigabitEthernet0/0/Xport link-type accessport default vlan 20stp edged-port enable3)MSTP相关配置stp enablestp mode mstpstp bpdu-protectionstp region-configuration ////此部分配置所有MSTP域内交换机配置必须相同region-name 123instance 0 vlan 10 20 30active region-configuration。

mstp协议简介

mstp协议简介MSTP(Multiple Spanning Tree Protocol)是一种用于构建冗余网络的协议,通过允许多个生成树实例的存在来提供冗余路径和容错能力。

本文将详细介绍MSTP 协议的背景、工作原理、配置和优势。

一、背景在传统的以太网网络中,使用的是单个生成树协议(STP)来避免环路,并确保数据在网络中的无回路传输。

然而,STP只能构建一棵生成树,导致网络中的冗余路径无法利用,从而限制了网络的带宽利用率和冗余容错能力。

为了解决这个问题,IEEE 802.1s标准引入了MSTP协议。

二、工作原理MSTP协议基于RSTP(Rapid Spanning Tree Protocol)扩展而来,通过将网络划分为多个实例,每个实例对应一个生成树,从而实现了对冗余路径的利用。

MSTP协议的核心是通过配置实例和VLAN之间的映射关系,使得不同的VLAN可以通过不同的生成树实例进行转发。

MSTP协议使用IST(Internal Spanning Tree)实例来处理全局的广播和未知单播流量,使用CIST(Common and Internal Spanning Tree)实例来处理共享的广播和未知单播流量,而其他实例则处理特定的VLAN。

三、配置MSTP协议的配置包括以下几个步骤:1. 配置MSTP协议的全局参数,如优先级、Hello时间、最大转发延迟等。

2. 创建MSTP实例,并将实例与VLAN进行映射。

3. 配置实例的参数,如优先级、根桥、端口优先级等。

4. 配置端口的MSTP模式,包括指定端口为边缘端口、指定端口为根端口等。

四、优势MSTP协议相较于传统的STP协议具有以下优势:1. 冗余路径利用:MSTP协议允许多个生成树实例的存在,可以利用冗余路径提高网络的带宽利用率和容错能力。

2. 灵活性:MSTP协议可以根据网络的需求配置多个实例,每个实例可以独立处理特定的VLAN,提供更灵活的网络拓扑。

MSTP的负载均衡配置

MSTP的负载均衡配置MSTP配置:负载均衡实验要求:1、SW2作为vlan 10 20的根网桥SW3作为vlan 30 40的根网桥2、各vlan都可以与192.168.60.1互通3、Vlan 10 20的流量走交换机SW 2Vlan 30 40的流量走交换机SW 34、抓包验证结果操作步骤:一、配置PC机的IP地址、子网掩码、网关1、配置PC 1的IP地址为192.168.10.1,子网掩码为255.255.255.0,网关为192.168.10.2542、配置PC 2的IP地址为192.168.20.1,子网掩码为255.255.255.0,网关为192.168.20.2543、配置PC 3的IP地址为192.168.30.1,子网掩码为255.255.255.0,网关为192.168.30.2544、配置PC 4的IP地址为192.168.40.1,子网掩码为255.255.255.0,网关为192.168.40.2545、配置PC 5的IP地址为192.168.60.1,子网掩码为255.255.255.0,网关为192.168.60.254二、配置交换机LSW2、LSW31、配置交换机LSW22、配置交换机LSW3三、配置三层交换机LSW1四、配置路由器AR1五、抓包分析结果1、分别在接口g0/0/1和接口g0/0/2进行抓包2、用PC 1pingPC 5,查看接口g0/0/1和接口g0/0/2的抓包3、用PC 2pingPC 5,查看接口g0/0/1和接口g0/0/2的抓包4、用PC 3pingPC 5,查看接口g0/0/1和接口g0/0/2的抓包5、用PC 4pingPC 5,查看接口g0/0/1和接口g0/0/2的抓包如出现有PC 1、PC2 无法ping 通 PC 5和自身的网关,而且PC 1pingPC 2也不通第一步先查看配置是否出错如配置没有出错,则是如图所示的情况:。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

课程名称华为HCIA实验课程实验
成绩
实验名称MSTP配置
学号姓名班级日期10.30
实验目的:
1.通过MSTP的配置了解多实例MSTP的特点:可以通过vlan和instance之间的
绑定,让接入交换机的两条上行链路在正常的情况下同时承载业务,实现负载分担。


2.当主用上行链路故障时,stp会进行收敛,把备用链路从阻塞端口变为root
端口来转发数据,从而恢复业务。

3.当规划的主用链路恢复后,会根据cost值重新选路,恢复规划的主用链路进
行业务数据转发。

实验平台:
ENSP
一、实验任务
能够完善的配置各个交换机上MSTP,让MSTP收敛后,SWC上的一个上行端口在相应的MSTI上是阻塞的,达到拆环。

当端口状态发生变化后,stp进行收敛,查看链路是否切换。

二、网络规划
MSTI1:instance 1对应的是vlan 10
MSTI2:instance 2对应的是vlan 20
SWA是instance 1的根桥,instance 2的备份根桥
SWB是instance 2的根桥,instance 1的备份根桥
所有接PC和路由器的端口设置为边缘端口
增加备用链路的cost值为20000
三、网络结构图如下所示
8,将主用链路shutdown后,查看SWC的stp收敛情况
可以看到实例1和实例2都从Ethernet0/0/4转发数据,完成了stp收敛以及达到了SWC上行链路被保护的目的。

同时将链路恢复,在Eethernet0/0/3下面输入undo shutdown即可。

然后把instance 2的主用链路shutdow,查看一下stp的收敛情况。

9,当退出ensp时,点击保存。

相关文档
最新文档