Today's topic of focus is on the routing protocol OSPF, or Open Shortest Path First. OSPF seems to be one of the most commonly used routing protocols and a highly important topic as the next few chapters in the official Cert Guide all are centered around OSPF.
OSPF works by creating neighbor relationships with other routers in the same network. The neighbor routers will then share their known network topology information with each other through packets called Link State Advertisements (LSA's). LSA's are then compiled on each router and stored in the Link State Database (LSDB).
As a link-sate protocol the main path cost metric is focused around link bandwidth. OSFP uses an algorithm known as Djikstra's Shortest Path First algorithm to calculate path costs. The link cost for OSPF is calculated using a reference bandwidth(100Mb/s) vs interface bandwidth. In this case a higher interface bandwidth would be preferred as it results in a lower path cost.

One of the drawbacks of this cost formula and the reference bandwidth being 100Mb is that the metric cost for any interface running 100Mb or higher speeds (practically every modern connection), the OSPF cost will be 1. Luckily it seems the reference bandwidth can be adjusted to a higher value, allowing us to differentiate costs for higher speed links.
Default OSPF costs:

In summary, the OSPF process can be broken down in 3 main steps:
1 - Routers form neighbor relationships with other routers on the same network segment
2- Neighbor routers exchange LSA's to create a network map and store info in the LSDB
3- The best routes to each destination are calculated and stored in the routing table
OSPF AREAS
One of the main drawbacks of OSPF is scalability. As a network grows, the route calculation becomes much more complex and the LSDB eventually becomes unmanageable. This leads to a heavy increase on CPU and memory while also providing unecessary strain and traffic on a network. These problems can be solved by subdividing the networking into multiple OSPF areas.
An OSPF area is a logical grouping of router interfaces to segment an OSPF domain into smaller more manageable groups. This allows each area to operate independently, with each area keeping its own link-state database. While OSPF areas make the network more complex logically, they simplify the network operationally by allowing for much simpler route calculations.
One key part of multi-area OSPF design is that all areas must connect back to a common area, area 0. This is also known as the backbone area. The backbone area is key for preventing loops in the network, and allows for inter-area routing. Every area must have a router that is connected to Area 0. These routers are called Area Border Routers (ABR). ABR's will have LSDB for both the backbone area and the other areas they are connected to, thus allowing traffic to be passed between areas.
LINK-STATE ADVERTISEMENTS
OSPF routers will advertise their known routes to other routers in their network by using packets called Link-State Advertisements (LSA's). The LSA packets contain information about routes that are used in the SPF calculations to create ideal paths in a network. There are 8 different types of LSA's, each with a specific purpose:
Type 1: Router LSA
Type 2: Network LSA
Type 3: Summary LSA
Type 4: Summary ASBR LSA
Type 5: Autonomous system external LSA
Type 6: Multicast OSPF LSA
Type 7: Not-so-stubby area LSA
Type 8: External attribute LSA for BGP
Type 1 LSA's are the fundamental information for each link in a network, and are the main building blocks that make up a link-state database. Type 1 LSA's are shared between all routers within a same area.
Type 2 LSA's, or network LSA's, are used by the designated router for an area in a multi-access network to share information with all connected routers in the same area.
Type 3 LSA's are summary LSA's that represent the network of an area and is presented to another area, typically Area 0.
The remaining LSA's all have their own specific uses but go beyond the scope of the CCNP exam, so I will skip over them for now.
Created with © systeme.io