اس لیب میں آپ VLAN بنانا اور پورٹس کو VLANs میں اسائن کرنا سیکھیں گے۔ دو الگ ڈیپارٹمنٹس (Sales اور Accounts) کو ایک ہی سوئچ پر الگ کریں گے۔
Is lab mein aap VLAN banana aur ports ko VLANs mein assign karna seekhenge. Do alag departments (Sales aur Accounts) ko ek hi switch par alag karenge.
In this lab, you'll learn to create VLANs and assign ports to VLANs. You'll separate two departments (Sales and Accounts) on a single switch.
آپ کے آفس میں ایک ہی سوئچ ہے، لیکن آپ چاہتے ہیں کہ اکاؤنٹس والے اور سیلز والے آپس میں بات نہ کر سکیں — جیسے ایک ہی بلڈنگ میں دو الگ آفسز ہوں جن کے درمیان دیوار ہو۔ VLAN یہی کام کرتا ہے: ایک فزیکل سوئچ کو کاٹ کر الگ الگ ورچوئل سوئچز بنا دیتا ہے۔ ہر VLAN اپنی الگ دنیا ہے۔
Aapke office mein ek hi switch hai, lekin aap chahte hain ke accounts wale aur sales wale aapas mein baat na kar saken — jaise ek hi building mein do alag offices hon jinke darmiyan deewar ho. VLAN yahi kaam karta hai: ek physical switch ko kaat kar alag alag virtual switches bana deta hai. Har VLAN apni alag duniya hai.
Your office has one switch, but you want the accounts team and the sales team to be unable to talk to each other — like two separate offices in one building with a wall between them. That's what a VLAN does: it slices one physical switch into separate virtual switches. Each VLAN is its own world.

SW1 سوئچ کے Fa0/2 اور Fa0/3 پر PC1-PC2 (VLAN 10)، Fa0/4 اور Fa0/5 پر PC3-PC4 (VLAN 20) کنیکٹڈ ہیں۔ ڈیوائسز: 1x سوئچ 2960 (SW1)، 4x پی سی (PC1-PC4)۔ PC1/PC2: 192.168.10.10 اور .11، ماسک 255.255.255.0۔ PC3/PC4: 192.168.20.10 اور .11، ماسک 255.255.255.0۔ گیٹ وے کی ضرورت نہیں (کوئی روٹنگ نہیں)۔
SW1 switch ke Fa0/2 aur Fa0/3 par PC1-PC2 (VLAN 10), Fa0/4 aur Fa0/5 par PC3-PC4 (VLAN 20) connected hain. Devices: 1x Switch 2960 (SW1), 4x PC (PC1-PC4) PC1/PC2: 192.168.10.10 aur .11, mask 255.255.255.0. PC3/PC4: 192.168.20.10 aur .11, mask 255.255.255.0. Gateway ki zaroorat nahi (koi routing nahi).
SW1's Fa0/2 and Fa0/3 connect PC1-PC2 (VLAN 10); Fa0/4 and Fa0/5 connect PC3-PC4 (VLAN 20). Devices: 1x Switch 2960 (SW1), 4x PCs (PC1-PC4). PC1/PC2: 192.168.10.10 and .11, mask 255.255.255.0. PC3/PC4: 192.168.20.10 and .11, mask 255.255.255.0. No gateway needed (no routing).
سوئچ SW1 پر VLANs بناؤ۔ پہلے دو VLANs بناتے ہیں: 10 (Sales) اور 20 (Accounts)۔
Switch SW1 par VLANs banao. Pehle do VLANs banate hain: 10 (Sales) aur 20 (Accounts).
Create VLANs on switch SW1. First create two VLANs: 10 (Sales) and 20 (Accounts).
enableconfigure terminalvlan 10name SALESvlan 20name ACCOUNTSexitنام دینا لازمی نہیں لیکن best practice ہے — بعد میں سمجھنا آسان ہوتا ہے
Naam dena lazmi nahi lekin best practice hai — baad mein samajhna aasaan hota hai
Naming isn't required but is best practice — it makes things easier to understand later.
پورٹس کو VLANs میں ڈالو: Fa0/2-3 Sales (VLAN 10) میں۔ Access پورٹ وہ ہے جہاں اینڈ ڈیوائس (PC) لگتا ہے
Ports ko VLANs mein daalo: Fa0/2-3 Sales (VLAN 10) mein. Access port woh hai jahan end device (PC) lagta hai
Assign the ports to VLANs: Fa0/2-3 into Sales (VLAN 10). An access port is where an end device (PC) connects.
interface range fa0/2 - 3switchport mode accessswitchport access vlan 10exitاب Fa0/4-5 Accounts (VLAN 20) میں
Ab Fa0/4-5 Accounts (VLAN 20) mein
Now Fa0/4-5 into Accounts (VLAN 20).
interface range fa0/4 - 5switchport mode accessswitchport access vlan 20exitٹیسٹنگ: PC1 سے ping 192.168.10.11 — جواب آنا چاہیے (same VLAN)۔
Testing: PC1 se ping 192.168.10.11 — jawab aana chahiye (same VLAN).
Testing: from PC1, ping 192.168.10.11 — you should get a reply (same VLAN).
PC1 سے ping 192.168.20.10 — جواب نہیں آنا چاہیے (الگ VLAN)۔ یہی VLAN کا کمال ہے۔
PC1 se ping 192.168.20.10 — jawab NAHI aana chahiye (alag VLAN). Yehi VLAN ka kamal hai.
From PC1, ping 192.168.20.10 — you should NOT get a reply (different VLAN). That's the magic of VLANs.
show vlan brief سے VLANs اور ان کے پورٹس دیکھو۔ show interfaces status سے پورٹس کا حال کنفرم کرو۔
show vlan brief se VLANs aur unke ports dekho. show interfaces status se ports ka haal confirm karo.
Check VLANs and their ports with show vlan brief. Confirm port status with show interfaces status.
show vlan briefshow interfaces status