OSPF Fundamentals in a can

This again will be bullet point facts on Fundamental OSPF concepts, with a taste into Advanced topics, but I will save the Advanced topics for their posts (such as LSA’s, Stub Areas, IPv6, etc). This will get me up to speed in Chris Bryants Book so I am where I am at on his video series, where I will be launching into the more Advanced topics, so the posts will be more grueling to read and probably post from this point forward!

  • A Backbone router can be both a Backbone router AND an Area Boarder Router, but an Area Boarder Router cannot be a Backbone router, here is why:
  • Backbone Router = A router that has an interface in Area 0 – That’s it.
  • Area Boarder Router (ABR) = A router that has at least one interface in Area 0 and an interface in a non-0 Area
  • Internal Router = An OSPF router with all of it’s interfaces in a single Area, but that Area does not have to be Area 0, like R4 in Area 34 (if it’s loopback were removed)
  • Autonomous System Boarder / Boundary Router = A router Redistributing routes
  • Any router in Area 0 is considered a Backbone Router, an ABR, and possibly an ASBR,  however routers without an interface in Area 0 are non-backbone routers
  • LSU’s (Link State Update) are exchanged by OSPF speaking routers once an Adjacency is formed, which contain LSA’s (Link State Advertisement) that are put into the ‘Link State Database’
  • The Dijkstra / SPF Algorithm is run against this database when a new LSA is received to update the OSPF routing table, routers should all have synched link-state DB’s
  • “show ip ospf database” to see links, link types, sequence numbers, and time since LSA was received (Age)
  • The SPF Algorithm calculates what’s called the ‘Shortest Path Tree’, and that Tree is used to create the routing table – No more details currently on Shortest Path Tree
  • LSA Sequence numbers ensure OSPF routers have the most recent information
  • If there is no entry for that link, the receiving router will make one and flood the LSA out every OSPF enabled interface except the one it was received on
  • If there is an entry for the link, one of the following three situations occur:
  • The sequence # is the same, the LSA is discarded, no further action taken
  • The sequence # received is lower, the LSA is ignored, and an LSU containing the more recent LSA is sent back to the original sender to update its link state DB
  • The sequence # received is higher, the router adds the LSA to its link state DB and sends an LSAcknowledgment to the sender, it will then flood the LSA and run the SPF algorithm to update its OSPF routing table
  • After the initial LSA exchange between two OSPF neighbors is complete, there will not be an exchange until a network topology change occurs, however OSPF routers do send out summary LSA’s once every 30 minutes
  • ***IMPORTANT*** For neighbors to form an adjacency, the routers must agree on Area number, Hello and Dead timers, and whether the Area is a stub or not (and also any Authentication configured in the Area)
  • The OSPF Process # (router ospf #) is locally significant only
  • “show ip ospf neighbor” is the only command to show neighbor loading states, shows Neighbor ID (RID), Priority, State, Dead Timer, Neighbor IP, Interface neighbor was learned off of
  • “show ip ospf interface s0/1” gives you A LOT of details regarding Area / Network type / RID / DR and BDR’s RID / Hello and Dead timers / Neighbor info / etc – ***Very good show command for troubleshooting OSPF***
  • When a topology change occurs, the detecting router sends a multicast to (The all DR address) which is heard only by the DR and the BDR, the DR will then multicast the change to to the (All non-DR/BDR OSPF router address) to update DROthers of the topology change, followed by the DROthers sending an LSAck back to the DR to confirm they received the update, the BDR only updates its database when it receives an update on to keep an up to date DB but does nothing else in terms of updating any other OSPF routers
  • ***DR / BDR Election process***:
  • All routers with a Priority of 1 or greater are eligible to participate in the DR / BDR election, Priority 1 is the OSPF default, Priority 0 disables election participation
  • The router with the highest Priority is elected the DR, if there is a tie in Priority the RID is used as a tie breaker
  • The RID is comprised firstly and preferably of the highest loopback interface on the router, if no loopback is present the highest physical interface is used, even if that interface is not OSPF enabled (non-OSPF enabled RID interfaces will not be automatically advertised to the OSPF network)
  • Manually setting the RID in router configuration (“router-id x.x.x.x”) will override the OSPF determined RID for the election process
  • Manually setting the Priority directly on a router interface will also rig an election to make a router the DR / BDR / Not participate at all with command “ip ospf priority #”
  • The process is repeated to elect the BDR – A router cannot be the DR AND the BDR for an OSPF segment
  • If a DR goes down temporarily, the BDR is promoted to DR, and the next highest priority / RID will become the BDR, even if the original DR comes back online. Unlike STP, where a new switch with a lower BID will become the root bridge, once the DR and BDR are elected it stays that way until the go down or you ‘clear ip ospf proc’ which brings down all neighbor adjacencies
  • For example: Router A has Priority 100, Router B has Priority 50, Router C has Priority 10. Router A is the DR, Router B is the BDR, Router C is the DROther. If A goes down, B is promoted to DR, C is promoted to BDR, and when A comes back online it is a DROther. If Router B now goes down (DR), then Router C (BDR) will be promoted to the DR, and Router A with the highest Priority will then be promoted to BDR. When Router B comes back online, it will be a DROther, Router C will be the DR, Router A the BDR. Finally, Router C is rebooted, promoting Router A back to DR, Router B is now promoted to BDR, and when Router C comes back up it is now once again the DROther. (I believe this entire confusing process can be done via “clear ip ospf nei”)
  • Different network segment types (Broadcast, NBMA, Point-to-Point) have different hello and dead timers by default, and will need or need to not have a DR or BDR
  • **IMPORTANT NOTE** Area 0 is the Backbone Area, any routers without an interface in Area 0 is a non-backbone router, ALL NONE BACKBONE AREA’S MUST CONTAIN A ROUTER THAT HAS AN INTERFACE IN AREA 0 (or a virtual-link to it)
  • Ethernet segments default to ‘Broadcast’ network type, with Hello / Dead timers of 10/40, and a DR and BDR will be elected
  • NBMA segments default to Non-Broadcast network type, Hello / Dead timers are 30/120 by default, if it is a Hub-and-Spoke network type, only the Hub can be the DR with no BDR’s, this is because if the Hub goes down a spoke router on the segment won’t be able to get Multicasts to the other spoke router, AND ROUTERS DO NOT FORWARD BROADCASTS OR MULTICASTS
  • When configuring OSPF over Frame Relay, make sure your “frame map ip …” statements on the Hub have the ‘broadcast’ option enabled
  • Also ensure both the interfaces on the spokes in the OSPF segment are set to Priority 0 so they do not participate in the election process, again this is done directly on the interface with “ip ospf priority 0”
  • NBMA networks can have a DR and a BDR, but this requires there to be more than one Hub router, as spokes cannot be allowed to become the BDR
  • ***IMPORTANT NOTE*** On Hub router in an NBMA running OSPF, Hub MUST be configured with neighbor statements to the spokes, on all Hub routers to all spokes they communicate to, with “neighbor” in router configuration
  • Point-to-Point network types Hello / Dead timers default is 10/40, no DR / BDR will be elected as there is no need for one a PtP link, State will show a Full/- instead of Full/Dr or Full/DROther because no DR/BDR was elected, no neighbor statement necessary on this type of link, same goes for point-to-multipoint networks, as OSPF see this as a collection of point-to-point links
  • Point-to-Multipoint links default to Broadcast network types, but can be changed on the interface with “ip ospf network point-to-multipoint non-broadcast” configured on the interface, this network type doesn’t require “neighbor” statements in router configuration, but can be used to set the interface cost with “neighbor cost #” to set the cost for that particular neighbor
  • Virtual-Links are used to allow Area’s on a non-backbone router (no physical interfaces in Area 0) form a logical connection to a Backbone router (it is a logical extension of Area 0), through an existing Area between the backbone and non-backbone router must be present – This is referred to as the “Transit Area” of the Virtual-Link, and this Area cannot be ANY type of stub Area
  • To configure the virtual link, the Area not connected to a backbone router must be configured in router configuration via “network …” command, then the following command must be issued on both the backbone and non-backbone router using the NEIGHBORS RID ON THE LOCAL CONFIGURATION
  • “area 34 virtual-link” in router configuration would be the command issued on R3 for a virtual-link between R3 and R4, then “area 34 virtual-link” on R4 to complete the configuration, some errors may pop up until the config is complete
  • “show ip ospf virtual-link” to see link details (much like an interfaces details), and can also see the adjacency with “show ip ospf nei” as the virtual link will show up as a seperate adjacency to the same neighbor
  • ***IMPORTANT*** If Area 0 is using Authentication, then the Virtual-Link must also be using Authentication – Be sure to check this! Another important note, the Transit Area for a Virtual-Link CANNOT BE ANY KIND OF STUB AREA!!!
  • Why not one big Area 0 – Because OSPF was created to use a hierarchical design, so that routers would not need to contain unnecessary routes outside of their Area or logical grouping, thus saving valuable resources like CPU and Memory, because there are less SPF calculations / less LSU and LSA traffic / more Concise route tables
  • “show ip ospf” is a very important troubleshooting commandIt will give you information on the OSPF process running locally, and all Area’s information as well that are seen by the router this command is issued on (including whether Authentication is running)
  • Cost, Bandwidth, and 4 OSPF routers on an Ethernet behavior is covered in detail in my previous post “Finished OSPF Fundamentals, onto Advanced Concepts”
  • OSPF Neighbor formation / Adjacency states is covered in detail as well in a previous post “OSPF Adjacency / Neighbor Formation States” (I know, how fitting)


My last two bullet points refer to previous OSPF posts from me that covers the end of chapter material in details, that I don’t want to rehash here point by point. That is is for the “Fundamentals” to keep in mind when working with OSPF, posts moving forward I imagine will grow increasingly more detailed and difficult to understand 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s