思科交换机关于MSTP的配置命令
展开全部
1、首先我们按着如下图所示搭建一个实验的拓扑图。
2、按着上面的拓扑图我们首先配置接入层交换机的基本配置信息,如下图所示先将接入的PC的接口配置好。
3、将一台接入层 交换机和两台核心交换机的生成树模式都修改为MSTP多实例生成树模式。
4、接着我们就需要配置三台交换机之间的链路模式以及封装了,如下图所示在两两之间相连的线路上都需配置成TRUNK模式。
5、在核心交换机上运行VTP协议,是的三个交换机VLAN 信息可以同步。
6、我们设计将VLAN 10,VLAN 20分到一个实例12中,将VLAN 30,VLAN 40分到另一个实例34中,如下图所示我们开始配置MSTP。
7、现在我们来查看接入层交换机的生成树状态,如下图所示我们可以看在实例12中交换机的E0/1口为AP,在实例34中交换机的E0/0口为AP,实现了互为主备的关系,让交换网络实现的负载均衡。
展开全部
(config)#spanning-tree mode mst //启用MST,默认为PVST+
(config)#spanning-tree mst configuration //进入MST配置模式
(config-mst)#name test //注意交换机之间的实例Name要相同,不然会出现各自说自己是根桥.
(config-mst)#instance 1 vlan 2,3
(config-mst)#instance 2 vlan 4,14 //配置实例包括的Vlan,关于Vlan,VTP,Trunk配置这里不提了.
(config-if-range)#spanning-tree mst 1 port-priority 96
(config-if-range)#spanning-tree mst 2 port-priority 160 //MST端口优先级,我们要让3750成为vlan 2,3的根桥,3560成vlan 4,14 的根桥,默认端口优先级为128,+/-16.
或者
(config)#spanning-tree mst 1 root primary
(config)#spanning-tree mst 2 root secondary
(config)#spanning-tree mst 2 root primary
(config)#spanning-tree mst 1 root secondary
结果如下:
#sh spanning-tree
MST0
Spanning tree enabled protocol mstp
Root ID Priority 32768
Address 0013.c342.f100
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768 (priority 32768 sys-id-ext 0)
Address 0013.c342.f100
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi2/0/1 Desg FWD 20000 128.55 P2p
Gi2/0/2 Desg FWD 20000 128.56 P2p
MST1
Spanning tree enabled protocol mstp
Root ID Priority 24577
Address 0013.c342.f100
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 24577 (priority 24576 sys-id-ext 1)
Address 0013.c342.f100
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi2/0/1 Desg FWD 20000 96.55 P2p
Gi2/0/2 Desg FWD 20000 96.56 P2p
MST2
Spanning tree enabled protocol mstp
Root ID Priority 24578
Address 0024.f935.7a00
Cost 20000
Port 55 (GigabitEthernet2/0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 28674 (priority 28672 sys-id-ext 2)
Address 0013.c342.f100
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi2/0/1 Root FWD 20000 160.55 P2p
Gi2/0/2 Altn BLK 20000 160.56 P2p
(config)#spanning-tree mst configuration //进入MST配置模式
(config-mst)#name test //注意交换机之间的实例Name要相同,不然会出现各自说自己是根桥.
(config-mst)#instance 1 vlan 2,3
(config-mst)#instance 2 vlan 4,14 //配置实例包括的Vlan,关于Vlan,VTP,Trunk配置这里不提了.
(config-if-range)#spanning-tree mst 1 port-priority 96
(config-if-range)#spanning-tree mst 2 port-priority 160 //MST端口优先级,我们要让3750成为vlan 2,3的根桥,3560成vlan 4,14 的根桥,默认端口优先级为128,+/-16.
或者
(config)#spanning-tree mst 1 root primary
(config)#spanning-tree mst 2 root secondary
(config)#spanning-tree mst 2 root primary
(config)#spanning-tree mst 1 root secondary
结果如下:
#sh spanning-tree
MST0
Spanning tree enabled protocol mstp
Root ID Priority 32768
Address 0013.c342.f100
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768 (priority 32768 sys-id-ext 0)
Address 0013.c342.f100
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi2/0/1 Desg FWD 20000 128.55 P2p
Gi2/0/2 Desg FWD 20000 128.56 P2p
MST1
Spanning tree enabled protocol mstp
Root ID Priority 24577
Address 0013.c342.f100
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 24577 (priority 24576 sys-id-ext 1)
Address 0013.c342.f100
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi2/0/1 Desg FWD 20000 96.55 P2p
Gi2/0/2 Desg FWD 20000 96.56 P2p
MST2
Spanning tree enabled protocol mstp
Root ID Priority 24578
Address 0024.f935.7a00
Cost 20000
Port 55 (GigabitEthernet2/0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 28674 (priority 28672 sys-id-ext 2)
Address 0013.c342.f100
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi2/0/1 Root FWD 20000 160.55 P2p
Gi2/0/2 Altn BLK 20000 160.56 P2p
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询