![](https://i-blog.csdnimg.cn/blog_migrate/ce71b9ac17af0fea39208f797a86a161.png)
1.接口配置为access、trunk
SW1:
int g0/0/2
port link-type access
port default vlan 20
int g0/0/3
port link-type trunk
port trunk allow-pass vlan 10 20 30 110 120 130
SW2:
int g0/0/2
port link-type trunk
port trunk all vlan 10 20 30 110 120 130
int g0/0/3
port link-type trunk
port trunk all vlan 10 20 30 110 120 130
SW3:
int g0/0/2
port link-type access
port default vlan 20
int g0/0/1
port link-type trunk
port trunk all vlan 10 20 30 110 120 130
3.配置MSTP协议
SW1:
stp mode mstp
stp region-configuration
region-name huawei
revision-level 1
instance 1 vlan 2 3
instance 2 vlan 10 20 30
active region-configuration
SW2:
stp mode mstp
stp region-configuration
region-name huawei
revision-level 1
instance 1 vlan 2 3
instance 2 vlan 10 20 30
active region-configuration
SW3:
stp mode mstp
stp region-configuration
region-name huawei
revision-level 1
instance 1 vlan 2 3
instance 2 vlan 10 20 30
active region-configuration