STP不通的故障排除

By | 2017年9月25日

 

现有网络拓扑如上图:
SW1、SW2、SW3、SW4、SW5:上有Vlan10、20;

SW3、SW4、SW5、SW6上有Vlan30;

要求Vlan10、20的根桥为SW1;

要求Vlan30的根桥为SW6;

每个交换机到根桥的路径必须为最优路径。

当前配置:

SW1:
#
stp region-configuration
region-name cqksy
active region-configuration
#

interface Ethernet0/4/0
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 to 29 31 to 4094
#
interface Ethernet0/4/1
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 to 29 31 to 4094
#
interface Ethernet0/4/2
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 to 29 31 to 4094
#
interface Ethernet0/4/3
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 to 29 31 to 4094

#
stp instance 0 root primary
stp enable
#

SW2:

#
stp region-configuration
region-name cqksy
active region-configuration
#

#
interface Ethernet0/4/0
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 to 29 31 to 4094
#
interface Ethernet0/4/1
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 to 29 31 to 4094
#
interface Ethernet0/4/2
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 to 29 31 to 4094
#
interface Ethernet0/4/3
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 to 29 31 to 4094
#
#
stp instance 0 root secondary
stp enable

SW3:

#

stp region-configuration
region-name cqksy
instance 3 vlan 30
active region-configuration
#
interface Ethernet0/4/0
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 to 29 31 to 4094
#
interface Ethernet0/4/1
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 to 29 31 to 4094
#
#
interface Ethernet0/4/7
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 30
#
stp enable

SW4:

stp region-configuration
region-name cqksy
instance 3 vlan 30
active region-configuration
#
interface Ethernet0/4/0
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 to 29 31 to 4094
#
interface Ethernet0/4/1
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 to 29 31 to 4094
interface Ethernet0/4/7
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 30
#
stp enable

SW5:

#
stp region-configuration
region-name cqksy
instance 3 vlan 30
active region-configuration
#
interface Ethernet0/4/0
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 to 29 31 to 4094
#
interface Ethernet0/4/1
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 to 29 31 to 4094
#
interface Ethernet0/4/7
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 30
#
stp enable

SW6:

stp region-configuration
region-name cqksy
instance 3 vlan 30
active region-configuration
#
interface Ethernet0/4/0
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 30
#
interface Ethernet0/4/1
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 30
#
interface Ethernet0/4/2
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 30
#
stp instance 3 root primary
stp enable

当前根桥信息:


display stp root
MSTID Root Bridge ID ExtPathCost IntPathCost Root Port
0 0.000f-e200-0100 0 0

disp stp root
MSTID Root Bridge ID ExtPathCost IntPathCost Root Port
0 0.000f-e200-0100 0 200 Ethernet0/4/0

[SW3]display stp root
MSTID Root Bridge ID ExtPathCost IntPathCost Root Port
0 0.000f-e200-0100 200 0 Ethernet0/4/0
3 0.000f-e200-0600 0 200 Ethernet0/4/7

[SW4]disp stp root
MSTID Root Bridge ID ExtPathCost IntPathCost Root Port
0 0.000f-e200-0100 200 400 Ethernet0/4/7
3 0.000f-e200-0600 0 200 Ethernet0/4/7

[SW5-Ethernet0/4/7] disp stp root
MSTID Root Bridge ID ExtPathCost IntPathCost Root Port
0 0.000f-e200-0100 200 400 Ethernet0/4/7
3 0.000f-e200-0600 0 200 Ethernet0/4/7
[SW5-Ethernet0/4/7]

display stp root
MSTID Root Bridge ID ExtPathCost IntPathCost Root Port
0 0.000f-e200-0100 200 200 Ethernet0/4/0
3 0.000f-e200-0600 0 0
通过观察,发现,SW3、SW4、SW5的Vlan30(instance 3)的Root桥在SW6;
SW3、SW4\SW5的 其他所有Vlan(默认instance0)的Root桥在SW3;SW3的instance 0的根桥在SW1;为什么?

通过最后实验分析,发现如果当SW1、SW2上没有instance 3的配置信息是,SW4\SW5将SW5作为master root设备;
disp stp instance 3
——-[MSTI 3 Global Info]——-
MSTI Bridge ID :32768.000f-e200-0400
MSTI RegRoot/IRPC :0.000f-e200-0600 / 200
MSTI RootPortId :128.8
Master Bridge :32768.000f-e200-0300 这是为什么?
Cost to Master :400
TC received :14
Time since last TC :0 days 0h:2m:33s

MST域(Multiple Spanning Tree Regions,多生成树域)是由交换网络中的多台设备以及它们之间的网段所构成。这些设备具有下列特点:
l 都启动了MSTP;
l 具有相同的域名;
l 具有相同的VLAN到生成树实例映射配置;
l 具有相同的MSTP修订级别配置;
l 这些设备之间在物理上有链路连通。
http://www.h3c.com/cn/d_200805/605864_30003_0.htm

如果不能同时满足上述条件,则会将网络划分多个区域。

MSTP的基本原理
MSTP将整个二层网络划分为多个MST域,各个域之间通过计算生成CST;域内则通过计算生成多棵生成树,每棵生成树都被称为是一个多生成树实例。其中实例0被称为IST,其它的多生成树实例为MSTI。MSTP同STP一样,使用配置消息进行生成树的计算,只是配置消息中携带的是设备上MSTP的配置信息。
(1) CIST生成树的计算
通过比较配置消息后,在整个网络中选择一个优先级最高的设备作为CIST的根桥。在每个MST域内MSTP通过计算生成IST;同时MSTP将每个MST域作为单台设备对待,通过计算在域间生成CST。CST和IST构成了整个网络的CIST。
(2) MSTI的计算
在MST域内,MSTP根据VLAN和生成树实例的映射关系,针对不同的VLAN生成不同的生成树实例。每棵生成树独立进行计算,计算过程与STP计算生成树的过程类似,请参见“STP的基本原理”。
MSTP中,一个VLAN报文将沿着如下路径进行转发:
l 在MST域内,沿着其对应的MSTI转发;
l 在MST域间,沿着CST转发。

发表评论

电子邮件地址不会被公开。 必填项已用*标注