1. 程式人生 > >STP配置命令

STP配置命令

之前已經講了STP演算法,這一篇講命令

1、檢視STP

SW1#sh spanning-tree

VLAN0001

Spanning tree enabled protocol ieee

Root ID Priority 4097

Address 0090.21BD.4AE6

This bridge is the root //RB才會有這句話

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 4097 (priority 4096 sys-id-ext 1)

Address 0090.21BD.4AE6

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

2、修改SW優先順序

SW1(config)#spanning-tree vlan 1 priority 12345

% Bridge Priority must be in increments of 4096.

% Allowed values are:

0 4096 8192 12288 16384 20480 24576 28672

32768 36864 40960 45056 49152 53248 57344 61440

SW1(config)#spanning-tree vlan 1 priority 4096

如果優先順序寫錯了,他會提示你必須是4096的倍數。

3、修改埠優先順序


這張圖上一篇部落格已經講過了,那如果我想讓Switch4的F0/1口通,阻塞F0/2口,那我應該調整的就是Switch3的埠ID,不懂的可以看一下前一篇

Switch(config-if)#spanning-tree vlan 1 port-priority 64

補充提示:

Switch(config-if)#spanning-tree vlan 1 port-priority ?

<0-240> port priority in increments of 16

注意是16的倍數