Online Tutorials & Training Materials |
Register Login

Top OSPF Interview Questions and Answers

|| 0

Top OSPF Interview Questions and Answers

What is OSPF and what is its full form?

OSPF stands for (Open Shortest Path First) and is a routing protocol that is used to determine the shortest path for packets to reach a destination. It is developed by the Internet Engineering Task Force and is one of the most popular Gateway Protocols. Using this protocol, a router can detect a change in the routing table or the network and it can multicast to the other OSPF hosts.

What are some important characteristics of OSPF?

Some important characteristics of OSPF are as follows:

  • It works on protocol number 89 and is a network layer protocol
  • For normal communication, it uses multicast address and for updating to a router
  • It provides routing information to the TCP/IP model in the IP section
  • It is more efficient is sending routing information than RIP (Routing Information Protocol) as it handles less traffic
  • It works on the SPF (Shortest Path First) algorithm

How does OSPF work?

Routers send routing information and associated changes in the table using the OSPF protocol. Instead of sending the entire table, OSPF only sends the part of the table that has been altered. This configuration information is stored in a Link State Database. Using this data, it will determine the best and fastest route to send data packets to a destination.

What is LSA in OSPF?

OSPF fills the Link State database with the LSA (Link State Advertisement) information. LSA is used for sharing the basic routing topology information to the other local routers. These LSAs are exchanged between routers until all of them have the same database of topology data.

What are LSA types in OSPF?

The different types of LSA in OSPF are as follows:

  • LSA Type 1: Router LSA
  • LSA Type 2: Network LSA
  • LSA Type 3: Summary LSA
  • LSA Type 4: Summary ASBR LSA
  • LSA Type 5: Autonomous system external LSA
  • LSA Type 6: Multicast OSPF LSA
  • LSA Type 7: Not-so-stubby area LSA
  • LSA Type 8: External attribute LSA for BGP
  • LSA Type 9: Link Scope Opaque (OSPFv2) / Intra Area Prefix LSA (OSPFv3)
  • LSA Type 10: Area Scope Opaque LSA
  • LSA Type 11: AS (Autonomous System) Scope Opaque LSA

What is the OSPF protocol?

The OSPF protocol is used for exchanging routing information between neighbouring routers. The  LSA helps the routers ensure that all of them have the same topology information in their databases. The protocol helps to determine the nearest hop address by using the SPF algorithm.

How many networks types are in OSPF?

The different network types in OSPF are:

  • Point-to-point – Here, data packets are sent between exactly two routers.
  • Broadcast – The data packets are sent from one router to multiple routers.
  • Non-Broadcast – The network here supports access to many devices but does not allow the broadcast capability.

Why is OSPF a loop-free protocol?

OSPF is called a loop-free protocol because of the presence of the link-state database. The database offers a complete view of the network. This prevents routing loops that are common in distance vector protocols. OSPF avoids loops by applying the inter-area loop-free topology.

What is OSPF Hello and Dead Interval?

Two timers and hello packets are implemented by OSPF for analysing whether a neighbouring router is alive or not. 

The Hello interval describes the time interval in which an OSPF router transmits a Hello packet. For point-to-point links, the default interval value is 10 seconds. For a shared network, this interval has to be the same.

The Dead interval defines the time interval that for which a router will wait before declaring a neighbouring router dead. Both Hello and Dead interval values can be different depending upon the type of network.

What is the area concept in OSPF?

OSPF networks are divided into smaller domains called areas. An area in OSPF can be called a collection of links, networks and routers. If a router belongs to a certain area, a topological area for that area has to be maintained. The link-state database of the routers needs to be same within that area.

Why we use Area 0 in OSPF?  

In OSPF, networks under a single autonomous system can be broken down further into multiple areas. So, Area 0 is created by default. It can work as an independent area or as the backbone area for OSPF.  It is usually defined as

The different areas that are connected to Area 0 have to traverse it. The connection does not have to be direct and a virtual link can be used to establish it. 

Explain the difference between e1 and e2 in OSPF.

E1 are External Type routes that define the cost required from ASBR (Autonomous System Boundary Router) to the destination. Here the internal cost and the external metric are considered.

But in the External Type routes or E2, the internal costs are not considered. Only the external metrics are calculated to reach a particular destination.

If there are two E2 routes for reaching a destination, the path having the lowest metric from the ASBR is considered for sending data.

What is DR and BDR in OSPF?

In OSPF, a Backup Designated Router (BDR) and Designated Router (DR) is used for exchanging information between different routers. Depending upon the network, one router is selected as DR and another as the BDR.

In each broadcast network, the DR is the contact point for the network segment. All routers become adjacent with the DR while handling all the LSAs for the network. The information about the DR is sent by the router using the multicast address

To avoid problems in case of DR failure, a BDR is selected for the network. It becomes active when the DR fails and listens to the multicast address

What is DR and BDR election process?

Depending upon the type of network, an OSPF router elects one router as DR and another as BDR. On a point-to-point network, as the routers are connected directly there is no election of BDR or DR. In LANs, the router having the highest priority in OSPF is elected as a DR. The priority is1 by default. In case two routers have the same priority, the router with the highest router ID will be elected.

The next router with the highest router ID or having the second-highest priority is elected as BDR.

What is Router ID?

Every OSPF router is uniquely identified using a router ID. Every router is assigned an ID that is an IPV4 address. This ID must not be duplicated as it will prevent two routers to be neighbours. Furthermore, the OSPF and BGP use this ID to determine the original router from which a packet was generated.

What are the different router types in OSPF?

The different types of routers in OSPF are as follows:

  • Backbone router
  • Internal router
  • Area Border Router (ABR)
  • ASBR (Autonomous System Boundary Router)

Explain the difference between EIGRP vs OSPF?

The differences between EIGRP and OSPF are as follows:



It stands for Enhanced Interior Gateway Protocol and is a hybrid type protocol.

It stands for Open Shortest Path First and link-state protocol.

This requires low CPU power and memory

Requires high processing power and memory

It is based on the Cisco Proprietary standards.

This protocol is based on the IETF Open Standard

The routing metrics consist of load, reliability, bandwidth, and delay.

Routing metrics consist of the interface bandwidth

Summarization and filtering are possible anywhere in the network.

This is possible only on ABR or ASBR.