April 19, 2019

OSPF Routing Protocol: Popular and Robust - page 2

Traffic Cop For Your Routing Domain

  • October 22, 2008
  • By Charlie Schluting

The election ballot can be stuffed, with a Priority ID, so that you can ensure that your beefiest router is the DR. Otherwise, the largest IP address wins. The key idea with a DR and backup DR (BDR) is that they are the ones to generate LSAs, and they must do database exchanges with other routers in the subnet. So, non-designated routers form adjacencies with the DR. The whole DR/BDR design is used to keep the protocol scalable. The only way to ensure that all routers have the same information is to make them synchronize their databases. If you have 21 routers, and want to bring another one up, then you�d have to form 21 new adjacencies. If you centralize the database, with a backup (just in case), then adding more becomes an easy to manage linear problem.

The database exchange is part of bringing up adjacencies after the hello packets are exchanged, and it�s very important. If the databases are out of sync, we could risk routing loops, blackholes and other perils. The third part of bringing up an adjacency is Reliable Flooding, or LSA exchange.

The details of an LSA, as well as a more advanced discussion of areas will be the topic of the next Networking 101. For now, just know that area zero is special, and if you have multiple areas, they must all touch area zero. This is also called the Backbone Area. There are different types of areas in OSPF, and it can get really crazy when you throw in Virtual Links to allow two areas to speak without hitting area zero. Alas, there also are different types of routers in OSPF.

An Area Border Router is a router that is in area zero, and one or more other areas.

A Designated Router, as we said, is the router that keeps the database for the subnet. It sends and receives updates (via multicast) from the other routers in the same network.

The Autonomous System Boundary Router is very special, but confusing. The ASBR connects one or more AS, and exchanges routes between them. The ASBR�s purpose is to redistribute routes from another AS into its own AS.

The concept of redistribution finally rears its head: let�s say we have a router, an internal-only router (not a BR), and we wish to connect it to a new network that we don�t control. After this connection is made, we have a few options. We can fire up a non-IGP routing protocol, like BGP, to exchange routes. Alternatively, we could decide that a summary route is good enough, and hard-code a static route to the new network in this router. Anything directly using this router for this destination would be able to get to the new network, but OSPF doesn�t know about it. To make that happen, we �redistribute� the miscellaneous information into OSPF. We wouldn�t want to feed 200K+ routes from BGP into OSPF, but if we went the static route, we�d definitely want to propagate that information so everyone in our AS could get to the new place. As soon as we tell our internal router that it should redistribute static routes into OSPF, it becomes an ASBR, and the entire network can reach the new network.

Come back next week for the areas and LSA discussion, which will consolidate your understanding of the whole OSPF concept, and enable you to understand good OSPF design.

In a Nutshell
  • OSPF is a fast-converging, link-state IGP used by millions.
  • OSPF forms adjacencies with neighbors and shares information via the DR and BDR using Link State Advertisements.
  • Areas in OSPF are used to limit LSAs and summarize routes. Everyone connects to area zero, the backbone.

Article courtesy of Enterprise Networking Planet, originally published June 1, 2006

When he's not writing for Enterprise Networking Planet or riding his motorcycle, Charlie Schluting is the Associate Director of Computing Infrastructure at Portland State University. Charlie also operates OmniTraining.net, and recently finished Network Ninja, a must-read for every network engineer.

Most Popular LinuxPlanet Stories