现有一个内网划分有四个VLAN并开启DHCP服务自动分配地址,要求交换机配置MSTP协议实现VLAN间负债分担,充分利用冗余链路。
配置思路:
1、在交换机SW1/SW2/SW3分别启用MSTP协议。
2、将VLAN2、VLAN3分配到实例1中,流量路径为PC1/PC2---SW2---SW1;将VLAN4、VLAN5分配到实例2中,流量路径为PC3/PC4---SW3---SW1
配置开始:
SW1上:
首先创建对应VLAN并放开接口2/接口3的VLAN(SW2/SW3接口1/接口4相同配置)
vlan batch 2 to 5
interface g0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 5
interface g0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 5
在SW1上配置MSTP(SW2/SW3上MSTP配置和SW1相同)
stp enable
stp mode mstp stp模式更改为mstp
stp region-configuration 进入stp域配置
region-name s1 域名配置为s1
instance 1 vlan2 3 将VLAN2、VLAN3划分到实例1中
instance 2 vlan 4 5 将VLAN4、VLAN5划分到实例2中
active region-configuration 开启STP域模式
SW2上配置在实例1中做根桥:
stp instance 1 root primary
SW3上配置在实例2中做根桥:
stp instance 2 root primary
以上MSTP配置完成:
display stp brief 查看接口在各实例中角色状态
|