华为配置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设备支持负载均衡和快速收敛,可以合理分配网络流量和快速应对网络变化,从而提高网络的性能和响应速度。
华为配置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配置成边缘端口。