๐ OSPF (Open Shortest Path First)
OSPF is a link-state dynamic routing protocol that automatically exchanges routing information between routers and calculates the shortest path using the SPF algorithm.
This is dynamic routing.
Until now in static routing:
๐ You manually added routes.
Now with OSPF:
๐ Routers automatically learn routes from each other.
This is heavily used in:
- Enterprise networks
- ISPs
- Data centers
- Corporate environments
๐ฏ What You Will Learn
- ✔ Dynamic route learning
- ✔ Neighbor relationships
- ✔ Route advertisement
- ✔ Automatic path selection
- ✔ Scalable routing
๐ฅ Difference: Static vs OSPF
๐งช Practical Topology
In Cisco Packet Tracer create:
PC0 --- R1 --- R2 --- R3 --- PC1
๐ IP Addressing Plan
๐น LAN Networks
๐น Router-to-Router Links
๐ Wiring (IMPORTANT)
PC Connections
Router Connections
⚙️ Step 1: Configure Router Interfaces
๐น Router1
enable configure terminal interface g0/0 ip address 10.0.0.1 255.255.255.0 no shutdown interface g0/1 ip address 192.168.1.1 255.255.255.252 no shutdown
๐น Router2
enable configure terminal interface g0/0 ip address 192.168.1.2 255.255.255.252 no shutdown interface g0/1 ip address 192.168.2.1 255.255.255.252 no shutdown
๐น Router3
enable configure terminal interface g0/0 ip address 192.168.2.2 255.255.255.252 no shutdown interface g0/1 ip address 20.0.0.1 255.255.255.0 no shutdown
⚙️ Step 2: Configure PCs
PC0
IP: 10.0.0.10
Gateway: 10.0.0.1
PC1
IP: 20.0.0.10
Gateway: 20.0.0.1
❌ Test Before OSPF
From PC0:
ping 20.0.0.10
❌ Fail
Because routers don’t know remote networks yet.
๐ฅ Step 3: Configure OSPF
๐น Router1
router ospf 1 network 10.0.0.0 0.0.0.255 area 0 network 192.168.1.0 0.0.0.3 area 0

๐น Router2
router ospf 1 network 192.168.1.0 0.0.0.3 area 0 network 192.168.2.0 0.0.0.3 area 0
๐น Router3
router ospf 1 network 192.168.2.0 0.0.0.3 area 0 network 20.0.0.0 0.0.0.255 area 0
๐ง Important Concept
What is Area 0?
๐ Backbone area of OSPF
All routers communicate inside Area 0.
๐ฅ Step 4: Verify Neighbor Relationship
Run:
show ip ospf neighbor
You should see neighboring routers.
๐ฅ Step 5: Verify Routing Table
Run:
show ip route
You’ll see routes marked:
O
๐ Means learned through OSPF
๐งช Final Test
From PC0:
ping 20.0.0.10
✔ SUCCESS















0 comments:
Post a Comment
For Any Tech Updates, Hacking News, Internet, Computer, Technology and related to IT Field Articles Follow Our Blog.