OSPF is a link-state routing protocol and it’s one of the routing protocols you need to understand if you want to do the Cisco CCNA, CCNP or CCIE R&S exam(s). In this lesson I’ll explain the basics of OSPF to you and you will learn how and why it works.
I don’t know about you but I love my navigation system. The good thing about them is you can just drive and there is no need to look for traffic signs, the bad thing is that I’m absolutely lost when it’s not working. I’m bad at reading maps (or maybe I just don’t like it) and if I had to find my way to some street in any big city I’m doomed.
Link-state routing protocols are like your navigation system, they have a complete map of the network. If you have a full map of the network you can just calculate the shortest path to all the different destinations out there. This is cool because if you know about all the different paths it’s impossible to get a loop since you know everything! The downside is that this is more CPU intensive than a distance vector routing protocol. It’s just like your navigation system…if you calculate a route from New York to Los Angeles it’s going to take a bit longer than when you calculate a route from one street to another street in the same city.
Let’s take a good look at link-state to see what it exactly means:
- Link: That’s the interface of our router.
- State: Description of the interface and how it’s connected to neighbor routers.
Link-state routing protocols operate by sending link-state advertisements (LSA) to all other link-state routers.
All the routers need to have these link-state advertisements so they can build their link-state database or LSDB. Basically all the link-state advertisements are a piece of the puzzle which builds the LSDB.
If you have a lot of OSPF routers it might not be very efficient that each OSPF router floods its LSAs to all other OSPF routers. Let me show you an example:
Above we have a network with 8 OSPF routers connected on a switch. Each of those routers is going to become OSPF neighbors with all of the other routers…sending hello packets, flooding LSAs and building the LSDB. This is what will happen:
We will get a full-mesh of OSPF neighbors. Each router will flood LSAs to all other routers so we will have a lot of OSPF traffic. Is there any way to make this a bit more efficient?