Intro to OSPFv2 – CCNA 200-301

computer networks

TLDR, Summary of this lesson:

This solely focuses on OSPFv2, for IPv4. OSPFv3 will be touched on later. OSPF is the open shortest path first routing protocol, which uses the Link-State Routing Process. Has a shorter AD, Administrative Distance, than other routing protocols. The shortest path is determined based on Dijkstra’s Shortest Path First Algorithm. OSPF will send Hello packets to neighboring routers to begin adjacency and create an OSPF domain. Neighboring routers respond with their DBDs, Database description packets, which contain that routers link-state database. If more information is requested, a router will send an LSR, Link-state request. The receiving router will respond with an LSAck (Link-state acknowledgement) and reply with any LSUs (Link State updates). A router can also send an LSA (link-state advertisement), advertising it’s updates. OSPF will elect a DR, designated router, to act as its primary OSPF router in the domain. There is also a BDR, backup DR that is designated should the DR fail. These routers determine the shortest path for a packet to take based on AD.

Anything not touched on in detail here will be touched on in a later lesson.


OSPF means “Open Shortest Path First.” It’s a routing protocol that uses the Link State routing algorithm. This means that the routers in an OSPF network will communicate by sending Link-State messages. These Link-State messages are also called OSPF Packet Types. The OSPF packet types are as follows:

Hello – Establish and maintain adjacency (become an OSPF neighbor) with other OSPF routers

DBD – Database Description – Contains an abbreviated list of the sending router’s link-state database

LSR – Link-State Request – The receiving router will request more information about an entry in the DBD by sending LSRs

LSU – Link-State Update – This is in reply to an LSR and announces new information. These contain 11 types of LSAs (link-state advertisements) which, thankfully, we don’t need to know for the CCNA 200-301.

LSA – Link-State Advertisement – A router will advertise any updates to its routing table to all OSPF neighbors.

LSAck – Link-State Acknowledgement – After an LSU is received, the router will respond with an acknowledgement to confirm the receipt of the LSU.


Summary of how OSPF uses the Link-State Routing Process to maintain adjacency:

  1. Each router will learn its own links and its own connected networks. This is done by detecting the UP state, and the L3 address configured
  2. Each router is then responsible for establishing adjacency by exchanging Hello packets
  3. Each router builds an LSP (Link-State Packet) containing the state of each directly connected link. It records the Neighbor ID, link type, and bandwidth
  4. Routers flood the LSP to all neighbors, and each neighbor will store the LSP in a database. All the neighbors then flood the LSPs to their neighbors until all OSPF routers have received the LSPs. Each router stores these LSPs in the DBD.
  5. Each router uses the DBD to construct a map of the topology and determine the best path to each destination network based on the cost of the interfaces. All routers know the topology, but each router independently determines the shortest path to a specific destination.


How does OSPF know the shortest path to take to route traffic? By default, each interface type has a ‘cost.’ The default cost of each interface is listed below:

10Gig/Gigabit/FastEthernet (100 mb/s or higher) – 1

Ethernet (10 Mb/s) – 10

E1 (2 Mb/s) – 48

T1 (1.544 Mb/s) – 64

There are costs for slower speeds, however, you won’t need to know them and it is unlikely you will encounter them. For determining the cost of a route, you would add the cost of the interfaces together. For instance, if RouterA is sending a packet to RouterC through RouterA’s f/a01 and RouterB’s g/i01 then the cost for the route would be 11, (1 + 10). Thankfully, any questions in the CCNA will provide you with the cost of the interfaces on a topology, and it will be up to you to determine the shortest path based on those costs.

You can also interfere with these elections by changing the default cost of an interface. You would do this to set a static route and make sure a router always sends traffic to a specific router through a specific route.


For two routers to establish and maintain adjacency and continue being neighbors, they must have certain matching values. Think of your neighbors, if you want to stay next to them, you have to have the same interest. So, what are those interests?

Hello Interval – By default, every 10 seconds the router will send a Hello to Multiaccess networks, and every 30 seconds to nonbroadcast multiaccess networks. Remember, Hello packets establish and maintain adjacency.

Dead Interval – By default, the rate is 4x the Hello Interval. This is the amount of time that passes before a router determines that an adjacent neighbor has died, or is no longer available.

Network Type – Both routers must be on the same network with the same subnet mask, they must also both be set up for OSPF.

Area ID – The Area ID must match between both routers. This is not touched on in this lesson but will be detailed in the next lesson.


There are several issues inherent with OSPF working on multi-access networks :

The Creation of multiple adjacencies

Flooding of LSAs

So, how does OSPF combat this? The solution is by electing both a DR (direct router) and a BDR (backup direct router.) The direct router’s job is to update all other OSPF routers when a change occurs in the multiaccess network. The BDR monitors the DR to ensure that it is active, and will take over if the DR fails. All other routers in the OSPF network become DROTHERs, and the default operation is DROTHER 2-WAY.

As I said above, anything not touched in this basic overview will be discussed in a later section. I hope this helps and if you have any questions feel free to reach out. If you enjoy my guides and are currently studying for an IT certification, feel free to sign up for my newsletter to be notified when I post guides and general study and productivity tips.

Stay happy, healthy, and productive!

Leave a Reply