اس لیب میں آپ single-area OSPFv2 کانفیگر کرنا سیکھیں گے — ڈائنامک راؤٹنگ کا سب سے اہم پروٹوکول۔ Neighbor adjacency اور route exchange خود دیکھیں گے۔
Is lab mein aap single-area OSPFv2 configure karna seekhenge — dynamic routing ka sab se ahem protocol. Neighbor adjacency aur route exchange khud dekhoge.
In this lab you'll configure single-area OSPFv2 — the most important dynamic routing protocol. You'll see neighbor adjacency and route exchange with your own eyes.
Static route میں آپ خود ہر راستہ لکھتے ہیں — شہر چھوٹا ہو تو ٹھیک ہے۔ لیکن شہر بڑا ہو تو بہتر ہے کہ ہر ڈاک خانہ خود نقشہ بنائے۔ OSPF یہی کرتا ہے: راؤٹرز آپس میں hello کہتے ہیں، دوستی (neighbor) بناتے ہیں، اور پورا نقشہ (link-state database) خود بنا لیتے ہیں۔ راستہ بند ہو تو فوراً نیا ڈھونڈ لیتے ہیں۔
Static route mein aap khud har rasta likhte hain — sheher chhota ho to theek. Lekin bara sheher ho to har dak khana apne aap naksha banaye to behtar. OSPF yehi karta hai: routers aapas mein hello kehte hain, dosti (neighbor) banate hain, aur poora naksha (link-state database) khud bana lete hain. Rasta band ho to foran naya dhoond lete hain.
With static routes you type every path yourself — fine for a small town. But in a big city it's better if every post office builds its own map. OSPF does exactly that: routers greet each other with hello packets, become neighbors, and build the full map (link-state database) themselves. If a path goes down, they find a new one instantly.

R1 S0/0/0 سے R2 S0/0/0 (192.168.20.0/30)۔ دونوں راؤٹرز area 0 میں ہیں۔ Devices: 2x Router 2911 (R1, R2), 2x PC۔ PC1: 192.168.10.10/24، گیٹ وے 192.168.10.1۔ PC2: 192.168.30.10/24، گیٹ وے 192.168.30.1۔
R1 S0/0/0 se R2 S0/0/0 (192.168.20.0/30). Dono routers area 0 mein hain. Devices: 2x Router 2911 (R1, R2), 2x PC PC1: 192.168.10.10/24, gateway 192.168.10.1. PC2: 192.168.30.10/24, gateway 192.168.30.1.
R1 S0/0/0 to R2 S0/0/0 (192.168.20.0/30). Both routers are in area 0. Devices: 2x Router 2911 (R1, R2), 2x PC. PC1: 192.168.10.10/24, gateway 192.168.10.1. PC2: 192.168.30.10/24, gateway 192.168.30.1.
R1 پر OSPF۔ OSPF process 1 شروع کرو، router-id سیٹ کرو (ہر راؤٹر کی پہچان)۔
R1 par OSPF. OSPF process 1 start karo, router-id set karo (har router ki pehchan).
OSPF on R1. Start OSPF process 1 and set a router-id (each router's identity).
enableconfigure terminalrouter ospf 1router-id 1.1.1.1پھر network command سے بتاؤ کہ کون سے interfaces OSPF میں حصہ لیں گے — wildcard mask الٹا ہوتا ہے (0.0.0.255)۔
Phir network command se batayo ke kaun se interfaces OSPF mein hissen — wildcard mask ulta hota hai (0.0.0.255)
Then use the network command to say which interfaces join OSPF — the wildcard mask is inverted (0.0.0.255).
network 192.168.10.0 0.0.0.255 area 0network 192.168.20.0 0.0.0.255 area 0exitR2 پر OSPF۔ R2 پر بھی وہی process، مگر الگ router-id۔
R2 par OSPF. R2 par bhi same process, alag router-id.
OSPF on R2. Same process on R2, but a different router-id.
enableconfigure terminalrouter ospf 1router-id 2.2.2.2دونوں راؤٹرز hello packets سے neighbor بنیں گے اور routes کا تبادلہ کریں گے۔
Dono routers hello packets se neighbor banenge aur routes exchange karenge
Both routers will become neighbors via hello packets and exchange routes.
network 192.168.20.0 0.0.0.255 area 0network 192.168.30.0 0.0.0.255 area 0exitTesting: پہلے show ip ospf neighbor — state FULL ہونی چاہیے۔ پھر PC1 سے PC2 کو ping کرو۔
Testing: Pehle show ip ospf neighbor — state FULL honi chahiye. Phir PC1 se PC2 ping karo.
Testing: first check show ip ospf neighbor — state should be FULL. Then ping PC2 from PC1.
پھر serial cable نکالو اور دیکھو کہ OSPF فوراً route ہٹا دیتا ہے۔
Phir serial cable nikalo aur dekho ke OSPF foran route hata deta hai.
Then remove the serial cable and watch OSPF instantly remove the route.
show ip ospf neighbor سے adjacency دیکھو۔ show ip route میں O والے routes کنفرم کرو۔
show ip ospf neighbor se adjacency dekho. show ip route mein O wale routes confirm karo.
Check adjacency with show ip ospf neighbor. Confirm the O routes in show ip route.
show ip ospf neighborshow ip route