OSPF Overview
What is OSPF?
- OSPF (Open Shortest Path First) is a widely used routing protocol.
- It is an open standard, meaning it is supported by almost all routers.
- OSPF is an Interior Gateway Protocol (IGP), designed for use within a single autonomous system.
- It is a link-state protocol, meaning it learns the network topology and maintains a common database.
Key Concepts
- Link-State Advertisements (LSAs): OSPF routers use LSAs to share information about the network, including subnets and router information.
- Link-State Database (LSDB): This database contains all the information learned from LSAs, ensuring each router has the same view of the network.
OSPF Operation Steps
-
Becoming OSPF Neighbors
- Routers agree to form neighbor relationships to share routing information.
-
Exchanging Database Information
- Neighbors exchange LSDB information after establishing neighbor relationships.
-
Choosing the Best Routes
- Each router runs a calculation to determine the best routes to add to the routing table.
Forming Neighbor Relationships
- Router ID: Each router must select a unique Router ID (RID), which acts like a name for the router. The RID can be set manually or determined automatically based on the highest loopback interface IP or highest non-loopback IP.
- Hello Messages: Routers send hello messages containing their RID and known neighbors to establish connections.
Requirements for OSPF Neighbor Relationships
- Area ID must match.
- Connecting links must be on the same subnet.
- Hello and dead timers must be the same (default hello timer is 10 seconds).
- Authentication must match if used.
- Unique Router IDs are required.
OSPF States
- Init State: The initial state where routers exchange hello messages.
- Two-Way State: Routers recognize each other as neighbors.
- Designated Router (DR) and Backup Designated Router (BDR): In multi-access environments, a DR and BDR are elected to reduce network traffic during updates.
Database Exchange Process
- ExStart State: Routers determine the master/slave relationship based on Router IDs.
- Exchange State: Routers send Database Description (DBD) messages to share their LSAs.
- Loading State: Routers request LSAs they do not have, ensuring they have complete information.
- Full State: Once all LSAs are exchanged, routers enter the full state.
Route Selection Process
- OSPF chooses the best routes using a metric called Cost based on bandwidth.
- Reference value is 100,000 kbps by default.
Cost Examples
- Serial interface (1544 kbps) = Cost 64
- Ethernet (10,000 kbps) = Cost 10
- Fast Ethernet (100,000 kbps) = Cost 1
- Anything faster than Fast Ethernet also has a cost of 1.
Example Route Calculation
- Router 1: Total cost to reach 10.0.0.0 = 138
- Router 2: Total cost = 30
- Router 5: Total cost = 12
- Best Route: Router 5 has the lowest cost and thus is selected to be added to the routing table.
Conclusion
- OSPF is a robust routing protocol that supports efficient routing decisions based on the network topology and link costs.
- For more details on specific features, further study is encouraged.
Note: In British English, "Router" may be pronounced as "Rooter."