networking:cisco:stp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
networking:cisco:stp [2026/02/03 23:55] – created ilyasanetworking:cisco:stp [2026/02/04 00:23] (current) – [Testing] ilyasa
Line 10: Line 10:
   - Memberikan redundansi dengan mengaktifkan jalur cadangan jika jalur utama gagal.   - Memberikan redundansi dengan mengaktifkan jalur cadangan jika jalur utama gagal.
   - Memastikan aliran data yang efisien dalam jaringan yang sangat tersedia dan bebas loop.   - Memastikan aliran data yang efisien dalam jaringan yang sangat tersedia dan bebas loop.
 +
 +----
  
 ===== Syntax ===== ===== Syntax =====
-==== Some acction ====+ 
 +Berikut adalah syntax command yang digunakan dalam konfigurasi **Spanning Tree Protocol (STP)**. 
 + 
 +---- 
 + 
 +==== Basic Commands ==== 
 ^ Command ^ Description ^ ^ Command ^ Description ^
-| ''S1(config)#vlan [vlan-ID]''Membuat VLAN baru dan menetapkan nomor VLAN +| ''spanning-tree mode [mode]'' | Mengubah mode protocol Spanning Tree. Contoh: ''pvst'', ''rapid-pvst'', ''mst''
-| ''S1(config-vlan)#name [name]''Memberikan nama pada VLAN | +| ''spanning-tree vlan [vlan_id] priority [value]'' | Mengatur nilai bridge priority (semakin kecil nilai, semakin tinggi prioritas
-Contoh:+| ''spanning-tree vlan [vlan_idroot primary''Menetapkan switch sebagai **Root Bridge**, gunakan ''secondary'' sebagai backup | 
 + 
 +---- 
 + 
 +==== Show Commands ==== 
 + 
 +^ Command ^ Description ^ 
 +| ''show spanning-tree'' | Memeriksa status Spanning Tree | 
 +| ''show spanning-tree vlan [vlan_id]''Memeriksa status STP pada VLAN tertentu 
 +| ''show spanning-tree interface [interface_id]'' | Memperiksa konfigurasi STP untuk unterface Tertentu | 
 +===== Topologi ===== 
 +{{ :networking:cisco:cisco_stp.png?nolink |}} 
 + 
 +Pada topology jaringan ini sama sekali belum dikonfigurasi untuk spanning tree 
 + 
 +  * Mappinglah port spannnig three dalam topology ini dan carilah root switch 
 +    * Root Port [R] 
 +    * Designated Port [D] 
 +    * Alternate Port [A] 
 + 
 +<hidden Proses Pencarian> 
 +  * **SW1**
 <code> <code>
-vlan 10 +SW1#show spanning-tree  
- name VLAN-10 +VLAN0001 
-vlan 20 +  Spanning tree enabled protocol ieee 
- name VLAN-20 +  Root ID    Priority    32769 
-vlan 99 +             Address     5010.df00.4500 
- name VLAN-Management+             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     5029.fd00.4400 
 +             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    P2p  
 +Gi0/1               Desg FWD 4         128.2    P2p  
 +Gi0/2               Root FWD 4         128.3    P2p  
 +Gi0/3               Desg FWD 4         128.4    P2p 
 </code> </code>
 +  * **SW2**
 +<code>
 +SW2#show spanning-tree 
 +VLAN0001
 +  Spanning tree enabled protocol ieee
 +  Root ID    Priority    32769
 +             Address     5010.df00.4500
 +             Cost        4
 +             Port        3 (GigabitEthernet0/2)
 +             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
  
-===== Topologi ===== +  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1) 
-Gambar topology +             Address     50fc.1600.4700 
-Goals Topology +             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec 
-===== Konfigurasi ===== +             Aging Time  300 sec 
-  * **Step 1 : Pembuatan VLANs**+ 
 +Interface           Role Sts Cost      Prio.Nbr Type 
 +------------------- ---- --- --------- -------- -------------------------------- 
 +Gi0/0               Altn BLK 4         128.1    P2p  
 +Gi0/1               Desg FWD 4         128.2    P2p  
 +Gi0/2               Root FWD 4         128.3    P2p  
 +Gi0/3               Desg FWD 4         128.4    P2p  
 +</code> 
 +  * **SW3**
 <code> <code>
-Switch(config)#vlan 10 +SW3#show spanning-tree  
-Switch(config-vlan)#name BIRU +VLAN0001 
-Switch(config-vlan)#exit+  Spanning tree enabled protocol ieee 
 +  Root ID    Priority    32769 
 +             Address     5010.df00.4500 
 +             Cost        8 
 +             Port        1 (GigabitEthernet0/0
 +             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
  
-Switch(config)#vlan 20 +  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1) 
-Switch(config-vlan)#name MAGENTA +             Address     50b9.d400.4600 
-Switch(config-vlan)#exit+             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               Root FWD 4         128.1    P2p  
 +Gi0/1               Altn BLK 4         128.2    P2p 
 </code> </code>
-  * **Step 2 : Assign VLANs ke Ports**+  * **SW4**
 <code> <code>
-Switch(config)#interface f0/1 +SW4#show spanning-tree 
-Switch(config-if)#switchport mode access  +
-Switch(config-if)#switchport access vlan 10 +
-Switch(config-if)#exit+
  
-Switch(config)#interface f0/+VLAN0001 
-Switch(config-if)#switchport mode access  +  Spanning tree enabled protocol ieee 
-Switch(config-if)#switchport access vlan 10 +  Root ID    Priority    32769 
-Switch(config-if)#exit+             Address     5010.df00.4500 
 +             This bridge is the root 
 +             Hello Time   sec  Max Age 20 sec  Forward Delay 15 sec 
 + 
 +  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1
 +             Address     5010.df00.4500 
 +             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    P2p  
 +Gi0/1               Desg FWD 4         128.2    P2p 
 </code> </code>
 +  * **SW5**
 +<code>
 +SW5#show spanning-tree 
  
 +VLAN0001
 +  Spanning tree enabled protocol ieee
 +  Root ID    Priority    32769
 +             Address     5010.df00.4500
 +             Cost        8
 +             Port        1 (GigabitEthernet0/0)
 +             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
 +
 +  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
 +             Address     5040.b700.4800
 +             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               Root FWD 4         128.1    P2p 
 +Gi0/1               Altn BLK 4         128.2    P2p 
 +</code>
 +</hidden>
 +{{ :networking:cisco:cisco_stp2.png?nolink |}}
 +
 +Untuk mendapatkan jalur switching yang efisien SW4 bukan root birdge yang benar. 
 +Maka perlu untuk dikonfigurasi sebagai berikut
 +  - Konfigurasi SW1 Menjadi Root Switch
 +  - Konfigurasi SW2 Menjadi Backup root
 +  - Aktifkan RSTP
 +  - Setelahnya, untuk memastikan lakukan mapping port lagi.
 +===== Konfigurasi =====
 +  * **SW1**
 +<code>
 +SW1(config)#spanning-tree vlan 1 root primary 
 +SW1(config)#spanning-tree mode rapid-pvst
 +</code>
 +
 +  * **SW2**
 +<code>
 +SW2(config)#spanning-tree vlan 1 root secondary 
 +SW2(config)#spanning-tree mode rapid-pvst
 +</code>
 +
 +  * **SW3**
 +<code>
 +SW3(config)#spanning-tree mode rapid-pvst
 +</code>
 +  * **SW4**
 +<code>
 +SW4(config)#spanning-tree mode rapid-pvst
 +</code>
 +  * **SW5**
 +<code>
 +SW5(config)#spanning-tree mode rapid-pvst
 +</code>
 ===== Testing ===== ===== Testing =====
 +<hidden Hasil Configurasi>
 +  * **SW1**
 +<code>
 +SW1#show spanning-tree
 +VLAN0001
 +  Spanning tree enabled protocol rstp
 +  Root ID    Priority    24577
 +             Address     5029.fd00.4400
 +             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     5029.fd00.4400
 +             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    P2p
 +Gi0/1               Desg FWD 4         128.2    P2p
 +Gi0/2               Desg FWD 4         128.3    P2p
 +Gi0/3               Desg FWD 4         128.4    P2p
 +</code>
 +  * **SW2**
 +<code>
 +SW2#show spanning-tree
 +VLAN0001
 +  Spanning tree enabled protocol rstp
 +  Root ID    Priority    24577
 +             Address     5029.fd00.4400
 +             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     50fc.1600.4700
 +             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    P2p
 +Gi0/1               Desg FWD 4         128.2    P2p
 +Gi0/2               Desg FWD 4         128.3    P2p
 +Gi0/3               Desg FWD 4         128.4    P2p
 +</code>
 +  * **SW3**
 +<code>
 +SW3#show spanning-tree
 +VLAN0001
 +  Spanning tree enabled protocol rstp
 +  Root ID    Priority    24577
 +             Address     5029.fd00.4400
 +             Cost        4
 +             Port        1 (GigabitEthernet0/0)
 +             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
 +
 +  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
 +             Address     50b9.d400.4600
 +             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               Root FWD 4         128.1    P2p
 +Gi0/1               Altn BLK 4         128.2    P2p
 +</code>
 +  * **SW4**
 +<code>
 +SW4#show spanning-tree
 +VLAN0001
 +  Spanning tree enabled protocol rstp
 +  Root ID    Priority    24577
 +             Address     5029.fd00.4400
 +             Cost        4
 +             Port        2 (GigabitEthernet0/1)
 +             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
 +
 +  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
 +             Address     5010.df00.4500
 +             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               Altn BLK 4         128.1    P2p
 +Gi0/1               Root FWD 4         128.2    P2p
 +</code>
 +  * **SW5**
 +<code>
 +SW5#show spanning-tree
 +VLAN0001
 +  Spanning tree enabled protocol rstp
 +  Root ID    Priority    24577
 +             Address     5029.fd00.4400
 +             Cost        4
 +             Port        1 (GigabitEthernet0/0)
 +             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
 +
 +  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
 +             Address     5040.b700.4800
 +             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               Root FWD 4         128.1    P2p
 +Gi0/1               Altn BLK 4         128.2    P2p
 +</code>
 +</hidden>
 +
 +{{ :networking:cisco:cisco_stp3.png?nolink |}}
 +
  • networking/cisco/stp.1770137750.txt.gz
  • Last modified: 2026/02/03 23:55
  • by ilyasa