求Cisco交换机STP(生成树协议)具体配置实例

2024-12-21 12:30:09
推荐回答(1个)
回答1:

3台交换机,拓扑就不画了。只是注意下端口,用f0/1 - 3。
交换机比较少,直接在三个交换机输入命令,创建vlan 2
开始命令基本一样
Switch>en
Switch#vlan d
Switch(vlan)#vlan 2
Switch(vlan)#^Z
Switch#conf t
Switch(config)#int r
Switch(config)#int range f0/1 - 3
Switch(config-if-range)#sw mode t
Switch(config-if-range)#no shutdown

至此,vlan 2 在三台上设置好了,在SW1上设置vlan2 的根网桥
SW1#conf terminal
SW1(config)#spanning-tree vlan 2 root primary
SW1(config)#^Z
设置好了,查看
SW1#show spanning-tree vlan 2
VLAN0002
Spanning tree enabled protocol ieee
Root ID Priority 24578
Address 0009.7C82.5992
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 24578 (priority 24576 sys-id-ext 2)
Address 0009.7C82.5992
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/2 Desg FWD 19 128.2 P2p