MSTP生成树实验

Posted ccshi

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MSTP生成树实验相关的知识,希望对你有一定的参考价值。

技术图片

 

1、 客户机和路由器配置ip地址

R1:

[Huawei]sysname R1

[R1]int e0/0/0

[R1-Ethernet0/0/0]ip add 10.1.10.254 24

[R1-Ethernet0/0/0]undo shutdown

[R1-Ethernet0/0/0]int e0/0/1

[R1-Ethernet0/0/1]ip add 10.1.20.254 24

[R1-Ethernet0/0/1]undo shutdown

[R1-Ethernet0/0/1]quit

 

2、 配置vlan和trunk

S1:

[Huawei]sysname S1

[S1]vlan batch 10 20

[S1]int g0/0/2

[S1-GigabitEthernet0/0/2]port link-type trunk

[S1-GigabitEthernet0/0/2]port trunk allow-pass vlan all

[S1-GigabitEthernet0/0/2]int g0/0/1

[S1-GigabitEthernet0/0/1]port link-type trunk

[S1-GigabitEthernet0/0/1]port trunk allow-pass vlan all

[S1-GigabitEthernet0/0/1]int g0/0/3

[S1-GigabitEthernet0/0/3]port link-type hybrid

[S1-GigabitEthernet0/0/3]port hybrid untagged vlan 10

[S1-GigabitEthernet0/0/3]port hybrid pvid vlan 10

[S1-GigabitEthernet0/0/3]quit

 

S2:

[Huawei]sysname S2

[S2]vlan batch 10 20

[S2]int g0/0/2

[S2-GigabitEthernet0/0/2]port link-type trunk

[S2-GigabitEthernet0/0/2]port trunk allow-pass vlan all

[S2-GigabitEthernet0/0/2]int g0/0/1

[S2-GigabitEthernet0/0/1]port link-type trunk

[S2-GigabitEthernet0/0/1]port trunk allow-pass vlan all

[S2-GigabitEthernet0/0/1]int g0/0/3

[S2-GigabitEthernet0/0/3]port link-type hybrid

[S2-GigabitEthernet0/0/3]port hybrid untagged vlan 20

[S2-GigabitEthernet0/0/3]port hybrid pvid vlan 20

[S2-GigabitEthernet0/0/3]quit

 

S3:

[Huawei]sysname S3

[S3]vlan batch 10 20

[S3]int g0/0/3

[S3-GigabitEthernet0/0/3]port link-type access

[S3-GigabitEthernet0/0/3]port default vlan 10

[S3-GigabitEthernet0/0/3]int g0/0/4

[S3-GigabitEthernet0/0/4]port link-type access

[S3-GigabitEthernet0/0/4]port default vlan 20

[S3-GigabitEthernet0/0/4]int g0/0/1

[S3-GigabitEthernet0/0/1]port link-type trunk

[S3-GigabitEthernet0/0/1]port trunk allow-pass vlan all

[S3-GigabitEthernet0/0/1]int g0/0/2

[S3-GigabitEthernet0/0/2]port link-type trunk

[S3-GigabitEthernet0/0/2]port trunk allow-pass vlan all

[S3-GigabitEthernet0/0/2]quit

 

配置MSTP

S1

[S1]stp mode mstp

[S1]stp region-configuration

[S1-mst-region]region-name huawei

[S1-mst-region]revision-level 1

[S1-mst-region]instance 1 vlan 10

[S1-mst-region]instance 2 vlan 20

[S1-mst-region]active region-configuration

[S1-mst-region]quit

[S1]stp instance 1 root primary

[S1]stp instance 2 root secondary

 

S2

[S2]stp mode mstp

[S2]stp region-configuration

[S2-mst-region]region-name huawei

[S2-mst-region]revision-level 1

[S2-mst-region]instance 1 vlan 10

[S2-mst-region]instance 2 vlan 20

[S2-mst-region]active region-configuration

[S2-mst-region]quit

[S2]stp instance 1 root secondary

[S2]stp instance 2 root primary

 

S3

[S3]stp mode mstp

[S3]stp region-configuration

[S3-mst-region]reg

[S3-mst-region]region-name huawei

[S3-mst-region]revision-level 1

[S3-mst-region]instance 1 vlan 10

[S3-mst-region]instance 2 vlan 20

[S3-mst-region]active region-configuration

[S3-mst-region]quit

 

验证:

[S3]display stp brief

 

以上是关于MSTP生成树实验的主要内容,如果未能解决你的问题,请参考以下文章

MSTP(多生成树),基础与实验

华为多实例生成树RSTP配置详解

eNSP模拟实验-MSTP多实例STP

生成树-RSTP基础配置

华为交换机之生成树协议(MSTP)配置详解

华为交换机MSTP公有生成树协议