CN Exp 6
CN Exp 6
Objective
• To establish a network using multiple routers.
• To configure OSPF for dynamic routing.
• To verify connectivity between end devices using OSPF.
• To observe how OSPF dynamically updates routing tables.
Apparatus Required
• Software: Cisco Packet Tracer
• Devices:
o 3 Cisco Routers (2911 Series)
o 3 PCs (One per network)
o 3 Switches
o Ethernet Cables
Theory
Introduction to OSPF
Open Shortest Path First (OSPF) is a link-state routing protocol used in IP
networks to determine the most efficient path between routers. It
dynamically updates routing tables based on network changes, ensuring
optimal path selection.
Features of OSPF
1. Uses Link-State Algorithm – OSPF relies on the Dijkstra algorithm to
compute the shortest path.
2. Supports Hierarchical Routing – OSPF divides networks into areas to
optimize routing.
3. Faster Convergence – OSPF quickly adapts to network topology
changes.
1 | Page
Ansh Singh SE-IT-C 67
4. Cost-Based Routing – OSPF determines the best path based on link
cost rather than hop count.
5. Multicast Updates – Uses 224.0.0.5 and 224.0.0.6 for efficient routing
updates.
6. Loop Prevention – Uses the SPF tree to eliminate routing loops.
OSPF Routing Process
1. Neighbor Discovery – Routers exchange Hello packets to form OSPF
neighbor relationships.
2. Database Exchange – Routers share LSA (Link State Advertisements)
to learn about network topology.
3. Shortest Path Calculation – OSPF uses Dijkstra's algorithm to
compute the best path.
4. Routing Table Update – The best paths are stored in the routing table.
OSPF Packet Types
1. Hello Packet – Used to discover and maintain neighbor relationships.
2. Database Description (DBD) – Summary of the OSPF link-state
database.
3. Link State Request (LSR) – Requests missing LSAs from neighbors.
4. Link State Update (LSU) – Contains LSAs sent to other routers.
5. Link State Acknowledgment (LSAck) – Confirms receipt of LSUs.
OSPF Areas
• Single-Area OSPF – All routers are in Area 0 (Backbone).
• Multi-Area OSPF – Divides networks into multiple areas for scalability.
Advantages of OSPF
✔ Supports large networks efficiently.
✔ Provides faster convergence than RIP.
✔ Uses cost metric instead of hop count.
✔ Prevents routing loops.
Disadvantages of OSPF
2 | Page
Ansh Singh SE-IT-C 67
✘ More complex to configure than RIP.
✘ Higher CPU and memory usage.
Working :
3 | Page
Ansh Singh SE-IT-C 67
4 | Page
Ansh Singh SE-IT-C 67
5 | Page
Ansh Singh SE-IT-C 67
6 | Page
Ansh Singh SE-IT-C 67