mstp
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mstp相关的知识,希望对你有一定的参考价值。
生成树的配置概念stp-生成树协议 rstp-快速生成树协议,mstp-多生成树协议
根桥:根桥在全网中有且只有一个,其它设备则称为叶子节点。
根端口:所谓根端口,是指非根桥设备上离根桥最近的端口。
根端口负责与根桥进行通信。非根桥设备上有且只有一个根端口,根桥上没有根端口。
MST域:(Multiple Spanning Tree Regions,多生成树域)是由交换网络中的多台设
备以及它们之间的网段所构成(域内设备都使能了生成树协议,域名相同,映射关系配置相同)
MSTI:一个MST域可以通过MSTP协议生成多颗生成树,各个生成树之间独立并分别与对应的vlan对应
每颗生成树都称为一个MSTI (多生成树实例)
基本配置
1 配置stp模式(默认开启MSTP)
2 配置MST域(使用命令激活或者是全局使能生成树协议才会生效)
? 进入域视图,配置域名(默认的是mac地址),配置vlan映射表,配置修订级别
? 激活mst域配置(必选)
3 配置根桥和备份根桥
4 配置设备优先级
5 配置MST域最大跳数
6 配置端口路径开销,配置端口优先级
步骤:
1 交换机上创建vlan,设置trunk口,允许相应的vlan通过
2 配置MST域的域名,绑定vlan配置MSTP修订级别
3 激活MST域的配置
4 配置根桥
5 全局开启MSTP协议
配置:
A
<H3C>system-view
[H3C]stpregion-configuration
[H3C-mst-region]region-nameexample
[H3C-mst-region]instance1 vlan 10
[H3C-mst-region]instance2 vlan 20
[H3C-mst-region]instance3 vlan 30
[H3C-mst-region]revision-level0
[H3C-mst-region]activeregion-configuration
[H3C-mst-region]exit
[H3C]stpinstance 1 root primary
[H3C]stp global enable
[H3C]intg1/0/1
[H3C-GigabitEthernet1/0/1]portlink-type trunk
[H3C-GigabitEthernet1/0/1]porttrunk permit vlan 10 20
[H3C-GigabitEthernet1/0/1]intg1/0/3
[H3C-GigabitEthernet1/0/3]portlink-type trunk
[H3C-GigabitEthernet1/0/3]porttrunk? permit vlan 20 30
[H3C-GigabitEthernet1/0/3]intg1/0/2
[H3C-GigabitEthernet1/0/2]portlink-type trunk
[H3C-GigabitEthernet1/0/2]porttrunk permit vlan all
[H3C]vlan10 to 40
?
B
?
<H3C>system-view
[H3C]stpregion-configuration
[H3C-mst-region]region-nameexample
[H3C-mst-region]instance1 vlan 10
[H3C-mst-region]instance2 vlan 20
[H3C-mst-region]instance3 vlan 30
[H3C-mst-region]revision-level0
[H3C-mst-region]activeregion-configuration
[H3C-mst-region]exit
[H3C]stpinstance 1 root primary
[H3C]stpglobal enable
[H3C]intg1/0/2
[H3C-GigabitEthernet1/0/2]portlink-type trunk
[H3C-GigabitEthernet1/0/2]porttrunk permit vlan all
[H3C-GigabitEthernet1/0/2]intg1/0/2
[H3C-GigabitEthernet1/0/2]portlink-type trunk
[H3C-GigabitEthernet1/0/2]porttrunk permit vlan 10 20
[H3C-GigabitEthernet1/0/2]intg1/0/1
[H3C-GigabitEthernet1/0/1]portlink-type trunk
[H3C-GigabitEthernet1/0/1]porttrunk permit vlan 20 30
[H3C]vlan10 to 40
?
?
?
?
C
<H3C>system-view
[H3C]stpregion-configuration
[H3C-mst-region]region-nameexample
[H3C-mst-region]instance1 vlan 10
[H3C-mst-region]instance2 vlan 20
[H3C-mst-region]instance3 vlan 30
[H3C-mst-region]revision-level0
[H3C-mst-region]activeregion-configuration
[H3C-mst-region]exit
[H3C]stpinstance 4 root primary
[H3C]stp global enable
[H3C]intg1/0/1
[H3C-GigabitEthernet1/0/1]portlink-type trunk
[H3C-GigabitEthernet1/0/1]porttrunk permit vlan 10 20
[H3C-GigabitEthernet1/0/1]intg1/0/2
[H3C-GigabitEthernet1/0/2]portlink-type trunk
[H3C-GigabitEthernet1/0/2]porttrunk permit vlan 10 20
[H3C-GigabitEthernet1/0/2]intg1/0/3
[H3C-GigabitEthernet1/0/3]portlink-type trunk
[H3C-GigabitEthernet1/0/3]porttrunk permit vlan 20 40
[H3C]vlan10 to 40
?
?
D
<H3C>system-view
[H3C]stpregion-configuration
[H3C-mst-region]region-nameexample
[H3C-mst-region]instance1 vlan 10
[H3C-mst-region]instance2 vlan 20
[H3C-mst-region]instance3 vlan 30
[H3C-mst-region]revision-level0
[H3C-mst-region]activeregion-configuration
[H3C-mst-region]exit
[H3C]stpinstance 0 root primary
[H3C]stpglobal enable
[H3C]intg1/0/1
[H3C-GigabitEthernet1/0/1]portlink-type trunk
[H3C-GigabitEthernet1/0/1]porttrunk permit vlan 20 30
[H3C-GigabitEthernet1/0/1]intg1/0/2
[H3C-GigabitEthernet1/0/2]portlink-type trunk
[H3C-GigabitEthernet1/0/2]porttrunk permit vlan 20 30
[H3C-GigabitEthernet1/0/2]intg1/0/3
[H3C-GigabitEthernet1/0/3]portlink-type trunk
[H3C-GigabitEthernet1/0/3]porttrunk permit vlan 20 40
[H3C-GigabitEthernet1/0/3]exit
[H3C]vlan10 to 40
以上是关于mstp的主要内容,如果未能解决你的问题,请参考以下文章