华为配置MSTP的基本功能
- 格式:docx
- 大小:46.66 KB
- 文档页数:9
Muliti stp 多实例生成树(华为交换机默认运行mstp)。
工作原理:将多个vlan捆绑在一起,运行一个STP实例里面,不同实例间的stp互相独立。
注:默认情况下所有vlan都在实例0里面。
SW1:vlan batch 10 20int g0/0/1port link-type trunkport trunk allows-pass vlan allint g0/0/2port link-type trunkport trunk allows-pass vlan allint g0/0/3port link-type accessport dedault vlan 10SW2:vlan batch 10 20port-group group-member g0/0/1 to g0/0/2 port link-type trunkport trunk allows-pass vlan allint g/0/0/3port link-type accessport default vlan 20SW3:vlan batch 10 20port-group group-member g0/0/1 to g0/0/2 port trunk allows-pass vlan allint g0/0/3port link-type accessport default vlan 10int g0/0/4port link-type accessport default vlan 20用PC3ping PC1时sw3的g0/0/1抓包sw3的g0/0/2抓包经过抓包数据走的是SW3的g0/0/2,所以1口被阻塞。
这样就会有次优路径。
配置多实例生成树就,解决次优路径问题。
MSTP:instance 1 :vlan 10instance 2 :vlan 20SW1、SW2、SW3:stp region-configurationregion-name HCNPinstance 1 vlan 10instance 2 vlan 20active region-configuration设置实例优先级:stp instance 1 root primary设置实例1为根桥stp instance 2 root secondary设置实例2为备根。
MSTP(多生成树协议)的主要功能是将一个交换网络划分成多个域,每个域内形成多棵生成树,生成树之间彼此独立,实现不同VLAN流量的分离,达到网络负载均衡的目的。
它解决了STP(生成树协议)的各种问题,如初始化慢、直连故障需要等待30秒、非直连需要等待50秒、拓扑变化处理机制复杂等。
MSTP的配置步骤如下:
1. 给交换设备配置MSTP的工作模式、配置域并激活。
2. 启动MSTP,MSTP开始进行生成树计算,将网络修剪成树状,破除环路。
3. 若网络规划者需要人为干预生成树计算的结果,可以采取以下方式:
* 手动配置指定根桥和备份根桥设备。
* 配置交换设备在指定生成树实例中的优先级数值:数值越小,交换设备在该生成树实例中的优先级越高,成为根桥的可能性越大;数值越大,交换设备在该生成树实例中的优先级越低,成为根桥的可能性越小。
* 配置端口在指定生成树实例中的路径开销数值:在同一种计算方法下,数值越小,端口在该生成树实例中到根桥的路径开销越小,
成为根端口的可能性就越大;数值越大,端口在该生成树实例中到根桥的路径开销越大,成为根端口的可能性越小。
* 配置端口在指定生成树实例中的优先级数值:数值越小,端口在该生成树实例中成为指定端口的可能性就越大;数值越大,端口在该生成树实例中成为指定端口的可能性越小。
以上信息仅供参考,建议咨询专业人士获取更准确的信息。
目录第1章 MSTP配置命令...........................................................................................................1-11.1 MSTP配置命令..................................................................................................................1-11.1.1 active region-configuration......................................................................................1-11.1.2 bpdu-drop any.........................................................................................................1-11.1.3 check region-configuration......................................................................................1-21.1.4 display stp...............................................................................................................1-31.1.5 display stp region-configuration..............................................................................1-51.1.6 instance...................................................................................................................1-61.1.7 region-name............................................................................................................1-71.1.8 reset stp...................................................................................................................1-81.1.9 revision-level...........................................................................................................1-81.1.10 stp..........................................................................................................................1-91.1.11 stp bpdu-protection.............................................................................................1-101.1.12 stp bridge-diameter.............................................................................................1-111.1.13 stp compliance....................................................................................................1-121.1.14 stp config-digest-snooping..................................................................................1-131.1.15 stp cost................................................................................................................1-141.1.16 stp edged-port.....................................................................................................1-151.1.17 stp interface.........................................................................................................1-161.1.18 stp interface config-digest-snooping...................................................................1-171.1.19 stp interface cost.................................................................................................1-191.1.20 stp interface edged-port......................................................................................1-201.1.21 stp interface loop-protection................................................................................1-211.1.22 stp interface mcheck...........................................................................................1-211.1.23 stp interface no-agreement-check.......................................................................1-221.1.24 stp interface point-to-point...................................................................................1-231.1.25 stp interface port priority......................................................................................1-241.1.26 stp interface root-protection................................................................................1-251.1.27 stp interface transmit-limit...................................................................................1-261.1.28 stp loop-protection...............................................................................................1-271.1.29 stp max-hops.......................................................................................................1-281.1.30 stp mcheck..........................................................................................................1-291.1.31 stp mode..............................................................................................................1-291.1.32 stp no-agreement-check.....................................................................................1-301.1.33 stp pathcost-standard..........................................................................................1-311.1.34 stp point-to-point.................................................................................................1-331.1.35 stp port priority.....................................................................................................1-341.1.36 stp priority............................................................................................................1-341.1.37 stp region-configuration.......................................................................................1-351.1.38 stp root primary...................................................................................................1-361.1.39 stp root secondary...............................................................................................1-371.1.40 stp root-protection...............................................................................................1-38 1.1.41 stp tc-protection...................................................................................................1-39 1.1.42 stp timer forward-delay........................................................................................1-40 1.1.43 stp timer hello......................................................................................................1-41 1.1.44 stp timer max-age...............................................................................................1-42 1.1.45 stp timer-factor....................................................................................................1-42 1.1.46 stp transmit-limit..................................................................................................1-42 1.1.47 vlan-mapping modulo..........................................................................................1-42 1.1.48 vlan-vpn tunnel....................................................................................................1-42第1章 MSTP配置命令1.1 MSTP配置命令1.1.1 active region-configuration【命令】active region-configuration【视图】MST域视图【参数】无【描述】active region-configuration命令用来激活MST域的配置。
MSTP基础培训 - MSTP设备介绍1. 引言MSTP(Multiple Spanning Tree Protocol)是一种基于IEEE 802.1Q标准的多重生成树协议,用于在网络中实现冗余路径以提高可靠性和性能。
本文档将重点介绍MSTP设备,包括其定义、功能和优势。
2. MSTP设备的定义在MSTP网络中,MSTP设备是指支持MSTP协议的交换机或路由器。
MSTP设备可以通过生成树算法计算出多个生成树,并将不同的网络流量路由到不同的生成树上。
与传统的STP(Spanning Tree Protocol)相比,MSTP设备能够实现更好的负载均衡和快速收敛。
3. MSTP设备的功能MSTP设备具有以下主要功能:3.1 多重生成树MSTP设备可以针对不同的VLAN(Virtual Local Area Network)或实例生成多个独立的生成树。
这样可以避免单一生成树对所有网络流量进行控制,提高网络的可用性和可靠性。
3.2 独立配置MSTP设备允许管理员独立配置每个生成树的端口成员和根桥选举参数。
这种独立配置的特性使得MSTP网络更加灵活,能够更好地适应不同的网络拓扑和需求。
3.3 快速收敛MSTP设备支持快速收敛,即在网络链路发生故障或拓扑发生变化时,能够快速将网络恢复到正常运行状态。
相比传统的STP,MSTP在网络恢复方面具有更好的性能。
3.4 虚拟链路MSTP设备支持虚拟链路的概念,可以将多个物理链路虚拟化为一个逻辑链路。
通过虚拟链路,可以实现链路聚合和负载均衡,提高网络的带宽利用率和性能。
4. MSTP设备的优势MSTP设备相比其他生成树协议的设备具有以下优势:4.1 高可用性MSTP通过生成多个独立的生成树,可以实现冗余路径,提高网络的可用性。
即使某个链路或设备发生故障,其他生成树仍然可以正常工作,保证了网络的连通性。
4.2 高性能由于MSTP设备支持负载均衡和快速收敛,可以合理分配网络流量和快速应对网络变化,从而提高网络的性能和响应速度。
1 华为OptiX系列产品以太网组网应用关键字EPL EVPL EPLAN EVPLAN内容摘要随着Internet的高速发展,各种宽带接入和应用逐渐兴起,同时越来越多的新兴公司办公地点开始多元化,需要进行高速互连,而原有的窄带数据通信已经不能满足需求。
在这种情况下,MSTP(多业务传送平台)技术就应运而生了,它可以对多种类型的以太网业务在SDH平台进行处理和传送。
本部分主要了介绍了EPL、EVPL、EPLAN和EVPLAN以太网业务类型和组网应用的相关知识,并通过实际组网举例,主要帮助光网络维护人员更好的理解和掌握各种以太网业务的类型、组网应用以及各种组网间的差别,从而更好的维护MSTP网络。
1.1 概述华为公司的MSTP设备遵循ITU-T G.etnsrv的建议,可支持以下四种以太网业务类型:●以太网专线:EPL(Ethernet Private Line)●以太网虚拟专线:EVPL(Ethernet Virtual Private Line)●以太网私有局域网:EPLAN(Ethernet Private LAN)●以太网虚拟私有局域网:EVPLAN(Ethernet Virtual Private LAN)EPL(Ethernet Private Line)以太网私有专线:以太网透传业务,各个用户独占一个VCTRUNK带宽,业务延迟低,提供用户数据的安全性和私有性。
EVPL(Ethernet Virtual Private Line)以太网私有专线:又可称为VPN专线,其优点在于不同业务流可共享VC TRUNK通道,使得同一物理端口可提供多条点到点的业务连接,并在各个方向上的性能相同,接入带宽可调、可管理,业务可收敛实现汇聚,节省端口资源。
EPLAN( Ethernet Private LAN )以太网私有局域网:也称为二层(L2)交换业务,实现多点到多点的业务连接。
接入带宽可调,可管理,业务可收敛、汇聚。
第一章 MSTP技术简介MSTP融合了I[P技术的灵活性、SDH技术的自愈性以及ATM的QOS技术,不但能够接入传统的TDM 2Mbit/s语音业务,而且能够接入ATM/FR业务、10/100Mbit/s以太网业务和V.35(包括n×64kbit/s)业务,使数据网和传输网在接入层面融为一体,实现了数据业务的收敛、汇聚和二层处理,灵活可靠,资源共享,可以让运营商以更低的设备成本、更低的运营成本、更简化的网络结构和更高的网络扩展性构筑新一代基础传送网络。
第一节 MSTP技术的发展状况1.1MSTP的发展历程MSTP完整概念首次出现于1999年10月的国际通信展。
2002年底,华为公司主笔起草了MSTP的国家标准,该标准于2002年11月经审批之后正式发布,成为我国MSTP的行业标准。
MSTP技术的发展主要体现在对以太网业务的支持上,以太网新业务的QOS 要求推动着MSTP的发展。
到目前为止,作为现代传输网络的解决方案,MSTP 技术经历了三代发展历程。
第一代MSTP以支持以太网透明传输为主要特征,包括以太网MAC帧,VLAN标记等的透明传送。
这种技术是在原有的SDH设备上增加IP传送接口,将IP以一种最简单的PPP(点到点协议)方式集成到SDH设备中,即将以太网信号直接映射到SDH的虚容器(VC)中进行点到点传送,实现以太网的点到点透传。
其缺点在于不提供以太网业务层保护和以太网业务的QOS区分;也不能实现流量控制;更不能提供多个业务流的统计复用和带宽共享以及业务层(MAC层)上的多用户隔离业务带宽粒度受限于SDH的虚容器,其颗粒度不能小于2Mb/s带宽。
因此,第二代的MSTP技术很快就产生了。
第二代MSTP以支持以太网二层交换为主要特点。
第二代MSTP是在一个或多个用户以太网接口与一个或多个独立的基于SDH虚容器(VC)的点对点链路之间实现基于以太网链路层的数据帧交换,完成对以太网业务的带宽共享以及统计复用功能。
MSTP的典型配置一、组网需求:配置MSTP使图中不同VLAN的报文按照不同的生成树实例转发。
具体配置为:网络中所有交换机属于同一个MST域;VLAN 10的报文沿着实例1转发,VLAN 30沿着实例3转发,VLAN 40沿着实例4转发,VLAN 20沿着实例0转发。
图中Switch A和Switch B为汇聚层设备,Switch C和Switch D为接入层设备。
VLAN 10、VLAN30在汇聚层设备终结,VLAN 40在接入层设备终结,因此可以配置实例1和实例3的树根分别为Switch A 和Switch B,实例4的树根为Switch C二、组网图:三、配置步骤:(1) 配置Switch A# 进入MST域视图。
<Sysname> system-view[Sysname] stp region-configuration# 配置MST域的域名、VLAN映射关系和修订级别。
[Sysname-mst-region] region-name example [Sysname-mst-region] instance 1 vlan 10 [Sysname-mst-region] instance 3 vlan 30 [Sysname-mst-region] instance 4 vlan 40 [Sysname-mst-region] revision-level 0# 手工激活MST域的配置。
[Sysname-mst-region] active region-configuration# 定义Switch A为实例1的树根。
[Sysname] stp instance 1 root primary(2) 配置Switch B# 进入MST域视图。
<Sysname> system-view[Sysname] stp region-configuration# 配置MST域的域名、VLAN映射关系和修订级别。
目录第1章 MSTP配置..................................................................................................................1-11.1 MSTP简介.........................................................................................................................1-11.1.1 MSTP的协议报文....................................................................................................1-11.1.2 MSTP的基本概念....................................................................................................1-11.1.3 MSTP的基本原理....................................................................................................1-51.1.4 MSTP在交换机上的实现.........................................................................................1-61.2 配置根桥.............................................................................................................................1-61.2.1 配置准备..................................................................................................................1-71.2.2 配置MST域............................................................................................................1-81.2.3 指定当前交换机为根桥或备份根桥..........................................................................1-91.2.4 配置当前交换机的桥优先级...................................................................................1-111.2.5 配置MSTP的工作模式.........................................................................................1-111.2.6 配置MST域的最大跳数........................................................................................1-121.2.7 配置交换网络的网络直径.......................................................................................1-131.2.8 配置MSTP的时间参数.........................................................................................1-131.2.9 配置超时时间因子..................................................................................................1-151.2.10 配置端口的最大发送速率.....................................................................................1-161.2.11 配置端口为边缘端口............................................................................................1-171.2.12 配置端口是否与点对点链路相连..........................................................................1-181.2.13 开启MSTP特性..................................................................................................1-201.3 配置叶子节点...................................................................................................................1-211.3.1 配置准备................................................................................................................1-221.3.2 配置MST域..........................................................................................................1-221.3.3 配置MSTP的工作模式.........................................................................................1-221.3.4 配置超时时间因子..................................................................................................1-221.3.5 配置端口的最大发送速率.......................................................................................1-221.3.6 配置端口为边缘端口..............................................................................................1-221.3.7 配置端口的路径开销..............................................................................................1-221.3.8 配置端口的优先级..................................................................................................1-251.3.9 配置端口是否与点对点链路相连............................................................................1-261.3.10 开启MSTP特性..................................................................................................1-261.4 执行mCheck操作............................................................................................................1-261.4.1 配置准备................................................................................................................1-271.4.2 配置过程................................................................................................................1-271.4.3 配置举例................................................................................................................1-271.5 配置交换机的保护功能.....................................................................................................1-281.5.1 保护功能简介.........................................................................................................1-281.5.2 BPDU保护功能的配置..........................................................................................1-291.5.3 Root保护功能的配置.............................................................................................1-301.5.4 环路保护功能的配置..............................................................................................1-311.5.5 防止TC-BPDU报文攻击配置................................................................................1-31 1.6 配置摘要侦听特性............................................................................................................1-321.6.1 简介.......................................................................................................................1-321.6.2 摘要侦听特性的配置..............................................................................................1-33 1.7 快速迁移特性...................................................................................................................1-341.7.1 简介.......................................................................................................................1-341.7.2 快速迁移配置.........................................................................................................1-35 1.8 BPDU TUNNEL特性的配置.............................................................................................1-361.8.1 简介.......................................................................................................................1-361.8.2 BPDU TUNNEL的配置.........................................................................................1-37 1.9 STP可维护性配置............................................................................................................1-381.9.1 简介.......................................................................................................................1-381.9.2 配置端口发送log和trap信息...............................................................................1-381.9.3 配置举例................................................................................................................1-38 1.10 MSTP显示和维护..........................................................................................................1-38 1.11 MSTP典型配置案例......................................................................................................1-39 1.12 BPDU TUNNEL配置典型案例.......................................................................................1-41第1章 MSTP配置1.1 MSTP简介STP(Spanning Tree Protocol,生成树协议)不能使端口状态快速迁移,即使是在点对点链路或边缘端口,也必须等待2倍的Forward delay的时间延迟,端口才能迁移到转发状态。
AR-1<Huawei><Huawei>undo terminal monitorInfo: Current terminal monitor is off.<Huawei>system-viewEnter system view, return user view with Ctrl+Z. [Huawei]interface ethernet 0/0/0[Huawei-Ethernet0/0/0]ip address 192.168.0.2 30 [Huawei-Ethernet0/0/0]interface ethernet0/0/1 [Huawei-Ethernet0/0/1]ip address 192.168.0.6 30 [Huawei-Ethernet0/0/1]q[Huawei]interface loopback 0[Huawei-LoopBack0]ip address 1.1.1.1 32[Huawei-LoopBack0]q[Huawei]ip route-static 172.16.0.0 24 192.168.0.1 [Huawei]ip route-static 172.16.1.0 24 192.168.0.5 [Huawei][Huawei][Huawei]ip route-static 0.0.0.0 0 192.168.0.5 [Huawei][Huawei]LSW2<Huawei>undo terminal monitorInfo: Current terminal monitor is off.<Huawei>system-viewEnter system view, return user view with Ctrl+Z.[Huawei][Huawei][Huawei]vlan batch 11 21 22 2 3Info: This operation may take a few seconds. Please wait for a moment...done.[Huawei]interface vlanif 11[Huawei-Vlanif11]ip address 192.168.1.2 28[Huawei-Vlanif11]vrrp vrid 1 virtual-ip 192.168.1.1[Huawei-Vlanif11]vrrp vrid 1 priority 200[Huawei-Vlanif11]vrrp vrid 1 track interface ethernet 0/0/5 reduced 150 [Huawei-Vlanif11]q[Huawei]interface vlanif 21[Huawei-Vlanif21]ip address 172.16.0.2 24[Huawei-Vlanif21]vrrp vrid 2 virtual-ip 172.16.0.1[Huawei-Vlanif21]vrrp vrid 2 priority 200[Huawei-Vlanif21]vrrp vrid 2 track interface ethernet 0/0/5 reduced 150 [Huawei-Vlanif21]q[Huawei]interface vlanif 22[Huawei-Vlanif22]ip address 172.16.1.2 24[Huawei-Vlanif22]vrrp vrid 3 virtual-ip 172.16.1.1[Huawei-Vlanif22]vrrp vrid 3 priority 80[Huawei-Vlanif22]q[Huawei]interface ethernet 0/0/1[Huawei-Ethernet0/0/1]port link-type trunk[Huawei-Ethernet0/0/1]port trunk allow-pass vlan 11 21[Huawei-Ethernet0/0/1]interface ethernet 0/0/2[Huawei-Ethernet0/0/2]port link-type trunk[Huawei-Ethernet0/0/2]port trunk allow-pass vlan 11 22[Huawei-Ethernet0/0/2]interface ethernet 0/0/3[Huawei-Ethernet0/0/3]port link-type trunk[Huawei-Ethernet0/0/3]port trunk allow-pass vlan 11 21 22[Huawei-Ethernet0/0/3]q[Huawei]stp enable[Huawei]stp mode mstp[Huawei]stp region-configuration[Huawei-mst-region]region-name 001[Huawei-mst-region]instance 1 vlan 11[Huawei-mst-region]instance 2 vlan 21[Huawei-mst-region]instance 3 vlan 22[Huawei-mst-region]active region-configurationInfo: This operation may take a few seconds. Please wait for a moment...done.[Huawei-mst-region]q[Huawei]stp instance 1 root primary[Huawei]stp instance 2 root primary[Huawei]stp instance 3 root secondary[Huawei]q<Huawei>sysEnter system view, return user view with Ctrl+Z.[Huawei]interface vlanif 2[Huawei-Vlanif2]ip address 192.168.0.1 30[Huawei-Vlanif2]interface ethernet 0/0/5[Huawei-Ethernet0/0/5]port link-type access[Huawei-Ethernet0/0/5]port default vlan 2[Huawei-Ethernet0/0/5]interface vlanif 3[Huawei-Vlanif3]ip address 192.168.0.9 30[Huawei-Vlanif3]interface ethernet0/0/4[Huawei-Ethernet0/0/4]port link-type access[Huawei-Ethernet0/0/4]port default vlan 3[Huawei-Ethernet0/0/4][Huawei-Ethernet0/0/4][Huawei-Ethernet0/0/4]q[Huawei]ip route-static 1.1.1.1 32 192.168.0.2[Huawei]ip route-static 0.0.0.0 0 192.168.0.10[Huawei] User interface con0 is availablePlease Press ENTER.<Huawei><Huawei><Huawei><Huawei><Huawei>dis vrrp briVRID State Interface Type Virtual IP----------------------------------------------------------------1 Master Vlanif11 Normal 192.168.1.12 Master Vlanif21 Normal 172.16.0.13 Backup Vlanif22 Normal 172.16.1.1---------------------------------------------------------------- Total:3 Master:2 Backup:1 Non-active:0<Huawei>Lsw1The device is running!<Huawei>undo terminal monitorInfo: Current terminal monitor is off.<Huawei>system-viewEnter system view, return user view with Ctrl+Z.[Huawei]vlan batch 11 21 22 2 3Info: This operation may take a few seconds. Please wait for a moment...done.[Huawei]interface vlanif 11[Huawei-Vlanif11]ip address 192.168.1.3 28[Huawei-Vlanif11]vrrp vrid 1 virtual-ip 192.168.1.1[Huawei-Vlanif11]q[Huawei]interface vlanif 21[Huawei-Vlanif21]ip address 172.16.0.3 24[Huawei-Vlanif21]vrrp vrid 2 virtual-ip 172.16.0.1[Huawei-Vlanif21]q[Huawei]interface vlanif 22[Huawei-Vlanif22]ip address 172.16.1.3 24[Huawei-Vlanif22]vrrp vrid 2 virtual-ip 172.16.1.1[Huawei-Vlanif22]vrrp vrid 2 priority 200[Huawei-Vlanif22]dis this#interface Vlanif22ip address 172.16.1.3 255.255.255.0vrrp vrid 2 virtual-ip 172.16.1.1vrrp vrid 2 priority 200#return[Huawei-Vlanif22]undo vrrp vrid 2 priority 200^Error:Too many parameters found at '^' position.[Huawei-Vlanif22][Huawei-Vlanif22]undo vrrp vrid 2[Huawei-Vlanif22]disthis^Error: Unrecognized command found at '^' position.[Huawei-Vlanif22]dis this#interface Vlanif22ip address 172.16.1.3 255.255.255.0#return[Huawei-Vlanif22]vrrp vrid 3 virtual-ip 172.16.1.1[Huawei-Vlanif22]vrrp vrid 3 priority 200[Huawei-Vlanif22]vrrp vrid 3 track interface ethernet0/0/5 reduced 150 [Huawei-Vlanif22]q[Huawei]interface ethernet 0/0/1[Huawei-Ethernet0/0/1]port link-type trunk[Huawei-Ethernet0/0/1]port trunk allow-pass vlan 11 21[Huawei-Ethernet0/0/1]interface ethernet 0/0/2[Huawei-Ethernet0/0/2]port link-type trunk[Huawei-Ethernet0/0/2]port trunk allow-pass vlan 11 22[Huawei-Ethernet0/0/2]interface ethernet0/0/3[Huawei-Ethernet0/0/3]port link-type trunk[Huawei-Ethernet0/0/3]port trunk allow-pass vlan 11 21 22[Huawei-Ethernet0/0/3]q[Huawei]stp enable[Huawei]stp mode mstp[Huawei]stp region-configuration[Huawei-mst-region]region-name 001[Huawei-mst-region]instance 1 vlan 11[Huawei-mst-region]instance 2 vlan 21[Huawei-mst-region]instance 3 vlan 22[Huawei-mst-region]active region-configurationInfo: This operation may take a few seconds. Please wait for a moment...done.[Huawei-mst-region]q[Huawei]stp instance 1 root secondary[Huawei]stp instance 2 root secondary[Huawei]stp instance 3 root primary[Huawei]q<Huawei>sysEnter system view, return user view with Ctrl+Z.[Huawei]interface vlanif 2[Huawei-Vlanif2]ip address 192.168.0.5 30[Huawei-Vlanif2]interface ethernet 0/0/5[Huawei-Ethernet0/0/5]port link-type access[Huawei-Ethernet0/0/5]port default vlan 2[Huawei-Ethernet0/0/5]interface vlanif 3[Huawei-Vlanif3]ip address 192.168.0.10 30[Huawei-Vlanif3]interface ethernet0/0/4[Huawei-Ethernet0/0/4]po li a[Huawei-Ethernet0/0/4]po de vl 3[Huawei-Ethernet0/0/4][Huawei-Ethernet0/0/4][Huawei-Ethernet0/0/4]q[Huawei]ip route-static 1.1.1.1 32 192.168.0.6[Huawei]ip route-static 0.0.0.0 0 192.168.0.9[Huawei]dis vrrp bri[Huawei]dis vrrp briefVRID State Interface Type Virtual IP----------------------------------------------------------------1 Backup Vlanif11 Normal 192.168.1.12 Backup Vlanif21 Normal 172.16.0.13 Master Vlanif22 Normal 172.16.1.1---------------------------------------------------------------- Total:3 Master:1 Backup:2 Non-active:0[Huawei]LSW3The device is running!<Huawei>undo terminal monitorInfo: Current terminal monitor is off.<Huawei>system-vew^Error: Unrecognized command found at '^' position.<Huawei>system-viewEnter system view, return user view with Ctrl+Z.[Huawei]vlan batch 11 22Info: This operation may take a few seconds. Please wait for a moment...done.[Huawei]interface vlanif 11[Huawei-Vlanif11]ip address 192.168.1.5 28[Huawei-Vlanif11]q[Huawei]interface ethernet 0/0/3[Huawei-Ethernet0/0/3]port link-type access[Huawei-Ethernet0/0/3]port default vlan 22[Huawei-Ethernet0/0/3]interface ethernet 0/0/1[Huawei-Ethernet0/0/1]port link-type trunk[Huawei-Ethernet0/0/1]port trunk allow-pass vlan 11 22[Huawei-Ethernet0/0/1]interface ethernet 0/0/2[Huawei-Ethernet0/0/2]port link-type trunk[Huawei-Ethernet0/0/2]port trunk allow-pass vlan 11 22[Huawei-Ethernet0/0/2]User interface con0 is availablePlease Press ENTER.LSW4Please press enter to start cmd line!<Huawei>undo terminal monitorInfo: Current terminal monitor is off.<Huawei>system-viewEnter system view, return user view with Ctrl+Z.[Huawei]vlan batch 11 21Info: This operation may take a few seconds. Please wait for a moment...done.[Huawei]interface vlanif 11[Huawei-Vlanif11]ip address 192.168.1.4 28[Huawei-Vlanif11]q[Huawei]interface ethernet0/0/3[Huawei-Ethernet0/0/3]port link-type access[Huawei-Ethernet0/0/3]port default vlan 21[Huawei-Ethernet0/0/3]interface ethernet 0/0/1[Huawei-Ethernet0/0/1]port link-type trunk[Huawei-Ethernet0/0/1]port trunk allow-pass vlan 11 21 [Huawei-Ethernet0/0/1]interface ethernet0/0/2[Huawei-Ethernet0/0/2]port link-type trunk[Huawei-Ethernet0/0/2]port trunk allow-pass vlan 11 21 [Huawei-Ethernet0/0/2]q[Huawei]vlan 11[Huawei-vlan11]description Guanli[Huawei-vlan11]dis this#vlan 11description Guanli#return[Huawei-vlan11] User interface con0 is availablePlease Press ENTER.。
华为配置MSTP的基本功能组网需求交换机SwitchA、SwitchB、SwitchC和SwitchD都支持MSTP,本例中的交换机都使用二层接口运行MSTP。
配置思路采用如下的思路配置MSTP的基本功能:将SwitchA和SwitchC配置到一个域内,域名为RG1,创建实例1。
将SwitchB和SwitchD配置到另外一个域,域名为RG2,创建实例1。
配置交换机SwitchA为CIST总根。
在域RG1内,交换机SwitchA为CIST域根,SwitchA为实例1的域根。
在SwitchA的Eth0/0/2和Eth0/0/1上应用根保护功能。
在域RG2内,交换机SwitchB为CIST域根,SwitchD为实例1的域根。
SwitchC和SwitchD的Eth0/0/1与PC机相连,设置为边缘端口,同时在SwitchC和SwitchD 上应用BPDU保护功能。
在SwitchA、SwitchB、SwitchC和SwitchD使用华为私有计算方法计算路径开销。
数据准备为完成此配置例,需准备如下的数据:SwitchA和SwitchC的域名为RG1SwitchB和SwitchD的域名为RG2各Ethernet端口号如图1所示VLAN号是1~20操作步骤配置交换机SwitchA# 配置SwitchA的MST域。
<SwitchA> system-view[SwitchA] stp region-configuration[SwitchA-mst-region] region-name RG1[SwitchA-mst-region] instance 1 vlan 1 to 10# 激活域配置。
[SwitchA-mst-region] active region-configuration[SwitchA-mst-region] quit# 配置SwitchA在实例0中的优先级为0,保证SwitchA作为CIST的总根。
[SwitchA] stp instance 0 priority 0# 配置SwitchA在实例1中的优先级为0,保证SwitchA 作为实例1的域根。
[SwitchA] stp instance 1 priority 0# 配置端口路径开销的计算方法为华为私有计算方法。
[SwitchA] stp pathcost-standard legacy# 创建VLAN 2到20。
[SwitchA] vlan batch 2 to 20# 将Eth0/0/2加入VLAN。
[SwitchA] interface ethernet 0/0/2[SwitchA-Ethernet0/0/2] port link-type trunk[SwitchA-Ethernet0/0/2] port trunk allow-pass vlan 1 to 20[SwitchA-Ethernet0/0/2] bpdu enable[SwitchA-Ethernet0/0/2] quit# 将Eth0/0/1加入VLAN。
[SwitchA] interface ethernet 0/0/1[SwitchA-Ethernet0/0/1] port link-type trunk[SwitchA-Ethernet0/0/1] port trunk allow-pass vlan 1 to 20[SwitchA-Ethernet0/0/1] bpdu enable[SwitchA-Ethernet0/0/1] quit# 在Eth0/0/1上启动根保护。
[SwitchA] interface ethernet 0/0/1[SwitchA-Ethernet0/0/1] stp root-protection[SwitchA-Ethernet0/0/1] quit# 在Eth0/0/2上启动根保护。
[SwitchA] interface ethernet 0/0/2[SwitchA-Ethernet0/0/2] stp root-protection[SwitchA-Ethernet0/0/2] quit# 启动MSTP。
[SwitchA] stp enable配置交换机SwitchB# 配置SwitchB的MST域。
[SwitchB] stp region-configuration[SwitchB-mst-region] region-name RG2[SwitchB-mst-region] instance 1 vlan 1 to 10# 激活域配置。
[SwitchB-mst-region] active region-configuration[SwitchB-mst-region] quit# 配置SwitchB在实例0中的优先级为4096,保证SwitchB作为CIST的域根。
[SwitchB] stp instance 0 priority 4096# 配置端口路径的开销计算方法为华为私有计算方法。
[SwitchB] stp pathcost-standard legacy# 创建VLAN 2到20。
[SwitchB] vlan batch 2 to 20# 将Eth0/0/1加入VLAN。
[SwitchB] interface ethernet 0/0/1[SwitchB-Ethernet0/0/1] port link-type trunk[SwitchB-Ethernet0/0/1] port trunk allow-pass vlan 1 to 20[SwitchB-Ethernet0/0/1] bpdu enable[SwitchB-Ethernet0/0/1] quit# 将Eth0/0/2加入VLAN。
[SwitchB] interface ethernet 0/0/2[SwitchB-Ethernet0/0/2] port link-type trunk[SwitchB-Ethernet0/0/2] port trunk allow-pass vlan 1 to 20[SwitchB-Ethernet0/0/2] bpdu enable[SwitchB-Ethernet0/0/2] quit# 启动MSTP。
[SwitchB] stp enable配置SwitchC# 配置SwitchC的MST域。
[SwitchC] stp region-configuration[SwitchC-mst-region] region-name RG1[SwitchC-mst-region] instance 1 vlan 1 to 10# 激活域配置。
[SwitchC-mst-region] active region-configuration[SwitchC-mst-region] quit# 配置端口路径开销的计算方法为华为私有计算方法。
[SwitchC] stp pathcost-standard legacy# 启动BPDU保护功能[SwitchC] stp bpdu-protection# 创建VLAN 2到20。
[SwitchC] vlan batch 2 to 20# 将Eth0/0/2加入VLAN。
[SwitchC] interface ethernet 0/0/2[SwitchC-Ethernet0/0/2] port link-type trunk[SwitchC-Ethernet0/0/2] port trunk allow-pass vlan 1 to 20[SwitchC-Ethernet0/0/2] bpdu enable[SwitchC-Ethernet0/0/2] quit# 将Eth0/0/3加入VLAN。
[SwitchC] interface ethernet 0/0/3[SwitchC-Ethernet0/0/3] port link-type trunk[SwitchC-Ethernet0/0/3] port trunk allow-pass vlan 1 to 20[SwitchC-Ethernet0/0/3] bpdu enable[SwitchC-Ethernet0/0/3] quit# 将Eth0/0/1配置成边缘端口。
[SwitchC] interface ethernet 0/0/1[SwitchC-Ethernet0/0/1] stp edged-port enable[SwitchC-Ethernet0/0/1] port hybrid pvid vlan 20[SwitchC-Ethernet0/0/1] port hybrid untagged vlan 20[SwitchC-Ethernet0/0/1] quit# 启动MSTP。
[SwitchC] stp enable配置SwitchD# 配置SwitchD的MST域。
[SwitchD] stp region-configuration[SwitchD-mst-region] region-name RG2[SwitchD-mst-region] instance 1 vlan 1 to 10# 激活域配置。
[SwitchD-mst-region] active region-configuration[SwitchD-mst-region] quit# 配置SwitchD在实例1中的优先级为0,保证SwitchD作为实例1的域根。
[SwitchD] stp instance 1 priority 0# 配置端口路径开销的计算方法为华为私有计算方法。
[SwitchD] stp pathcost-standard legacy# 启动BPDU保护功能。
[SwitchD] stp bpdu-protection# 创建VLAN 2到20。
[SwitchD] vlan batch 2 to 20# 将Eth0/0/2加入VLAN。
[SwitchD] interface ethernet 0/0/2[SwitchD-Ethernet0/0/2] port link-type trunk[SwitchD-Ethernet0/0/2] port trunk allow-pass vlan 1 to 20[SwitchD-Ethernet0/0/2] bpdu enable[SwitchD-Ethernet0/0/2] quit# 将Eth0/0/3加入VLAN。
[SwitchD] interface ethernet 0/0/3[SwitchD-Ethernet0/0/3] port link-type trunk[SwitchD-Ethernet0/0/3] port trunk allow-pass vlan 1 to 20[SwitchD-Ethernet0/0/3] bpdu enable[SwitchD-Ethernet0/0/3] quit# 将Eth0/0/1配置成边缘端口。