实验6 MSTP

实验任务一:MSTP的配置
1.建立物理连接

2.在交换机上配置MSTP
[SWA]stp mode mstp
[SWA]stp region-configuration //进入区域配置视图
[SWA-mst-region]region-name example//配置域名
//配置VLNA和实例的映射
[SWA-mst-region]instance 2 vlan 2
[SWA-mst-region]instance 3 vlan 3
[SWA-mst-region]instance 4 vlan 4
[SWA-mst-region]revision-level 0//配置修订级别
[SWA-mst-region]active region-configuration//激活区域配置

SWB,SWC,SWD进行同样的配置。

[SWA]vlan 2 to 4
[SWA]int rang ge 1/0/1 to ge 1/0/2
[SWA-if-range]port link-type trunk
[SWA-if-range]port trunk permit vlan 1 to 4
[SWA]int ge 1/0/4
[SWA-GigabitEthernet1/0/4]port link-type trunk
[SWA-GigabitEthernet1/0/4]port trunk per vlan 1 to 4
[SWA]int rang ge 1/0/1 to ge 1/0/2
其他交换机进行同样的配置

[SWC-GigabitEthernet1/0/1]port access vlan 2
[SWC-GigabitEthernet1/0/1]stp edged-port
[SWD-GigabitEthernet1/0/1]port access vlan 2
[SWD-GigabitEthernet1/0/1]stp edged-port
3查看网络中的根桥。
[SWA]display stp root
MST ID Root Bridge ID ExtPathCost IntPathCost Root Port
0 32768.a835-4ead-0100 0 0
2 32768.a835-4ead-0100 0 0
3 32768.a835-4ead-0100 0 0
4 32768.a835-4ead-0100 0 0
4.查看个交换机端口的stp状态和角色
[SWA]display stp brief
MST ID Port Role STP State Protection
0 GigabitEthernet1/0/1 DESI FORWARDING NONE
0 GigabitEthernet1/0/2 DESI FORWARDING NONE
0 GigabitEthernet1/0/4 DESI FORWARDING NONE
2 GigabitEthernet1/0/1 DESI FORWARDING NONE
2 GigabitEthernet1/0/2 DESI FORWARDING NONE
2 GigabitEthernet1/0/4 DESI FORWARDING NONE
3 GigabitEthernet1/0/1 DESI FORWARDING NONE
3 GigabitEthernet1/0/2 DESI FORWARDING NONE
3 GigabitEthernet1/0/4 DESI FORWARDING NONE
4 GigabitEthernet1/0/1 DESI FORWARDING NONE
4 GigabitEthernet1/0/2 DESI FORWARDING NONE
4 GigabitEthernet1/0/4 DESI FORWARDING NONE
查看SWD端口信息如下。
[SWD]display stp brief
MST ID Port Role STP State Protection
0 GigabitEthernet1/0/1 DESI FORWARDING NONE
0 GigabitEthernet1/0/2 ALTE DISCARDING NONE
0 GigabitEthernet1/0/3 ALTE DISCARDING NONE
0 GigabitEthernet1/0/4 ROOT FORWARDING NONE
2 GigabitEthernet1/0/1 DESI FORWARDING NONE
2 GigabitEthernet1/0/2 ALTE DISCARDING NONE
2 GigabitEthernet1/0/3 ALTE DISCARDING NONE
2 GigabitEthernet1/0/4 ROOT FORWARDING NONE
3 GigabitEthernet1/0/2 ALTE DISCARDING NONE
3 GigabitEthernet1/0/3 ALTE DISCARDING NONE
3 GigabitEthernet1/0/4 ROOT FORWARDING NONE
4 GigabitEthernet1/0/2 ALTE DISCARDING NONE
4 GigabitEthernet1/0/3 ALTE DISCARDING NONE
4 GigabitEthernet1/0/4 ROOT FORWARDING NONE

[SWB]stp instance 2 root primary
[SWC]stp instance 3 root primary
[SWD]stp instance 4 root primary
4.查看当前各实例的根桥。
[SWD]display stp root
MST ID Root Bridge ID ExtPathCost IntPathCost Root Port
0 32768.a835-4ead-0100 0 20 GE1/0/4
2 0.a835-565d-0200 0 20 GE1/0/2
3 0.a835-5acb-0300 0 20 GE1/0/3
4 0.a835-5fc1-0400 0 0
可以看出 [SWx]stp instance x root primary 可以让当前桥id的优先级变为0。

[SWD]display stp brief
MST ID Port Role STP State Protection
0 GigabitEthernet1/0/1 DESI FORWARDING NONE
0 GigabitEthernet1/0/2 ALTE DISCARDING NONE
0 GigabitEthernet1/0/3 ALTE DISCARDING NONE
0 GigabitEthernet1/0/4 ROOT FORWARDING NONE
2 GigabitEthernet1/0/1 DESI FORWARDING NONE
2 GigabitEthernet1/0/2 ROOT FORWARDING NONE
2 GigabitEthernet1/0/3 ALTE DISCARDING NONE
2 GigabitEthernet1/0/4 ALTE DISCARDING NONE
3 GigabitEthernet1/0/2 ALTE DISCARDING NONE
3 GigabitEthernet1/0/3 ROOT FORWARDING NONE
3 GigabitEthernet1/0/4 ALTE DISCARDING NONE
4 GigabitEthernet1/0/2 DESI FORWARDING NONE
4 GigabitEthernet1/0/3 DESI FORWARDING NONE
4 GigabitEthernet1/0/4 DESI FORWARDING NONE

可以看出为不同的实例指定不同根桥,不同VLAN的数据流将走不同的路径,从而实现不同VLAN数据流量的负载分担。

[SWD]display stp
-------[CIST Global Info][Mode MSTP]-------
Bridge ID : 32768.a835-5fc1-0400
Bridge times : Hello 2s MaxAge 20s FwdDelay 15s MaxHops 20
Root ID/ERPC : 32768.a835-4ead-0100, 0
RegRoot ID/IRPC : 32768.a835-4ead-0100, 20
RootPort ID : 128.5
BPDU-Protection : Disabled
Bridge Config-
Digest-Snooping : Disabled
TC or TCN received : 24
Time since last TC : 0 days 0h:22m:16s
----[Port2(GigabitEthernet1/0/1)][FORWARDING]----
Port protocol : Enabled
Port role : Designated Port
Port ID : 128.2
Port cost(Legacy) : Config=auto, Active=20
Desg.bridge/port : 32768.a835-5fc1-0400, 128.2
Port edged : Config=enabled, Active=enabled
Point-to-Point : Config=auto, Active=true
Transmit limit : 10 packets/hello-time
TC-Restriction : Disabled
Role-Restriction : Disabled
Protection type : Config=none, Active=none
MST BPDU format : Config=auto, Active=802.1s
Port Config-
Digest-Snooping : Disabled
Rapid transition : False
Num of VLANs mapped : 0
Port times : Hello 2s MaxAge 20s FwdDelay 15s MsgAge 0s RemHops 19
BPDU sent : 688
TCN: 0, Config: 0, RST: 0, MST: 688
BPDU received : 0
TCN: 0, Config: 0, RST: 0, MST: 0

----[Port3(GigabitEthernet1/0/2)][DISCARDING]----
Port protocol : Enabled
Port role : Alternate Port
Port ID : 128.3
Port cost(Legacy) : Config=auto, Active=20
Desg.bridge/port : 32768.a835-565d-0200, 128.3
Port edged : Config=disabled, Active=disabled
Point-to-Point : Config=auto, Active=true
Transmit limit : 10 packets/hello-time
TC-Restriction : Disabled
Role-Restriction : Disabled
Protection type : Config=none, Active=none
MST BPDU format : Config=auto, Active=802.1s
Port Config-
Digest-Snooping : Disabled
Rapid transition : False
Num of VLANs mapped : 1
Port times : Hello 2s MaxAge 20s FwdDelay 15s MsgAge 0s RemHops 19
BPDU sent : 178
TCN: 0, Config: 0, RST: 0, MST: 178
BPDU received : 705
TCN: 0, Config: 0, RST: 0, MST: 705

----[Port4(GigabitEthernet1/0/3)][DISCARDING]----
Port protocol : Enabled
Port role : Alternate Port
Port ID : 128.4
Port cost(Legacy) : Config=auto, Active=20
Desg.bridge/port : 32768.a835-5acb-0300, 128.4
Port edged : Config=disabled, Active=disabled
Point-to-Point : Config=auto, Active=true
Transmit limit : 10 packets/hello-time
TC-Restriction : Disabled
Role-Restriction : Disabled
Protection type : Config=none, Active=none
MST BPDU format : Config=auto, Active=802.1s
Port Config-
Digest-Snooping : Disabled
Rapid transition : True
Num of VLANs mapped : 1
Port times : Hello 2s MaxAge 20s FwdDelay 15s MsgAge 0s RemHops 19
BPDU sent : 146
TCN: 0, Config: 0, RST: 0, MST: 146
BPDU received : 705
TCN: 0, Config: 0, RST: 0, MST: 705

----[Port5(GigabitEthernet1/0/4)][FORWARDING]----
Port protocol : Enabled
Port role : Root Port
Port ID : 128.5
Port cost(Legacy) : Config=auto, Active=20
Desg.bridge/port : 32768.a835-4ead-0100, 128.5
Port edged : Config=disabled, Active=disabled
Point-to-Point : Config=auto, Active=true
Transmit limit : 10 packets/hello-time
TC-Restriction : Disabled
Role-Restriction : Disabled
Protection type : Config=none, Active=none
MST BPDU format : Config=auto, Active=802.1s
Port Config-
Digest-Snooping : Disabled
Rapid transition : True
Num of VLANs mapped : 1
Port times : Hello 2s MaxAge 20s FwdDelay 15s MsgAge 0s RemHops 20
BPDU sent : 150
TCN: 0, Config: 0, RST: 0, MST: 150
BPDU received : 700
TCN: 0, Config: 0, RST: 0, MST: 700

CIST的参数包含CIST总根,外部路径开销,IST根桥,内部路径开销,CIST根端口等
MST实例的参数包含

  1. 全局参数包含域根桥ID,Mater桥ID,域根端口ID和达到域根的路径开销等信息。
  2. 端口参数包含端口在该实例中的端口角色,端口优先级,指定端口等信息。

注:MST实例的流量,均通过Master端口到达域外。各个实例进行计算时,只需要产生一种BPDU,其中包含了CIST计算参数和MST计算参数,当CIST计算完成时,各个MST实例也计算完成。

posted @ 2019-07-07 22:28  Akiz  阅读(930)  评论(0)    收藏  举报