GNS3 Üzerinde Spanning Tree Root Primary Komutu Kullanımı

Cisco Switch’ler üzerinde Spanning Tree Protokolü‘nü yapılandırdığımız zaman Root Bridge Switch’i seçerken genellikle spanning-tree vlan (vlan numarası) priority (değer) komutunu kullanırız.

GNS3 Üzerinde Spanning Tree Root Primary Komutu Kullanımı

Root Primary Yapılandırma

Spanning Tree Protokolü (802.1D) OSI 2. katmanı üzerinde görev yapan Layer 2 Cisco Switch’lerin döngüleri önlemesi için geliştirilmiştir. Standart STP protokolü veya Rapid Spanning Tree Protokolü etkinleştirilen Cisco Switch’ler üzerinde Root Bridge seçimini manuel olarak yapabiliriz.

Manuel Root Bridge Switch seçimi yaparken iki yöntem kullanabiliriz. Birinci yöntem, Switch’in Priority (Öncelik) değerini değiştirmektir. İkinci yöntem ise, Root Primary komutunu kullanmaktır.

Cisco Switch’ler üzerinde Root Primary komutunu kullanarak Root Bridge seçildiğinde, Switch’lerin Priority değerleri otomatik olarak ayarlanır.

Cisco Switch Root Komutu Kullanımı

GNS3 programını kullanarak küçük bir ağ topolojisi üzerindeki Cisco Layer 2 Switch‘leri Primary/Secondary komutları ile yapılandıralım.

   Adım 1

GNS3 programını açınız ve aşağıdaki görüntüdeki gibi yeni bir proje oluşturunuz. GNS3 çalışma alanına aşağıdaki görüntüdeki gibi Layer 2 Switch‘ler ekleyiniz.

GNS3 Ağ Topolojisi

   Adım 2

Root Bridge seçilecek Cisco Switch’i belirleyiniz ve daha sonra Root Bridge en yakın Switch’i Secondary Root Bridge olarak tanımlayınız. GNS3 çalışma alanındaki tüm Layer 2 Switch’leri çalıştırınız ve CLI komut istemi pencerelerini açınız.

Root ve Secondary Bridge Yapılandırma

   Adım 3

Cisco Switch’ler ağa ilk eklediğinde Priority değerleri 32769‘dur. Dolayısıyla Priority değerlerini manuel veya otomatik olarak değiştirebilirsiniz.

GNS3’te belirlediğiniz Cisco Switch’ler üzerinde bu komut ile Root Bridge seçimi yapmak için ağ topolojisindeki L2-SW-1 Switch’in CLI komut isteminde aşağıdaki komutu uygulayınız ve daha sonra show spanning-tree çıktısını inceleyiniz.

L2-SW-1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
L2-SW-1(config)#spanning-tree vlan 1 RP
L2-SW-1(config)#exit
L2-SW-1#

L2-SW-1#show spanning-tree 

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    24577
             Address     00b4.349f.fe00
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    24577  (priority 24576 sys-id-ext 1)
             Address     00b4.349f.fe00
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  15  sec

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


L2-SW-1#

spanning-tree vlan 1 root primary

Root Bridge seçimi yaptıktan sonra, L2-SW-1 Switch’in Priority değerinin ayarlandığını görebilirsiniz.

   Adım 4

Cisco Switch L2-SW-2’yi de ikinci Root Bridge seçmek için aşağıdaki komutu uygulayınız ve show spanning-tree komutu ile Priority değerini kontrol ediniz.

L2-SW-2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
L2-SW-2(config)#spanning-tree vlan 1 root secondary
L2-SW-2(config)#exit
L2-SW-2#


L2-SW-2#show spanning-tree

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    24577
             Address     00b4.349f.fe00
             Cost        4
             Port        1 (GigabitEthernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    28673  (priority 28672 sys-id-ext 1)
             Address     00b4.3451.da00
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  15  sec

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


L2-SW-2#

spanning-tree vlan 1 root secondary

Cisco Switch L2-SW-2’yi Secondary Root Bridge olarak yapılandırdık. Eğer L2-SW-1 Switch’i ağ üzerinden kaldırırsanız, Root Bridge L2-SW-2 Switch olacaktır.

   Adım 5

Cisco Switch L2-SW-1 ve L2-SW-2 show running-config komut çıktısında Priority değerlerinin otomatik olarak değiştiğini görebilirsiniz.

show running-config

Show Komutları


L2-SW-1#show running-config
Building configuration...

Current configuration : 4770 bytes
!
! Last configuration change at 07:49:43 UTC Mon Sep 25 2017
!
version 15.0
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname L2-SW-1
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
!
!
ip cef
no ipv6 cef
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
spanning-tree vlan 1 priority 24576
!
vlan internal allocation policy ascending
!
!
!
interface GigabitEthernet0/0
media-type rj45
negotiation auto
!
interface GigabitEthernet0/1
media-type rj45
negotiation auto
!
interface GigabitEthernet0/2
media-type rj45
negotiation auto
!
interface GigabitEthernet0/3
media-type rj45
negotiation auto
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end

L2-SW-1#

 


L2-SW-2#show running-config
Building configuration...

Current configuration : 4770 bytes
!
! Last configuration change at 07:50:32 UTC Mon Sep 25 2017
!
version 15.0
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname L2-SW-2
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
!
!
!
ip cef
no ipv6 cef
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
spanning-tree vlan 1 priority 28672
!
vlan internal allocation policy ascending
!
!
!
interface GigabitEthernet0/0
media-type rj45
negotiation auto
!
interface GigabitEthernet0/1
media-type rj45
negotiation auto
!
interface GigabitEthernet0/2
media-type rj45
negotiation auto
!
interface GigabitEthernet0/3
media-type rj45
negotiation auto
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
!
line con 0
line aux 0
line vty 0 4
!
!
end

L2-SW-2#

 


L2-SW-3#show spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 24577
Address 00b4.349f.fe00
Cost 4
Port 3 (GigabitEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 00b4.3453.4900
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 Root FWD 4 128.3 Shr
Gi0/3 Altn BLK 4 128.4 Shr

L2-SW-3#

 


L2-SW-4#show spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 24577
Address 00b4.349f.fe00
Cost 4
Port 3 (GigabitEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 00b4.3497.7d00
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 Altn BLK 4 128.2 Shr
Gi0/2 Root FWD 4 128.3 Shr
Gi0/3 Desg FWD 4 128.4 Shr

L2-SW-4#

 

Root Bridge Nasıl Seçilir? ⇒ Video

GNS3 programında Layer 2 Switch’ler üzerinde Cisco Root Primary/Secondary komutlarının kullanımı için aşağıdaki videoyu izleyebilir ve ayrıca bize destek olmak için YouTube kanalımıza abone olabilirsiniz!

   Son Söz


Bu yazımızda GNS3 programını kullanarak manuel olarak Root Bridge ve Secondary Bridge seçimini yaptık. Bizi takip ettiğiniz için teşekkürler!

   İlgili Yazılar


GNS3 Cloud Yapılandırma
♦ GNS3 VM Import Etme
♦ Switch MAC Adreslerini Nasıl Öğrenir?
GNS3 Port Security Yapılandırma
GNS3 VLAN Yapılandırma

Add a Comment

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