单域MSTP配置实验

 
一、网络拓扑图

 

二、规划终端IP

三、交换机的配置

 

 1 LSW1
 2 <Huawei>sys
 3 [Huawei]undo info-center enable //可以不用写这行
 4 [Huawei]sysname Lsw1
 5 [Lsw1]vlan batch 2 3
 6 [Lsw1]int g0/0/1
 7 [Lsw1-GigabitEthernet0/0/1]port link-type trunk    
 8 [Lsw1-GigabitEthernet0/0/1]port trunk allow-pass vlan 2 3
 9 [Lsw1-GigabitEthernet0/0/1]quit 
10 [Lsw1]int g0/0/2   
11 [Lsw1-GigabitEthernet0/0/2]port link-type trunk
12 [Lsw1-GigabitEthernet0/0/2]port trunk allow-pass vlan 2 3
13 [Lsw1-GigabitEthernet0/0/2]quit
14 [Lsw1]int g0/0/3
15 [Lsw1-GigabitEthernet0/0/3]port link-type trunk
16 [Lsw1-GigabitEthernet0/0/3]port trunk allow-pass vlan 2 3
17 [Lsw1-GigabitEthernet0/0/3]quit
18 [Lsw1]stp mode mstp    
19 [Lsw1]stp region-configuration   
20 [Lsw1-mst-region]region-name aaa 
21 [Lsw1-mst-region]instance 2 vlan 2
22 [Lsw1-mst-region]instance 3 vlan 3 
23 [Lsw1-mst-region]active region-configuration 
24 [Lsw1-mst-region]quit   
25 [Lsw1]stp instance 2 priority 4096 
26 [Lsw1]stp instance 3 priority 8192
27 [Lsw1]

 

 

 1 LWS2
 2 <Huawei>sys
 3 [Huawei]undo info-center enable //可以不用写这行
 4 [Huawei]sysname Lsw1
 5 [Lsw2]vlan batch 2 3
 6 [Lsw2]int g0/0/1
 7 [Lsw2-GigabitEthernet0/0/1]port link-type trunk    
 8 [Lsw2-GigabitEthernet0/0/1]port trunk allow-pass vlan 2 3
 9 [Lsw2-GigabitEthernet0/0/1]quit 
10 [Lsw2]int g0/0/2   
11 [Lsw2-GigabitEthernet0/0/2]port link-type trunk
12 [Lsw2-GigabitEthernet0/0/2]port trunk allow-pass vlan 2 3
13 [Lsw2-GigabitEthernet0/0/2]quit
14 [Lsw2]int g0/0/3
15 [Lsw2-GigabitEthernet0/0/3]port link-type trunk
16 [Lsw2-GigabitEthernet0/0/3]port trunk allow-pass vlan 2 3
17 [Lsw2-GigabitEthernet0/0/3]quit
18 [Lsw2]stp mode mstp    
19 [Lsw2]stp region-configuration   
20 [Lsw2-mst-region]region-name aaa 
21 [Lsw2-mst-region]instance 2 vlan 2
22 [Lsw2-mst-region]instance 3 vlan 3 
23 [Lsw2-mst-region]active region-configuration 
24 [Lsw2-mst-region]quit   
25 [Lsw2]stp instance 2 priority 8192
26 [Lsw2]stp instance 3 priority 4096
27 [Lsw2]

 

 1 LSW3
 2 <Huawei>sys
 3 [Huawei]undo info-center enable
 4 [Huawei]sysname LSW3
 5 [LSW3]vlan batch 2 3
 6 [LSW3]int g0/0/1
 7 [LSW3-GigabitEthernet0/0/1]port link-type access
 8 [LSW3-GigabitEthernet0/0/1]port default vlan 2
 9 [LSW3-GigabitEthernet0/0/1]quit
10 [LSW3]int g0/0/2
11 [LSW3-GigabitEthernet0/0/2]port link-type access
12 [LSW3-GigabitEthernet0/0/2]port default vlan 3
13 [LSW3-GigabitEthernet0/0/2]quit
14 [LSW3]int g0/0/3  
15 [LSW3-GigabitEthernet0/0/3]port link-type trunk    
16 [LSW3-GigabitEthernet0/0/3]port trunk allow-pass vlan 2 3
17 [LSW3-GigabitEthernet0/0/3]quit
18 [LSW3]int g0/0/4
19 [LSW3-GigabitEthernet0/0/4]port link-type trunk
20 [LSW3-GigabitEthernet0/0/4]port trunk allow-pass vlan 2 3
21 [LSW3-GigabitEthernet0/0/4]quit
22 [LSW3]stp mode mstp
23 [LSW3]stp region-configuration 
24 [LSW3-mst-region]region-name aaa
25 [LSW3-mst-region]instance 2 vlan 2
26 [LSW3-mst-region]instance 3 vlan 3 
27 [LSW3-mst-region]active region-configuration

 

 1 LSW4
 2 <Huawei>sys
 3 [Huawei]undo info-center enable
 4 [Huawei]sysname LSW4
 5 [LSW4]vlan batch 2 3
 6 [LSW4]int g0/0/1
 7 [LSW4-GigabitEthernet0/0/1]port link-type access
 8 [LSW4-GigabitEthernet0/0/1]port default vlan 2
 9 [LSW4-GigabitEthernet0/0/1]quit
10 [LSW4]int g0/0/2
11 [LSW4-GigabitEthernet0/0/2]port link-type access
12 [LSW4-GigabitEthernet0/0/2]port default vlan 3
13 [LSW4-GigabitEthernet0/0/2]quit
14 [LSW4]int g0/0/3  
15 [LSW4-GigabitEthernet0/0/3]port link-type trunk    
16 [LSW4-GigabitEthernet0/0/3]port trunk allow-pass vlan 2 3
17 [LSW4-GigabitEthernet0/0/3]quit
18 [LSW4]int g0/0/4
19 [LSW4-GigabitEthernet0/0/4]port link-type trunk
20 [LSW4-GigabitEthernet0/0/4]port trunk allow-pass vlan 2 3
21 [LSW4-GigabitEthernet0/0/4]quit
22 [LSW4]stp mode mstp
23 [LSW4]stp region-configuration 
24 [LSW4-mst-region]region-name aaa
25 [LSW4-mst-region]instance 2 vlan 2
26 [LSW4-mst-region]instance 3 vlan 3 
27 [LSW4-mst-region]active region-configuration 

 

四、终端互ping

这里只用了终端A去ping其他三台终端,还可以用其他终端去互ping,这里就不一 一列举了

五、其他

1.数据抓包,可以查看他是走的哪条通道

2.可以尝试断开某根线路后继续去ping

 

posted @ 2022-11-24 10:37  小峰-xf  阅读(370)  评论(0编辑  收藏  举报