How to configure OSPF Virtual Link

Hello Sathish

Yes, you’re on the right track. The reason the LSAs learned through the virtual link are still in the LSDB even after removing the virtual link is due to the DNA flag. When an LSA has the DNA flag set, it prevents the LSA from aging out of the LSDB, meaning the LSA stays indefinitely until explicitly removed or until the OSPF process is removed, or the device is reset.

This behavior occurs because OSPF’s DNA flag is typically set for LSAs that originate from interfaces marked as point-to-point or virtual links to ensure they persist as long as possible across the network.

Now depending on the vendor and the implementation, simply clearing the OSPF process doesn’t always clear out LSAs marked with DNA. Clearing the OSPF process typically initiates a soft reset rather than a full teardown of the OSPF database. When you clear the process, OSPF re-establishes neighbor relationships, refreshes LSAs, and recalculates the routing tables, but it doesn’t entirely flush LSAs marked with the DNA flag out of the LSDB.

To remove them completely, a reload or a removal of the OSPF config is necessary.

I hope this has been helpful!

Laz

Hi,
I was just trying configuring the VL in my lab and noticed the virtual link didnt come up until I changed the network type between routers to point-to-pint. is there any restriction with other type of links?
Thanks

Hello Yasamin

Hmm, that’s interesting. There is no restriction to creating a point-to-point network type in order for a virtual link to come up. However, the network type of the intermediate area, where the virtual link is configured, influences how OSPF adjacencies form and how LSAs are propagated.

Make sure that the network type is the same on both ends of the virtual link in order to make it work. I suggest you check the config on both of those routers, and let us know what you find. You can also share your configs on the two routers becoming OSPF neighbors over the virtual link so that we can help you further…

I hope this has been helpful!

Laz

Hello, everyone.

Why do LSAs learned via a VL never expire? They have the DC bit set. Do they not need to be refreshed and ensured that they’re still valid? Or is it enough that they are already refreshed over the physical links?

Also, the neighbors seem to be permanent after the VL is established yet the VL still allows me to configure hello and dead intervals?

Thank you

David

Hello David

Ah, these are more questions about the specific operation of OSPF and the nuances of the various components and what they’re used for. Let’s dig in…

These are issues that have to do with LSA aging and adjacency maintenance over virtual links.

Here, there are two related but different bits that are set. The DC bit in the OSPF options field indicates a router’s ability to support demand circuits. In RFC1793 which describes this, it says:

  Setting the DC-bit in self-originated LSAs tells the rest of
  the routing domain that the router can correctly process DoNotAge
  LSAs 

Then we have the Do Not Age or DNA bit, described on this page of the same RFC is the bit that is set to prevent the LSA from aging.

Now, why are LSAs sent over a virtual link configured not to expire? Virtual links are automatically treated as OSPF demand circuits by design (see that RFC1793). When LSAs are flooded over a virtual link, they have the DNA bit set. This is an optimization that is automatically applied because the virtual links are backbone links. They carry backbone LSAs that are tunneled through non-backbone areas, and if these expire, they could, even temporarily, falsely partition area 0, and this would introduce instability. So by design, to avoid such situations, they never expire. However, if topologies change and new LSAs are generated, these are still sent over the virtual links as well, refreshing those LSAs. The lack of expiration does not result in the lack of refreshing LSAs when topology changes occur.

The hello and dead intervals serve a slightly different purpose than the non-expiring LSAs. The DNA bit applies to LSAs, not the adjacency itself. Virtual links send unicast Hello packets across the transit area. If the path through the transit area fails, these Hellos stop arriving. When the Dead interval expires, the virtual link adjacency drops.

So virtual links establish and maintain OSPF adjacencies just like physical links, so they’re not permanent in that sense. The Hello/dead timers ensure the virtual path remains viable. If hellos aren’t received within the dead interval, the adjacency will fail.

I hope this has been helpful!

Laz

Hello Laz,

Thank you for all the explanations, I appreciate it!!

David

1 Like