اس لیب میں آپ Spanning Tree Protocol سمجھیں گے — loop کیسے روکتا ہے، root bridge کیسے بنتا ہے، اور Rapid PVST+ کیوں تیز ہے۔
Is lab mein aap Spanning Tree Protocol samjhenge — loop kaise rokta hai, root bridge kaise banta hai, aur Rapid PVST+ kyun tez hai.
In this lab, you'll understand the Spanning Tree Protocol — how it stops loops, how the root bridge is elected, and why Rapid PVST+ is faster.
سوچو کہ دو شہروں کے درمیان دو راستے ہیں — اگر دونوں کھلے ہوں تو ٹریفک گول گول گھومتا رہے گا (loop)۔ STP ایک ٹریفک پولیس والا ہے جو ایک راستہ بند کر دیتا ہے، اور اگر کھلا راستہ بند ہو جائے تو بند والا کھول دیتا ہے۔ Rapid PVST+ یہی کام ہے لیکن بہت تیز — سیکنڈوں کے بجائے ملی سیکنڈوں میں۔
Socho ke do shehron ke darmiyan do raste hain — agar dono khule hon to traffic gol gol ghoomta rahega (loop). STP ek traffic police wala hai jo ek rasta band kar deta hai, aur agar khula rasta band ho jaye to band wala khol deta hai. Rapid PVST+ yehi kaam hai lekin bohat tez — secondon ke bajaye millisecondon mein.
Imagine two roads between two cities — if both are open, traffic keeps circling around (a loop). STP is a traffic officer who closes one road, and if the open road closes, it opens the closed one. Rapid PVST+ does the same job but much faster — in milliseconds instead of seconds.

SW1 اور SW2 کے درمیان DO ٹرنک لنکس ہیں (Fa0/1 اور Fa0/24) — loop کا خطرہ۔ ہر سوئچ پر ایک PC (VLAN 10) لگا ہے۔ ڈیوائسز: 2x سوئچ 2960 (SW1، SW2)، 2x پی سی۔ PC1: 192.168.10.10/24، PC2: 192.168.10.11/24۔ دونوں VLAN 10 میں۔
SW1 aur SW2 ke darmiyan DO trunk links hain (Fa0/1 aur Fa0/24) — loop ka khatra. Har switch par ek PC (VLAN 10) laga hai. Devices: 2x Switch 2960 (SW1, SW2), 2x PC PC1: 192.168.10.10/24, PC2: 192.168.10.11/24. Dono VLAN 10 mein.
There are TWO trunk links between SW1 and SW2 (Fa0/1 and Fa0/24) — a loop risk. Each switch has one PC (VLAN 10). Devices: 2x Switch 2960 (SW1, SW2), 2x PCs. PC1: 192.168.10.10/24, PC2: 192.168.10.11/24. Both in VLAN 10.
SW1 کو root bridge بناؤ۔ Rapid PVST+ موڈ آن کرتے ہیں۔
SW1 ko root bridge banao. Rapid PVST+ mode on karte hain.
Make SW1 the root bridge. We turn on Rapid PVST+ mode.
enableconfigure terminalspanning-tree mode rapid-pvstپھر VLAN 10 کے لیے priority 4096 سیٹ کر کے SW1 کو root bridge بناتے ہیں — سب سے کم priority والا سوئچ root بنتا ہے۔
Phir VLAN 10 ke liye priority 4096 set kar ke SW1 ko root bridge banate hain — sab se kam priority wala switch root banta hai.
Then we set priority 4096 for VLAN 10 to make SW1 the root bridge — the switch with the lowest priority becomes root.
spanning-tree vlan 10 priority 4096exitSW2 پر Rapid PVST+۔
SW2 par Rapid PVST+.
Rapid PVST+ on SW2.
enableconfigure terminalspanning-tree mode rapid-pvstexitدوسرے سوئچ پر بھی Rapid PVST+ موڈ آن کرنا ضروری ہے — دونوں طرف same موڈ ہونا چاہیے ورنہ STP ٹھیک کام نہیں کرے گا۔
Doosre switch par bhi Rapid PVST+ mode on karna zaroori hai — dono taraf same mode hona chahiye warna STP theek kaam nahi karega.
You must also turn on Rapid PVST+ mode on the other switch — both sides must have the same mode, otherwise STP won't work properly.
ٹیسٹنگ: دونوں سوئچز کے درمیان دو کیبلز لگاؤ (Fa0/1-Fa0/1 اور Fa0/24-Fa0/24)۔
Testing: Dono switches ke darmiyan do cables lagao (Fa0/1-Fa0/1 aur Fa0/24-Fa0/24).
Testing: connect two cables between the switches (Fa0/1-Fa0/1 and Fa0/24-Fa0/24).
show spanning-tree سے دیکھو کہ ایک پورٹ blocking میں ہے۔ ایک کیبل نکالو — دوسری فوراً کام کرنے لگے گی۔
show spanning-tree se dekho ke ek port blocking mein hai. Ek cable nikalo — doosri foran kaam karne lagegi.
Use show spanning-tree to see one port in blocking. Remove one cable — the other should start working immediately.
show spanning-tree vlan 10 سے root bridge، پورٹ رولز اور اسٹیٹس دیکھو۔ show spanning-tree summary سے موڈ کنفرم کرو۔
show spanning-tree vlan 10 se root bridge, port roles aur states dekho. show spanning-tree summary se mode confirm karo.
Check the root bridge, port roles, and states with show spanning-tree vlan 10. Confirm the mode with show spanning-tree summary.
show spanning-tree vlan 10show spanning-tree summary