STP & Rapid PVST+
CCNA 200-301 v2.0 · Live Feb 3, 2027 (v1.1 valid through Feb 2, 2027) Cisco Packet Tracer
مقصدObjectiveObjective
اس لیب میں آپ 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.
آسان مثالSimple AnalogySimple Analogy
سوچو کہ دو شہروں کے درمیان دو راستے ہیں — اگر دونوں کھلے ہوں تو ٹریفک گول گول گھومتا رہے گا (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.
سیٹ اپLab SetupLab Setup
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.
اقداماتStepsSteps
Step 1
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.
enable configure terminal spanning-tree mode rapid-pvst
Step 2
پھر 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 4096 exit
Step 3
SW2 پر Rapid PVST+۔SW2 par Rapid PVST+.Rapid PVST+ on SW2.
enable configure terminal spanning-tree mode rapid-pvst exit
Step 4
دوسرے سوئچ پر بھی 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.
Step 5
ٹیسٹنگ: دونوں سوئچز کے درمیان دو کیبلز لگاؤ (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).
Step 6
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.
تصدیقVerifyVerify
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 10 show spanning-tree summary
خرابی دور کرناTroubleshootingTroubleshooting
⚠️ STP کام نہیں کر رہا، loop بن رہا ہے۔STP kaam nahi kar raha, loop ban raha hai.STP isn't working — a loop is forming.
✅ دونوں سوئچز پر spanning-tree mode rapid-pvst ہونا چاہیے۔ show spanning-tree summary سے موڈ دیکھو۔Dono switches par spanning-tree mode rapid-pvst hona chahiye. show spanning-tree summary se mode dekho.Both switches must have spanning-tree mode rapid-pvst. Check the mode with show spanning-tree summary.
⚠️ غلط سوئچ root bridge بن گیا۔Ghalat switch root bridge ban gaya.The wrong switch became the root bridge.
✅ Priority 4096 کا مطلب root بننا ہے۔ جس سوئچ کو root بنانا ہے اسی پر سب سے کم priority سیٹ کرو۔Priority 4096 ka matlab root banna hai. Jis switch ko root banana hai usi par sab se kam priority set karo.Priority 4096 means becoming root. Set the lowest priority on the switch you want as root.
انٹرویو سوالاتInterview Q&AInterview Q&A
❓ Root bridge کیسے چنا جاتا ہے؟Root bridge kaise chuna jata hai?How is the root bridge chosen?
Root bridge وہ سوئچ ہے جسے سب سے کم bridge ID (priority + MAC) حاصل ہو۔ سب سوئچز اسی کی طرف اپنا راستہ بناتے ہیں۔Root bridge woh switch hai jise sab se kam bridge ID (priority + MAC) hasil ho. Sab switches isi ki taraf apna rasta banate hain.The root bridge is the switch with the lowest bridge ID (priority + MAC). All switches build their path toward it.
❓ Rapid PVST+ عام STP سے بہتر کیوں ہے؟Rapid PVST+ aam STP se behtar kyun hai?Why is Rapid PVST+ better than regular STP?
Rapid PVST+ ہر VLAN کے لیے الگ STP instance چلاتا ہے اور convergence سیکنڈوں کے بجائے ملی سیکنڈوں میں کرتا ہے۔Rapid PVST+ har VLAN ke liye alag STP instance chalata hai aur convergence secondon ke bajaye millisecondon mein karta hai.Rapid PVST+ runs a separate STP instance per VLAN and converges in milliseconds instead of seconds.