MSTP实例应用

MSTP实例应用_第1张图片
思路如下
先用VTP将交换机上的 R1-R4 都写上VLAN 2 VLAN4 (注意使用vtp 将模式修改为透明模式)
这里使用负载分流
SW1与SW2之间做channel(最好现将接口关闭再配置 因为默认有生成树 可能会将接口阻塞)

sw1#show run int e0/2
interface Ethernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 1 mode on


MST 配置
sw1#show run | b mst
spanning-tree mode mst
spanning-tree extend system-id
!
spanning-tree mst configuration
name cisco
revision 1
instance 2 vlan 2
instance 3 vlan 3
!
spanning-tree mst 2 priority 0
spanning-tree mst 3 priority 4096


sw1#show spanning-tree mst 2

MST2 vlans mapped: 2

Bridge address aabb.cc00.1000 priority 2 (0 sysid 2)
Root this switch for MST2

Interface Role Sts Cost Prio.Nbr Type


Et0/0 Desg FWD 2000000 128.1 P2p
Et0/1 Desg FWD 2000000 128.2 P2p
Po1 Desg FWD 1000000 128.65 P2p

SW1 为VLAN2的根


sw2#show spanning-tree mst 3

MST3 vlans mapped: 3

Bridge address aabb.cc00.2000 priority 3 (0 sysid 3)
Root this switch for MST3

Interface Role Sts Cost Prio.Nbr Type


Et0/0 Desg FWD 2000000 128.1 P2p
Et0/1 Desg FWD 2000000 128.2 P2p
Po1 Desg FWD 1000000 128.65 P2p
SW2 是VLAN3 的根


测试SW1 Ping SW3
sw1#ping 10.0.0.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.3, timeout is 2 seconds:
.!!!!


拓展思考
如果在SW1 e0/0上配置
sw1(config-if)#switchport trunk allowed vlan 3
sw3 ping sw1 还能ping通吗

答案是可以的 因为
生成树判断一个数据通信时 是用BPDU中 Extend System ID 字段去判断的

你可能感兴趣的:(MSTP实例应用)