Geek Culture
Published in

Geek Culture

Open Shortest Path First

OSPF (Open Shortest Path First)

OSPF is a standardized Link-State routing protocol, designed to scale efficiently to support larger networks.

OSPF Characteristics

The OSPF process builds and maintains three separate tables:

Different types of routers in OSPF

Each OSPF router is identified by a unique Router ID. The Router ID can be determined in one of three ways:

Hello / Dead Interval

DR and BDR election


OSPF Area types

OSPF Network Types

• No DRs and BDRs.

• All OSPF traffic is multicast to

• Neighbors do not need to be manually specified.

2. Point-to-Multipoint — indicates a topology where one interface can connect to multiple destinations. Each connection between a source and destination is treated as a point-to-point link.

• OSPF will not elect DRs and BDRs.

• All OSPF traffic is multicast to

• Neighbors do not need to be manually specified.

3. Broadcast Multi-Access — indicates a topology where broadcast occurs.

• OSPF will elect DRs and BDRs.

• Traffic to DRs and BDRs is multicast to Traffic from DRs and BDRs to other routers is multicast to

• Neighbors do not need to be manually specified.

• Examples Ethernet

4. Non-Broadcast

5. Non-broadcast Multi-access Network (NBMA) — indicates a topology where one interface can connect to multiple destinations; however, broadcasts cannot be sent across an NBMA network.

• An example would be Frame Relay.

• OSPF will elect DRs and BDRs.

• OSPF neighbors must be manually defined, thus All OSPF traffic is unicast instead of multicast.

OSPF DR and BDR election

OSPF elects a Designated Router (DR) for each multi-access network, accessed via multicast address For redundancy purposes, a Backup Designated Router (BDR) is also elected.

DR and BDR election

To change the priority on an interface:

Router(config)#Interface fa 0/0
Router(config-if)# ip ospf priority 125

OSPF routers will form adjacencies with the DR and BDR. If a change occurs to a link, the update is forwarded only to the DR, which then forwards it to all other routers. This greatly reduces the flooding of LSAs.

Note: The DR election process is not preemptive. Thus, if a router with a higher priority is added to the network, it will not automatically supplant an existing DR. We need to clear the OSPF process for another DR/BDR election, which is not good in a production environment.

OSPF neighbors

In OSPF, routers have to become neighbors first before exchanging link-state advertisements (LSA). After configuring OSPF on routers it will start sending hello packets to each other. The Hello packets also serve as keepalives to allow routers to quickly discover if a neighbor is down. Hello packets also contain a neighbor field that lists the Router IDs of all neighbors the router is connected to.

OSPF routers will only become neighbors if the following parameters within a Hello packet are identical on each router:

7 Benefits of OSPF Protocol

OSPF (Open Shortest Path First) is an Interior Gateway Protocol (IGP). It’s used to decision routing in the autonomous systems. It realizes the Link State Routing Protocol, belonging to IGP, so that it works in the internal system. As a common protocol, let’s know 7 benefits of it.

1. OSPF is a true LOOP- FREE (route-free loop) routing protocol. It is derived from the merits of the algorithm itself.

2. Fast convergence of OSPF: The route changes can be transmitted to the entire autonomous system in the shortest time.

3. The concept of area division is proposed. After the autonomous system is divided into different regions, the summary of routing information between the regions is adopted, which greatly reduces the quantity of routing information to be transmitted. It also makes routing information not expand rapidly as the network scale increases.

4. The protocol itself minimizes the overhead. See below:

(1) For the discovery and maintenance of neighbor relationships, the hello messages that do not contain routing information are sent regularly and are very short. The message containing the routing information is the mechanism that triggers the update. (Send when there is a route change). However, in order to enhance the robustness of the protocol, it is re-issued every 1800 seconds.

(2) In broadcast networks, multicast addresses are used instead of broadcast to reduce the interference to other network devices that do not operate OSPF.

(3) In various types of networks that can be accessed multiple times (broadcast, NBMA), by electing DR, the number of route exchanges (synchronizations) between routers on the same network segment is reduced from O (N*N) times to O (N) times.

(4) The concept of an NSSA area is proposed so that the introduced ASE route is no longer propagated within the NSSA area.

(5) Supports route aggregation on ABRs (Area Border Routers) to further reduce routing information transfer between regions.

(6) In the point-to-point interface type, OSPF over On Demand Circuits is configured so that it no longer sends hello packets periodically and updates routing information regularly. Updates are sent only when the network topology really changes.

5. Through the strict division of the level of routing (a total of four points), it provides more reliable routing.

6. Good security. OSPF supports interface-based plaintext and md5 authentication.

7. OSPF adapts to various scales of networks, up to thousands of units.

OSPF Disadvantages

→ very intensive processor
→ maintaining multiple copies of routing information, increasing the amount of memory needed
→ OSPF can be logically segmented by using areas
not as easy to learn as some other protocols
→ if an entire network is running OSPF, and one link within it is “bouncing” every few seconds, then OSPF updates would dominate the network by informing every other router every time the link changed state.

Thank you! keep learning! keep growing! keep sharing!

Krithika Sharma
If you enjoyed this give it a clap, follow me on Medium for more
Let’s connect on LinkedIn



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store