【CCNA】实验之stp生成树

我们先看下具体阻塞信息:

看到阻塞的接口确实如题目所说,在sw3上的e0/1接口上,我们来分析下,这三个目前默认的优先级都是一致的,sw3的e0/1接口block的主要原因是在找指定端口的时候,连接sw3和sw2的这条链路的在sw3这端的接口发出的设备mac地址优先级要地狱sw2的那个口,所以被阻塞了。如果要调整阻塞端口,只能调整优先级。如果说我们把sw3的优先级调高,那么因为现在三个设备的优先级都是一样的,sw3一调高,那么也会比sw1高,那么根桥就变了,题目要求根桥不能变,那我们只能将sw2的优先级调低。

发现调完等一会就变过来了。

还原配置:

SW2#conf t 
Enter configuration commands, one per line.  End with CNTL/Z.
SW2(config)#no span
SW2(config)#no spanning-tree vlan
SW2(config)#no spanning-tree vlan 1 pri
SW2(config)#no spanning-tree vlan 1 priority 
SW2(config)#end
SW2#
*Aug 19 12:30:39.193: %SYS-5-CONFIG_I: Configured from console by console
SW2#show span
SW2#show spanning-tree 

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     aabb.cc00.1d00
             Cost        100
             Port        1 (Ethernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     aabb.cc00.2d00
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  15  sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Root FWD 100       128.1    Shr 
Et0/1               Desg LIS 100       128.2    Shr 
Et0/2               Desg FWD 100       128.3    Shr 
Et0/3               Desg FWD 100       128.4    Shr 


SW2#show spanning-tree 

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     aabb.cc00.1d00
             Cost        100
             Port        1 (Ethernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     aabb.cc00.2d00
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  15  sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Root FWD 100       128.1    Shr 
Et0/1               Desg LRN 100       128.2    Shr 
Et0/2               Desg FWD 100       128.3    Shr 
Et0/3               Desg FWD 100       128.4    Shr 

SW2#show spanning-tree 

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     aabb.cc00.1d00
             Cost        100
             Port        1 (Ethernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     aabb.cc00.2d00
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  15  sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Root FWD 100       128.1    Shr 
Et0/1               Desg FWD 100       128.2    Shr 
Et0/2               Desg FWD 100       128.3    Shr 
Et0/3               Desg FWD 100       128.4    Shr 


SW2#

还原后看到sw2的e0/1接口由block变为listen,然后变为learn,最后变为正常的转发。

阻塞又回到了sw3的e0/1接口

下面我们来分析下第二题,因为要求在阻塞sw2的e0/0接口,因为sw2的e0/0接口是在root接口上选定的,因为三个设备优先级相同,cost相同,而他竞争成为sw2的root接口是因为它接收的设备的mac地址小,优先级高。所以要破除这种优势,两个方面提升,调优先级和调cost。调优先级只能调sw1的,如果优先级数字调大可以解决这个问题,但是root根桥变了,数字调小又不解决问题,所以最好的办法就是调整到这个端口的cost:

要等一会才会变过来:

猜你喜欢

转载自blog.csdn.net/kadwf123/article/details/81841310
今日推荐