اس لیب میں آپ routing table پڑھنا سیکھیں گے — codes (C, L, S, O)، administrative distance، اور forwarding decision کیسے ہوتی ہے۔
Is lab mein aap routing table parhna seekhenge — codes (C, L, S, O), administrative distance, aur forwarding decision kaise hoti hai.
In this lab, you'll learn to read the routing table — the codes (C, L, S, O), administrative distance, and how forwarding decisions are made.
راؤٹر ایک ڈاک خانہ ہے جس کے پاس ہر محلے کا نقشہ (routing table) ہے۔ جب خط (packet) آتا ہے تو وہ دیکھتا ہے: پتا کون سے محلے کا ہے؟ سب سے specific گلی کونسی ہے؟ پھر اس طرف بھیج دیتا ہے۔ اگر پتا ہی نہ ملے تو 'return to sender' (drop)۔ Routing table میں C کا مطلب 'سیدھا connected'، S کا مطلب 'static — میں نے خود لکھا'، O کا مطلب 'OSPF نے بتایا'۔
Router ek dak khana hai jiske paas har mohalle ka naksha (routing table) hai. Jab khat (packet) aata hai to woh dekhta hai: pata kaun se mohalle ka hai? Sab se specific gali kaunsi hai? Phir us taraf bhej deta hai. Agar pata hi na mile to 'return to sender' (drop). Routing table mein C ka matlab 'seedha connected', S ka matlab 'static — maine khud likha', O ka matlab 'OSPF ne bataya'.
A router is a post office that holds a map of every neighborhood (the routing table). When a letter (packet) arrives, it checks: which neighborhood is this address in? Which is the most specific street? Then it sends it that way. If the address isn't found at all, it's 'return to sender' (dropped). In the routing table, C means 'directly connected', S means 'static — I wrote it myself', O means 'OSPF told me'.

R1 کے G0/0 پر PC1 (192.168.10.0/24)، G0/1 پر PC2 (192.168.20.0/24)۔ ڈیوائسز: 1x راؤٹر 2911 (R1)، 2x پی سی۔ PC1: 192.168.10.10/24، گیٹ وے 192.168.10.1۔ PC2: 192.168.20.10/24، گیٹ وے 192.168.20.1۔
R1 ke G0/0 par PC1 (192.168.10.0/24), G0/1 par PC2 (192.168.20.0/24). Devices: 1x Router 2911 (R1), 2x PC PC1: 192.168.10.10/24, gateway 192.168.10.1. PC2: 192.168.20.10/24, gateway 192.168.20.1.
PC1 on R1's G0/0 (192.168.10.0/24), PC2 on G0/1 (192.168.20.0/24). Devices: 1x Router 2911 (R1), 2x PCs. PC1: 192.168.10.10/24, gateway 192.168.10.1. PC2: 192.168.20.10/24, gateway 192.168.20.1.
R1 پر routing table پڑھو۔ کوئی کنفگ نہیں — صرف پڑھنا ہے۔
R1 par routing table parho. Koi config nahi — sirf parhna hai.
Read the routing table on R1. No config — just reading.
enableshow ip route سے دیکھو کہ کون سے روٹس ہیں۔ Codes سمجھو: C=connected، L=local، S=static، O=OSPF، D=direct
show ip route se dekho ke kaun se routes hain. Codes samjho: C=connected, L=local, S=static, O=OSPF, D=direct
Use show ip route to see which routes exist. Understand the codes: C=connected, L=local, S=static, O=OSPF, D=direct.
show ip routeshow ip route 192.168.20.0Forwarding decision ٹیسٹ کرو۔ راؤٹر سب سے لمبی match (longest prefix match) والی entry چنتا ہے۔
Forwarding decision test karo. Router sab se lambi match (longest prefix match) wali entry chunta hai.
Test the forwarding decision. The router picks the entry with the longest match (longest prefix match).
show ip route | include 192.168.10.0/25، /24 سے زیادہ specific ہے۔ یہی forwarding decision کا اصول ہے
/25, /24 se zyada specific hai. Yehi forwarding decision ka usool hai
A /25 is more specific than a /24. That's the rule of forwarding decisions.
ping 192.168.20.1 source 192.168.10.1ٹیسٹنگ: PC1 سے PC2 کو پنگ کرو اور سوچو: R1 نے پیکٹ G0/1 کی طرف کیوں بھیجا؟
Testing: PC1 se PC2 ko ping karo aur socho: R1 ne packet G0/1 ki taraf kyun bheja?
Testing: ping PC2 from PC1 and think: why did R1 send the packet toward G0/1?
show ip route میں 192.168.20.0 والی لائن دیکھو — یہی جواب ہے۔
show ip route mein 192.168.20.0 wali line dekho — yehi jawab hai.
Look at the 192.168.20.0 line in show ip route — that's the answer.
show ip route — ہر لائن کا code سمجھو۔ show ip route
show ip route — har line ka code samjho. show ip route
show ip route — understand each line's code. See the exact match with show ip route
show ip routeshow ip route 192.168.20.0