Spanning Tree Show Komutları | Ağ Profesyonelleri İçin Bir Kılavuz

Bir ağda STP (Spanning Tree Protocol) çok önemlidir. Yayın fırtınaları (broadcast storms) gibi şeyleri bozabilecek döngüleri durdurur. Ethernet ağları için döngüsüz bir kurulum oluşturmak için akıllı matematik kullanır. Ağ yöneticileri bunu kontrol altında tutmak için farklı show komutlarını kullanır. Bu makalede, bize STP protokol kurulumu ve nasıl çalıştığı hakkında bilgi veren bazı yaygın show komutlarına göz atacağız.

Genellikle Layer 2 Switch’ler üzerinde yapılandırılan Spanning Tree Protokolünü konfigüre ettikten sonra, yapılan ayarların doğrulanması gerekebilir. Cisco Switch’leri yapılandırırken genellikle CLI komut istemini kullanırız.

STP Protokolü Show Komutları

Cisco Switch’lerde Kullandığımız Spanning Tree Protolünün (STP) Show Komutları Nelerdir?

STP’yi yapılandırdıktan sonra, hangi Switch’in Root Bridge olduğunu veya hangi Switch Blocked Porta sahip olduğunu CLI show komutları ile öğrenebiliriz. Ayrıca, bu komutlar ile PortFast, UplinkFast ve BackboneFast özelliklerini de inceleyebiliriz.

GNS3 veya Cisco Packet Tracer programını kullanarak yedekli bir ağ oluşturunuz ve Spanning Tree Protokolünün hangi işlemleri yaptığını incelemek için aşağıdaki SpanningTree show komutları’nı Switch Privileged (Ayrıcalıklı) Mod üzerinde uygulayınız.

1. Spanning-Tree ? Komutu

Bu komut, Switch üzerinde desteklenen STP protokolüne ait show komutlarını gösterir. Show spanning-tree ? komutu ile listelenen komutlardan incelemek istediğiniz özelliği seçerek ona ait çıktıları görüntüleyebilirsiniz.

Switch#show spanning-tree ?
  WORD               bridge group list, example 1,3-5,7,9
  active             Report on active interfaces only
  backbonefast       Show spanning tree backbonefast status
  blockedports       Show blocked ports
  bridge             Status and configuration of this bridge
  detail             Detailed information
  inconsistentports  Show inconsistent ports
  interface          Spanning Tree interface status and configuration
  mst                Multiple spanning trees
  pathcost           Show Spanning pathcost options
  root               Status and configuration of the root bridge
  summary            Summary of port states
  uplinkfast         Show spanning tree uplinkfast status
  vlan               VLAN Switch Spanning Trees
  |                  Output modifiers
  

Switch#show spanning-tree 

 

2. Spanning-Tree Komutu

Bu komut ile Switch üzerinde STP protokolüne ait genel bilgileri görüntüleyebilirsiniz. Switch’in Root ID (Temel Kimliği), Root Bridge (Köprü Kimliği) ve Interface (Arayüz) bağlantı noktalarını görüntüleyebilir ve Switch’in arayüzlerinin port durumlarını görüntüleyebilirsiniz.

Ayrıca, Root Bridge manuel olarak yapılandırıldıysa bu komutu kullanarak Switch’in Priority değerini inceleyebilirsiniz.

Switch#show spanning-tree 

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     0012.6620.0800
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

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

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


Switch#

 

3. Summary Komutu

Bu komut ile Cisco Switch üzerinde oluşturulan VLAN‘lara ait bağlantı durumlarını görüntüleyebilirsiniz. Ayrıca, Standart STP (PVST) protokolüne ait etkinleştirilmiş özellikleri bu komut ile görüntüleyebilirsiniz. Eğer BackboneFast yapılandırma adımlarını gerçekleştirdiyseniz, BackboneFast özelliğine ait bilgileride bu komut ile görüntüleyebilirsiniz.

Switch#show spanning-tree summary 
Switch is in pvst mode
Root bridge for: VLAN0001
Extended system ID           is enabled
Portfast Default             is disabled
PortFast BPDU Guard Default  is disabled
Portfast BPDU Filter Default is disabled
Loopguard Default            is disabled
EtherChannel misconfig guard is enabled
Configured Pathcost method used is short
UplinkFast                   is disabled
BackboneFast                 is disabled

Name                   Blocking Listening Learning Forwarding STP Active
---------------------- -------- --------- -------- ---------- ----------
VLAN0001                     0         0        0          4          4
---------------------- -------- --------- -------- ---------- ----------
1 vlan                       0         0        0          4          4
Switch#

 

4. Root Komutu

Bu komut ile Root Bridge bilgilerini görüntüleyebilirsiniz. Örneğin, Root Bridge olmayan bir Switch üzerinde bu komutu uyguladığınızda Root Bridge ID ve Adresini (0012.66b3.c800) görebilirsiniz.

Switch#show spanning-tree root 

                                        Root    Hello Max Fwd
Vlan                   Root ID          Cost    Time  Age Dly  Root Port
---------------- -------------------- --------- ----- --- ---  ------------
VLAN0001         32769 0012.6620.0800         0    2   20  15                  
Switch#

 

5. Detail Komutu

Bu komut ile Switch’in tüm bağlantı noktalarının ayrıntılı bilgilerini görebilirsiniz. Cisco Switch arayüzlerinin Priority ve Root Bridge bilgilerini, Hello Time, Max Age Timer ve Forward Delay sürelerini ve ayrıca gönderilen ve alınan BPDU paket sayılarını görüntüleyebilirsiniz.

Switch#show spanning-tree detail 

 VLAN0001 is executing the ieee compatible Spanning Tree protocol
  Bridge Identifier has priority 32768, sysid 1, address 0012.6620.0800
  Configured hello time 2, max age 20, forward delay 15
  We are the root of the spanning tree
  Topology change flag not set, detected flag not set
  Number of topology changes 1 last change occurred 00:25:15 ago
          from GigabitEthernet0/0
  Times:  hold 1, topology change 35, notification 2
          hello 2, max age 20, forward delay 15 
  Timers: hello 1, topology change 0, notification 0, aging 300

 Port 1 (GigabitEthernet0/0) of VLAN0001 is designated forwarding 
   Port path cost 4, Port priority 128, Port Identifier 128.1.
   Designated root has priority 32769, address 0012.6620.0800
   Designated bridge has priority 32769, address 0012.6620.0800
   Designated port id is 128.1, designated path cost 0
   Timers: message age 0, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   Link type is shared by default
   BPDU: sent 773, received 3

 Port 2 (GigabitEthernet0/1) of VLAN0001 is designated forwarding 
   Port path cost 4, Port priority 128, Port Identifier 128.2.
   Designated root has priority 32769, address 0012.6620.0800
   Designated bridge has priority 32769, address 0012.6620.0800
   Designated port id is 128.2, designated path cost 0
   Timers: message age 0, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   Link type is shared by default
   BPDU: sent 771, received 0

 Port 3 (GigabitEthernet0/2) of VLAN0001 is designated forwarding 
   Port path cost 4, Port priority 128, Port Identifier 128.3.
   Designated root has priority 32769, address 0012.6620.0800
   Designated bridge has priority 32769, address 0012.6620.0800
   Designated port id is 128.3, designated path cost 0
   Timers: message age 0, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   Link type is shared by default
   BPDU: sent 771, received 0

 Port 4 (GigabitEthernet0/3) of VLAN0001 is designated forwarding 
   Port path cost 4, Port priority 128, Port Identifier 128.4.
   Designated root has priority 32769, address 0012.6620.0800
   Designated bridge has priority 32769, address 0012.6620.0800
   Designated port id is 128.4, designated path cost 0
   Timers: message age 0, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   Link type is shared by default
   BPDU: sent 773, received 3

Switch#

6. Spanning-Tree Interface Komutu

Bu komut ile cihaz üzerindeki arayüzleri incelemek için kullanılır.

Aşağıdaki komut çıktısında seçmek istediğiniz arayüzler görüntülenmektedir. Görüntülemek istediğiniz arayüzü seçtikten sonra aşağıdaki çıktıdaki gibi arayüz durumlarını görebilirsiniz.

Switch#show spanning-tree interface ?
  GigabitEthernet  GigabitEthernet IEEE 802.3z
  Multilink        Multilink-group interface
  Port-channel     Ethernet Channel of interfaces
  Vlan             Catalyst Vlans

Switch#show spanning-tree interface gigabitethernet 0/0

Vlan                Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
VLAN0001            Desg FWD 4         128.1    Shr 
Switch#show spanning-tree interface gigabitethernet 0/1

Vlan                Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
VLAN0001            Desg FWD 4         128.2    Shr 
Switch#

 

7. Spanning-Tree Blocked Komutu

Bu komut ile Blocked Moda sokulan arayüzlerini görebilirsiniz. Kısacası STP tarafından engellenen bağlantı noktalarını gösterir.

Switch#show spanning-tree blockedports 

Name                 Blocked Interfaces List
-------------------- ------------------------------------

Number of blocked ports (segments) in the system : 0

Switch#

8. Spanning-Tree Active

Bu komut yalnızca Cisco Switch üzerinde aktif olan arayüzleri gösterir. Örneğin, boşta kullanılmayan arayüzler sistem yöneticisi tarafından kapatıldıysa bu komut ile sadece aktif olan arayüzleri görüntüleyebileceksiniz.

Switch#show spanning-tree active 

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     0012.6620.0800
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

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

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


Switch#

 

9. Spanning-Tree Bridge

Bu komut Cisco Switch’in Bridge ID bilgisini gösterir.

Switch#show spanning-tree bridge 

                                                   Hello  Max  Fwd
Vlan                         Bridge ID              Time  Age  Dly  Protocol
---------------- --------------------------------- -----  ---  ---  --------
VLAN0001         32769 (32768,   1) 0012.6620.0800    2    20   15  ieee        
Switch#

 

10. Spanning-Tree Inconsistentports

Bu komut STP yapılandırmasındaki doğru olarak yapılandırılmamış portları görüntüler. Örneğin, birbirine bağlı iki Switch arasında bir port Trunk diğer portu Access port olarak konfigüre edilirse, STP protokolü bu portu tutarsız olarak adlandıracaktır.

Switch#show spanning-tree inconsistentports 

Name                 Interface                Inconsistency
-------------------- ------------------------ ------------------

Number of inconsistent ports (segments) in the system : 0

Switch#

11. BackboneFast Komutu

Bu komut Switch üzerinde BackboneFast özelliği etkinleştirilip etkinleştirilmediğini gösterir.

Switch#show spanning-tree backbonefast 
BackboneFast is disabled
Switch#

 

12. UplinkFast Komutu

Bu komutta, Switch üzerinde UplinkFast özelliği etkinleştirilip etkinleştirilmediğini gösterir.

Switch#show spanning-tree uplinkfast
UplinkFast is disabled
Switch#

 

13. Vlan Komutu

Son olarak bu komut ile seçilen VLAN numarasına göre Root ID, Root Bridge, Priority gibi STP ayrıntılarını görüntüleyebilirsiniz.

Switch#sh spanning-tree vlan 1

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     0012.6620.0800
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

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

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


Switch#

Sonuç

Cisco Switch veya Router’larda sorun giderme için show komutlarını detaylı olarak bilmemiz ve anlamamız gereklidir. Bu yazımızda Cisco Switch Spanning Tree protokolünün temel komutlarını inceledik. Bizi takip ettiğiniz için teşekkürler!

Add a Comment

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir