top of page
  • paulcapatana

How to configure OSPF multiarea with Virtual link

How to configure OSPF multiarea with Virtual link


1 Introduction to OSPF routing protocol

Open Shortest Path First (OSPF) is one of the Interior Gateway Protocol (IGP), which helps to find the best routing path between the source and the destination router using its own shortest path first (SPF) algorithm. It is a Link-state routing protocol that is used to distribute routing information about data packets within a large Autonomous System.

Link state means that when one route fails the protocol will send an update to OSPF neighbors informing them that specific route has failed and is not trustworthy .

How OSPF Works?

When it is configured, it listens to its neighbors in the networks, and it gathers all the link state data available. This data is then used to make a topology map that contains all available paths in the network. This database is saved for use, and we call it Link State Database.

Once the Link State Database is made, it is used to calculate the shortest path to subnets/networks using an algorithm known as Shortest Path First, developed by Edsger W Dijkstra. OSPF creates 3 tables:

  • Routing Table: It contains currently working best paths that will be used to forward traffic between two neighbors.

  • Neighbor Table: This contains all discovered Open Short Path First neighbors.

  • Topology Table: This one contains the entire road map of the network. This road map includes all the available Open Short Path First routers and keeps calculated data about best and alternative paths.


From CCNA theory we learn that out there could be two possible scenarios :

A. Where all areas connect to area 0 also called backbone area like in below shown topology:



B. Where you have only area 0 available like in below shown topology





But what happens if a third scenario kicks in , a scenario with many areas and some of those areas are not directly connected with backbone area , how do we fix the communication in this case ?

Let’s see what happens and how do we do some magic to make it functional

Below topology would be used for this purpose




As you probably noticed an area is not directly connected to Area0

Now first things first ,let’s configure the interfaces which belong to those routers as shown in below table



After we’ve configured the interfaces and advertised their IPs in proper areas let’s have a look on the routing tables from R3 and R4 routers

OSPF adjacency has been established in both cases





As you can see even if R4 did established an OSPF adjacency with R3 it did not received any routes from R3 and is somehow isolated at least for the moment.

How can we fix that to enable R4 to communicate with the rest of the routers ?


The answer is quite simple : we’ll create a virtual link (can you think of it as of a sort of a tunnel) between the backbone router and the router that’s interconnected with the one that is isolated

For both ends of the virtual link we’ll use the loopback IPs that we’ve configured


First we’ll configure the virtual link end from the backbone router as shown below

It’s normal that a Virtual link would have DOWN state if only one end has been configured




Next we’ll proceed to configure the other Virtual link end on R3 router and after that we’ll check if something has changed in Virtual link status




What do we notice from this screenshot : the fact that OSPF adjacency has been established also via Virtual link and the Virtual link status is now UP


Now let’s have a look on the routing table from R4 router



Can you see that something has changed in the meantime ?

Its routing table now receives routes from its neighbors


Now let’s test the bidirectional connectivity between R4 and R2







So it seems that we’ve done some magic here and R4 is no longer isolated.

I hope this document has been informative and helpful for you 😊

24 views0 comments

Recent Posts

See All
Post: Blog2_Post
bottom of page