Cisco Network Essentials // OSPF part 1
Open Shortest Path First (OSPF)
• OSPF, or Open Shortest Path First, is a link-state, open-standard, dynamic routing protocol. OSPF uses an algorithm known as SPF, or Dijkstra’s Shortest Path First, to compute internally the best path to any given route.
• OSPF is classless and converges fairly quickly, using cost as it’s metric. A router running OSPF creates its own database which contains information on the entire OSPF network, not simply neighbor’s routes like EIGRP. This allows the router to make intelligent choices about path selection on its own instead of relying exclusively on neighbor information.
• OSPF routers do form neighbor relationships though. They exchange hellos with neighboring routers and in the process learn their neighbor’s Router ID (RID) and cost. Those values are then sent to the adjacency table.
• Every router is responsible for computing its own best paths to all destinations within an OSPF domain. Once the SPF algorithm selects the best paths, they are then eligible to be added to the routing table.
Link State Database
Once a router has exchanged hellos with its neighbors and captured Router IDs and cost information, it begins sending LSAs, or Link State Advertisements. LSAs contain the RID and cost to the router’s neighbors. LSAs are shared with every other router in the OSPF domain. A router stores all of its LSA information (including info it receives from incoming LSAs) in the Link State Database (LSDB).
I apologize if the acronyms are starting to pile up. OSPF, architecturally speaking, is more complicated than its counterpart EIGRP – and the long list of acronyms and definitions is part of that.
OSPF is different from EIGRP in that it uses areas to segment routing domains. This helps partition routers into manageable groups if the layer 3 network begins to get large.
It all starts with area 0. Every OSPF network must contain an area 0, sometimes referred to as the backbone area and every additional area must be physically connected to area 0. From there, other areas are optional.
Note that the SPF algorithm only runs within a single area, so routers only compute paths within their own area. Inter-area routes are passed using border routers.
All link state databases must match within an OSPF area. This means that the more OSPF-enabled routers are configured for the same area, the more LSA advertisements that must be sent out. After you reach about 50 routers, the high levels of LSA traffic and numerous routing table entries can become a problem. That is why Cisco recommends limiting an OSPF area to no more than 50-100 routers.
The following three factors determine the maximum number of routers:
- How easily the area’s subnets can be summarized
- The type of areas being used
- The number of external LSAs being injected
An added bonus of partitioning out your OSPF network into areas is that it is a natural fit for a hierarchical IP scheme.
To be continued…