拓扑
配置多实例生成树,使同VLAN之间采用最优路径通信且不环路
TRUNK,ACCESS基础配置
LSW1
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 8 to 9
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 8 to 9
#
interface GigabitEthernet0/0/4
port link-type access
port default vlan 8
LSW2
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 8 to 9
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 8 to 9
#
interface GigabitEthernet0/0/4
port link-type access
port default vlan 9
LSW3
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 9
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 8 to 9
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 8 to 9
#
interface GigabitEthernet0/0/4
port link-type access
port default vlan 8
#
interface GigabitEthernet0/0/5
port link-type access
port default vlan 9
MSTP配置
LSW1
[LSW1]stp mode mstp
#
stp region-configuration
region-name gls
revision-level 1
instance 1 vlan 8
instance 2 vlan 9
active region-configuration
[LSW1]stp instance 1 priority 0
[LSW1]stp instance 2 priority 4096
LSW2
[LSW2]stp mode mstp
#
stp region-configuration
region-name gls
revision-level 1
instance 1 vlan 8
instance 2 vlan 9
active region-configuration
[LSW2]stp instance 1 priority 4096
[LSW2]stp instance 2 priority 0
LSW3
[LSW3]stp mode mstp
#
stp region-configuration
region-name gls
revision-level 1
instance 1 vlan 8
instance 2 vlan 9
active region-configuration
MSTP验证
LSW3
[LSW3]dis stp instance 1 brief
MSTID Port Role STP State Protection
1 GigabitEthernet0/0/2 ROOT FORWARDING NONE
1 GigabitEthernet0/0/3 ALTE DISCARDING NONE
1 GigabitEthernet0/0/4 DESI FORWARDING NONE
[LSW3]dis stp instance 2 b
MSTID Port Role STP State Protection
2 GigabitEthernet0/0/2 ALTE DISCARDING NONE
2 GigabitEthernet0/0/3 ROOT FORWARDING NONE
2 GigabitEthernet0/0/5 DESI FORWARDING NONE
连通性测试
PC3 ping PC1
LSW3的GE0/0/2抓包
PC>ping 192.168.1.1
Ping 192.168.1.1: 32 data bytes, Press Ctrl_C to break
From 192.168.1.1: bytes=32 seq=1 ttl=128 time=62 ms
--- 192.168.1.1 ping statistics ---
1 packet(s) transmitted
1 packet(s) received
0.00% packet loss
round-trip min/avg/max = 62/62/62 ms
PC4 ping PC2
LS3的GE0/0/3抓包
PC>ping 192.168.1.2
Ping 192.168.1.2: 32 data bytes, Press Ctrl_C to break
From 192.168.1.2: bytes=32 seq=1 ttl=128 time=79 ms
From 192.168.1.2: bytes=32 seq=2 ttl=128 time=63 ms
--- 192.168.1.2 ping statistics ---
2 packet(s) transmitted
2 packet(s) received
0.00% packet loss
round-trip min/avg/max = 63/71/79 ms
标签:23,MSTP,vlan,GigabitEthernet0,instance,实验,trunk,stp,port
From: https://www.cnblogs.com/Metkey/p/17841165.html