MSTP
STP/RSTP的缺陷:
所有vlan共享一颗生成树,阻塞链路被完全浪费,无法实现不同vlan在多条链路上负载分担
MSTP的定义:
多生成树协议,基于实例计算出多颗生成树,实例间实现负载分担
MSTP基本概念
1.MST域
定义:拥有相同MST配置标识的交换机构成的集合,划分区域可加快收敛速度和方便管理
相同域的必要条件:域名一致,修订级别一致,实例和映射关系一致
2.IST(内部生成树):每个MST域独立计算的内部生成树实例,默认所有的vlan都映射在实例0
3.CST(公共生成树):用来互联MST域的单生成树(把每个MST域作为一台交换机,计算出的生成树实例)
4.CIST(公共内部生成树):CST+每个域的内部IST
5.CIST域根:每个IST的根网桥
6.CIST总根:整个CIST的根网桥
7.Master端口:CST的根端口,单域MSTP中不可能存在Master端口,多域MSTP中,根域不可能存在Master端口,其他域只有一个
MSTP配置要点
MSTP配置完成或修改MST配置后,一定要激活配置才能生效
MSTP兼容性问题
1.配置端口识别/发送MSTP报文格式:
自动识别 Auto
标准格式 dotls
与非标准兼容的格式 Legacy
2.摘要侦听:
其他产商设备可能使用私有密钥计算配置摘要
开启摘要侦听使设备不在对比配置摘要,但会导致只要域名和修订级别一致,vlan映射关系不一致也属于同一域,可全局开启也可接口开启
3.配置No Agreement Check特性
P/A机制问题:MSTP收到P/A位都置位的BPDU才会回复A位置位的BPDU,一个RSTP端口连接一个MSTP端口,RSTP的指定端口快速切换时只会发出P位BPDU,导致MSTP不会回应A位BPDU
配置No Agreement Check特性后,MSTP不再检查Propsal报文中的A位是否置位
实验
实验需求:
1.所有交换机创建vlan10,vlan20,vlan30,vlan40
2.所有交换机之间的端口配置位Trunk,并放行相关vlan
3.按照图示分区域配置MSTP,并配置主备网桥
SW1配置
[H3C]sysname SW1
[SW1]vlan 10
[SW1-vlan10]vlan 20
[SW1-vlan20]vlan 30
[SW1-vlan30]vlan 40
[SW1-vlan40]int g1/0/1
[SW1-GigabitEthernet1/0/1]port link-type trunk
[SW1-GigabitEthernet1/0/1]port trunk permit vlan 10 20 30 40
[SW1-vlan40]int g1/0/2
[SW1-GigabitEthernet1/0/2]port link-type trunk
[SW1-GigabitEthernet1/0/2]port trunk permit vlan 10 20 30 40
[SW1]stp region-configuration
[SW1-mst-region]region-name h3c1
[SW1-mst-region]revision-level 1
[SW1-mst-region]instance 1 vlan 10 20
[SW1-mst-region]instance 2 vlan 30 40
[SW1-mst-region]active region-configuration
[SW1]stp instance 1 root primary
[SW1]stp instance 2 root secondary
SW2配置
[H3C]sysname SW2
[SW2]vlan 10
[SW2-vlan10]vlan 20
[SW2-vlan20]vlan 30
[SW2-vlan30]vlan 40
[SW2-vlan40]int g1/0/1
[SW2-GigabitEthernet1/0/1]port link-type trunk
[SW2-GigabitEthernet1/0/1]port trunk permit vlan 10 20 30 40
[SW2-vlan40]int g1/0/2
[SW2-GigabitEthernet1/0/2]port link-type trunk
[SW2-GigabitEthernet1/0/2]port trunk permit vlan 10 20 30 40
[SW2]stp region-configuration
[SW2-mst-region]region-name h3c1
[SW2-mst-region]revision-level 1
[SW2-mst-region]instance 1 vlan 10 20
[SW2-mst-region]instance 2 vlan 30 40
[SW2-mst-region]active region-configuration
[SW2]stp instance 1 root secondary
[SW2]stp instance 2 root primary
SW3配置
[H3C]sysname SW3
[SW3]vlan 10
[SW3-vlan10]vlan 20
[SW3-vlan20]vlan 30
[SW3-vlan30]vlan 40
[SW3-vlan40]int g1/0/1
[SW3-GigabitEthernet1/0/1]port link-type trunk
[SW3-GigabitEthernet1/0/1]port trunk permit vlan 10 20 30 40
[SW3-vlan40]int g1/0/2
[SW3-GigabitEthernet1/0/2]port link-type trunk
[SW3-GigabitEthernet1/0/2]port trunk permit vlan 10 20 30 40
[SW3-vlan40]int g1/0/3
[SW3-GigabitEthernet1/0/3]port link-type trunk
[SW3-GigabitEthernet1/0/3]port trunk permit vlan 10 20 30 40
[SW3-vlan40]int g1/0/4
[SW3-GigabitEthernet1/0/4]port link-type trunk
[SW3-GigabitEthernet1/0/4]port trunk permit vlan 10 20 30 40
[SW3]stp region-configuration
[SW3-mst-region]region-name h3c1
[SW3-mst-region]revision-level 1
[SW3-mst-region]instance 1 vlan 10 20
[SW3-mst-region]instance 2 vlan 30 40
[SW3-mst-region]active region-configuration
SW4配置
[H3C]sysname SW4
[SW4]vlan 10
[SW4-vlan10]vlan 20
[SW4-vlan20]vlan 30
[SW4-vlan30]vlan 40
[SW4-vlan40]int g1/0/1
[SW4-GigabitEthernet1/0/1]port link-type trunk
[SW4-GigabitEthernet1/0/1]port trunk permit vlan 10 20 30 40
[SW4-vlan40]int g1/0/2
[SW4-GigabitEthernet1/0/2]port link-type trunk
[SW4-GigabitEthernet1/0/2]port trunk permit vlan 10 20 30 40
[SW4-vlan40]int g1/0/3
[SW4-GigabitEthernet1/0/3]port link-type trunk
[SW4-GigabitEthernet1/0/3]port trunk permit vlan 10 20 30 40
[SW4]stp region-configuration
[SW4-mst-region]region-name h3c2
[SW4-mst-region]revision-level 2
[SW4-mst-region]instance 1 vlan 10
[SW4-mst-region]instance 2 vlan 30
[SW4-mst-region]active region-configuration
[SW4]stp instance 1 root primary
[SW4]stp instance 2 root secondary
SW5配置
[H3C]sysname SW5
[SW5]vlan 10
[SW5-vlan10]vlan 20
[SW5-vlan20]vlan 30
[SW5-vlan30]vlan 40
[SW5-vlan40]int g1/0/1
[SW5-GigabitEthernet1/0/1]port link-type trunk
[SW5-GigabitEthernet1/0/1]port trunk permit vlan 10 20 30 40
[SW5-vlan40]int g1/0/2
[SW5-GigabitEthernet1/0/2]port link-type trunk
[SW5-GigabitEthernet1/0/2]port trunk permit vlan 10 20 30 40
[SW5]stp region-configuration
[SW5-mst-region]region-name h3c2
[SW5-mst-region]revision-level 2
[SW5-mst-region]instance 1 vlan 10
[SW5-mst-region]instance 2 vlan 30
[SW5-mst-region]active region-configuration
SW6配置
[H3C]sysname SW6
[SW6]vlan 10
[SW6-vlan10]vlan 20
[SW6-vlan20]vlan 30
[SW6-vlan30]vlan 40
[SW6-vlan40]int g1/0/1
[SW6-GigabitEthernet1/0/1]port link-type trunk
[SW6-GigabitEthernet1/0/1]port trunk permit vlan 10 20 30 40
[SW6-vlan40]int g1/0/2
[SW6-GigabitEthernet1/0/2]port link-type trunk
[SW6-GigabitEthernet1/0/2]port trunk permit vlan 10 20 30 40
[SW6-vlan40]int g1/0/3
[SW6-GigabitEthernet1/0/3]port link-type trunk
[SW6-GigabitEthernet1/0/3]port trunk permit vlan 10 20 30 40
[SW6]stp region-configuration
[SW6-mst-region]region-name h3c2
[SW6-mst-region]revision-level 2
[SW6-mst-region]instance 1 vlan 10
[SW6-mst-region]instance 2 vlan 30
[SW6-mst-region]active region-configuration
[SW6]stp instance 1 root secondary
[SW6]stp instance 2 root primary
SW7配置
[H3C]sysname SW7
[SW7]vlan 10
[SW7-vlan10]vlan 20
[SW7-vlan20]vlan 30
[SW7-vlan30]vlan 40
[SW7-vlan40]int g1/0/1
[SW7-GigabitEthernet1/0/1]port link-type trunk
[SW7-GigabitEthernet1/0/1]port trunk permit vlan 10 20 30 40
[SW7-vlan40]int g1/0/2
[SW7-GigabitEthernet1/0/2]port link-type trunk
[SW7-GigabitEthernet1/0/2]port trunk permit vlan 10 20 30 40
[SW7]stp region-configuration
[SW7-mst-region]region-name h3c3
[SW7-mst-region]revision-level 3
[SW7-mst-region]instance 1 vlan 20
[SW7-mst-region]instance 2 vlan 40
[SW7-mst-region]active region-configuration
实验二
实验需求:
1.网络中存在vlan10,vlan20,vlan30,vlan40,可以再所有链路上传输
2.通过配置MSTP防止二层环路,并实现流量负载
3.所有交换机配置再一个MST域中,域名为h3c,修订级别为1,创建instance1映射vlan10和vlan20,创建instance2映射vlan30和vlan40
4.SW1配置为instance1的主根和instance2的备份,SW2配置instance2的主根和instance1的备份根
SW1配置
[H3C]sysname SW1
[SW1]vlan 10
[SW1-vlan10]vlan 20
[SW1-vlan20]vlan 30
[SW1-vlan30]vlan 40
[SW1-vlan40]int g1/0/1
[SW1-GigabitEthernet1/0/1]port link-type trunk
[SW1-GigabitEthernet1/0/1]port trunk permit vlan 10 20 30 40
[SW1-vlan40]int g1/0/2
[SW1-GigabitEthernet1/0/2]port link-type trunk
[SW1-GigabitEthernet1/0/2]port trunk permit vlan 10 20 30 40
[SW1-vlan40]int g1/0/3
[SW1-GigabitEthernet1/0/3]port link-type trunk
[SW1-GigabitEthernet1/0/3]port trunk permit vlan 10 20 30 40
[SW1]stp region-configuration
[SW1-mst-region]region-name h3c
[SW1-mst-region]region-name
[SW1-mst-region]revision-level 1
[SW1-mst-region]instance 1 vlan 10 20
[SW1-mst-region]instance 2 vlan 30 40
[SW1]stp instance 1 root primary
[SW1]stp instance 2 root secondary
SW2配置
[H3C]sysname SW2
[SW2]vlan 10
[SW2-vlan10]vlan 20
[SW2-vlan20]vlan 30
[SW2-vlan30]vlan 40
[SW2-vlan40]int g1/0/1
[SW2-GigabitEthernet1/0/1]port link-type trunk
[SW2-GigabitEthernet1/0/1]port trunk permit vlan 10 20 30 40
[SW2-vlan40]int g1/0/2
[SW2-GigabitEthernet1/0/2]port link-type trunk
[SW2-GigabitEthernet1/0/2]port trunk permit vlan 10 20 30 40
[SW2-vlan40]int g1/0/3
[SW2-GigabitEthernet1/0/3]port link-type trunk
[SW2-GigabitEthernet1/0/3]port trunk permit vlan 10 20 30 40
[SW2]stp region-configuration
[SW2-mst-region]region-name h3c
[SW2-mst-region]region-name
[SW2-mst-region]revision-level 1
[SW2-mst-region]instance 1 vlan 10 20
[SW2-mst-region]instance 2 vlan 30 40
[SW2]stp instance 2 root primary
[SW2]stp instance 1 root secondary
SW3配置
[H3C]sysname SW3
[SW3]vlan 10
[SW3-vlan10]vlan 20
[SW3-vlan20]vlan 30
[SW3-vlan30]vlan 40
[SW3-vlan40]int g1/0/1
[SW3-GigabitEthernet1/0/1]port link-type trunk
[SW3-GigabitEthernet1/0/1]port trunk permit vlan 10 20 30 40
[SW3-vlan40]int g1/0/2
[SW3-GigabitEthernet1/0/2]port link-type trunk
[SW3-GigabitEthernet1/0/2]port trunk permit vlan 10 20 30 40
[SW3]stp region-configuration
[SW3-mst-region]region-name h3c
[SW3-mst-region]region-name
[SW3mst-region]revision-level 1
[SW3-mst-region]instance 1 vlan 10 20
[SW3-mst-region]instance 2 vlan 30 40
SW4配置
[H3C]sysname SW4
[SW4]vlan 10
[SW4-vlan10]vlan 20
[SW4-vlan20]vlan 30
[SW4-vlan30]vlan 40
[SW4-vlan40]int g1/0/1
[SW4-GigabitEthernet1/0/1]port link-type trunk
[SW4-GigabitEthernet1/0/1]port trunk permit vlan 10 20 30 40
[SW4-vlan40]int g1/0/2
[SW4-GigabitEthernet1/0/2]port link-type trunk
[SW4-GigabitEthernet1/0/2]port trunk permit vlan 10 20 30 40
[SW4]stp region-configuration
[SW43-mst-region]region-name h3c
[SW4-mst-region]region-name
[SW4mst-region]revision-level 1
[SW4-mst-region]instance 1 vlan 10 20
[SW4-mst-region]instance 2 vlan 30 40