How to configure OSPF Virtual Link

This topic is to discuss the following lesson:

Rene ! this is really grt !

Hi, thank you very much for this very easy to understand explanation. Great job rene.

Glad to hear you like it!

Is it possible to build a virtual link over frame-relay link ? for example in the diagram above if the router in between was a frame-relay switch

Hi Jurati,

Yes this is possible, when your OSPF neighbor adjacency is working over the frame relay link you should be able to configure a virtual link.


Hi Rene , according to OSPF " RID is highest IP of loopback interface or software interfaces which are active when OSPF routers start up ,in absence of software/loopback interfaces RID is the highest IP of the active interfaces when OSPF starts "

in this example RID for router Nancy is since it’s the loopback interface for that area

How come RID for router Susan is , for router Susan It’s RID should be of it’s loopback interface

here why does router selects RID as 192168.23.3 since loopback interface is also present in that area .

Hi Nitin,

What you say is correct. The thing with the OSPF router ID however is that it’s non preemptive which means that once it has selected an ID, it will not change it unless you reboot the router or reset the OSPF process. In this example, I probably configure OSPF before adding some of the loopback interfaces. Hope that helps.


Another bit of information: OSPF VLs cannot be constructed if the interface from which the VL would recurse, on either end, is unnumbered. In the first example the Nancy Fa0/0 and Donna Fa0/0 would have to have real IP addresses on them. However, OSPF VLs can transit unnumbered interfaces if those links are in the middle of the area. If area 1 were much larger, and some of the intermediary links were unnumbered, that would work fine. Reason is because although OSPF VLs behave like demand circuits, initially they send unicast hellos between exit interfaces and this must have a real IP address.

Hi Rene,

I configured Discontiguous area 0 for virtual links,by default if we enable loopback interface on the router,it takes loop back interface., i.e as the router ID and one more thing with lab,i get error message like mismatch in the area ID,before I configure a virtual link between router Nancy and Susan.

This lab dint work the way its show in the figure.Need your help in this rene.

Hi Rene
Is it possible for VL’s to be used over different AS? In your example, instead of OSPF area 1, could there be a network running i.e. EIGRP (Nancy and Donna would be ASBR’s), so OSPF area 2 would be directly connected to OSPF area 0 passing through a different AS? If for any reason areas 0 and 2 should belong to the same AS (let’s say after consolidation of two companies, one running only OSPF and the other running both EIGRP and OSPF), could we use VL’s instead of redistribution?

Hi Apostolis,

The virtual link is a OSPF-only feature. Also keep in mind that it doesn’t work with AS numbers, only EIGRP (and BGP) work with AS numbers.

You could make it work with a GRE tunnel though. If you run EIGRP on the /24 instead of OSPF then you can create a GRE tunnel between Nancy / Donna and connect the two distance OSPF areas with that.


Is possible to use virtual links within the same area?

You probably could configure a virtual link between two routers in the same area but there’s no point in doing so :slight_smile:


Is it possible for a virtual link to transit two areas?

For instance, there are areas 0, 1, 2, and 3.

How to create a virtual link that connects area 1 and area 3 together?

Thank you for your detailed explanation!


Hi Lee,

It’s possible but you have to do it in steps.

First create a virtual link between Area 0 and Area 1 so you can reach Area 2. Then you can configure another one from Area 2 to Area 3.


1 Like

Hi Rene
Thank You Very Much…

Rene, why is the Age set to DoNotAge? is there any reason why? thank you

Hi John,

Good question, the only other option where you can set the DNA bit is the “on demand circuit”. This can be used for (WAN) links where you pay for a certain amount of bytes of per minute/second. You don’t want to refresh LSAs on these links since they will keep the link up.

I guess that’s why they also decided to set the DNA bit for the virtual link in case you have links like this.



Hi Rene,

one thing I don’t understand is that once the virtual link is configured between Area 0 and Area 1, we seem to lose visibility of how the O IA routes were learnt from Area 2.

That is, when we do “sh ip ospf dat” there doesn’t seem to be anything showing Area 2…

It seems strange that we lose where the routes are coming from.