当Cost和BID相同时,在STP中识别指定端口?

网络工程 生成树
2021-07-06 12:31:29

我在如何确定哪个端口将被阻止以及哪个将被指定时遇到了麻烦,因为这些端口的 BID 和成本是相同的。

现在对于第一个端口,输出 show spanning-tree是,

Spanning tree enabled protocol rstp
Root ID Priority 24984
Address 00D0.58AC.C607
Cost 9
Port 28(Port-channel 2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 33176 (priority 32768 sys-id-ext 408)
Address 0001.43C6.4D81  
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
Po1       Desg FWD  9   128.27   Shr
Po2       Root FWD  9   128.28   Shr

其次,输出是,

Spanning tree enabled protocol rstp
Root ID Priority 24984
Address 00D0.58AC.C607
Cost 9
Port 28(Port-channel 2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 33176 (priority 32768 sys-id-ext 408)
Address 0002.16C9.4B1D 
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
Po1       Altn BLK  9   128.27   Shr
Po2       Root FWD  9   128.28   Shr

在这两种情况下的成本9BID端口的是33176,因为两者都使用相同的VLAN号,但是怎么来的第一个被指定为designated另一种是blocked

我的理解是它取决于较低的 MAC 地址,但是show spanning-tree命令如何在两个端口中显示两个地址,即

Address 00D0.58AC.C607  (same in both ports),

另一个在两个端口上都不同,

端口 1,

Bridge ID Priority 33176 (priority 32768 sys-id-ext 408)
Address 0001.43C6.4D81  

端口2,

Bridge ID Priority 33176 (priority 32768 sys-id-ext 408)
Address 0002.16C9.4B1D 

有人可以解释为什么每个端口有两个不同的地址,如果成本和 BID 相同,生成树实际上是使用地址计算指定端口吗?

1个回答

正如 Ricky 所说,第一个地址是根 ID:

Root ID Priority 24984 
Address 00D0.58AC.C607

第二个本地网桥ID:

Bridge ID Priority 33176 (priority 32768 sys-id-ext 408)
Address 0001.43C6.4D81

或者

Bridge ID Priority 33176 (priority 32768 sys-id-ext 408)
Address 0002.16C9.4B1D

全桥 ID 由优先级和 MAC 地址组成,因此它是 33176.0001.43C6.4D81 或 33176.0002.16C9.4B1D(对于混合基数表示歉意)。因此,永远不应该有不同桥梁的联系。