Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. {{indexmenu_n>040}} ====== Cisco : Spanning Tree Protocol ====== Dalam dunia jaringan komputer, Spanning Tree Protocol (STP) adalah teknologi dasar yang mencegah bencana yang ditakuti oleh semua administrator jaringan—loop jaringan. Loop terjadi ketika terdapat jalur redundan dalam jaringan, yang meskipun bermanfaat untuk toleransi kesalahan, dapat menyebabkan broadcast storm dan ketidakstabilan jaringan jika tidak dikelola dengan baik. STP adalah protokol Layer 2 yang didefinisikan oleh IEEE 802.1D yang memastikan topologi bebas loop dalam jaringan dengan mengelola jalur redundan antara switch jaringan secara cerdas. Protokol ini bekerja dengan secara selektif memblokir dan meneruskan lalu lintas pada jalur yang berbeda, memastikan hanya satu jalur aktif yang digunakan untuk mengirim data, sementara jalur redundan lainnya ditempatkan dalam status cadangan. Tujuan utama dari STP adalah untuk: - Mencegah loop jaringan dengan memblokir jalur redundan. - Memberikan redundansi dengan mengaktifkan jalur cadangan jika jalur utama gagal. - Memastikan aliran data yang efisien dalam jaringan yang sangat tersedia dan bebas loop. ---- ===== Syntax ===== Berikut adalah syntax command yang digunakan dalam konfigurasi **Spanning Tree Protocol (STP)**. ---- ==== Basic Commands ==== ^ Command ^ Description ^ | ''spanning-tree mode [mode]'' | Mengubah mode protocol Spanning Tree. Contoh: ''pvst'', ''rapid-pvst'', ''mst'' | | ''spanning-tree vlan [vlan_id] priority [value]'' | Mengatur nilai bridge priority (semakin kecil nilai, semakin tinggi prioritas) | | ''spanning-tree vlan [vlan_id] root 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> SW1#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 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> * **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 Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 50fc.1600.4700 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 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> SW3#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 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 ieee Root ID Priority 32769 Address 5010.df00.4500 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 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> * **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 ===== <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.txt Last modified: 2026/02/04 00:23by ilyasa