网工实验——MSTP生成树

1.网络拓扑图

网工实验——MSTP生成树_第1张图片

2.相关配置

2.1配置switchA的MST配置

system-view

sysname switchA

stp region-configuration #创建生成树实例

region-name RG1 #为实例命名

instance 1 vlan 2 to 10

instance 2 vlan 11 to 20

active region-configuration #激活实例

quit

剩下的switchB,C,D的MST配置与上面相同

2.2在域RG1内,配置MST1与MST2的根桥与备份根桥

配置MST1的根桥与备份根桥

配置switchA为MST1的根桥

stp instance 1 root primary

配置switchB为MST1的备份根桥

stp instance 1 root secondary

配置MST2的根桥与备份根桥

配置switchB为MST2的根桥

stp instance 2 root primary

配置switchA为MST2的备份根桥

stp instance 2 root secondary 

2.3配置保护功能,如在各实例的根桥设备的指定端口配置根保护功能

switchA对应端口启动根保护(要根据拓扑图找对应端口)

int g0/0/2

stp root-protection 

quit

switchB也是相同配置

2.4为每个交换机创建VLAN

每台交换机都一样

vlan batch 2 to 20

为每台交换机的接口透传

port-group group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/2
#同时对两个接口进行操作


port link-type trunk

port trunk allow-pass vlan 2 to 20

switchC和D配置access

switchC

int g0/0/3

port link-type access

port default vlan 2

switchD

int g0/0/3

port link-type access 

port default vlan 11

2.5认证

以switchC为例子

dis stp brief

网工实验——MSTP生成树_第2张图片

你可能感兴趣的:(网络)