OSPF Virtual Link Configuration

What do you do when the OSPF area has no direct connection to the backbone? Read our post on this and other solutions for IT Pros. Read more.

Notice: This blog post was originally published on Indeni before its acquisition by BlueCat.

The content reflects the expertise and perspectives of the Indeni team at the time of writing. While some references may be outdated, the insights remain valuable. For the latest updates and solutions, explore the rest of our blog

Key Takeaways
  • OSPF is a link-state IGP that uses Dijkstra’s algorithm and requires all non-backbone areas to connect to area 0.
  • When an OSPF area cannot be physically connected to area 0, a virtual link can logically extend the backbone through a transit area.
  • Configuring an OSPF virtual link requires defining OSPF on the transit routers with a common area and then specifying the virtual-link to the remote router ID under that area.
  • The transit area used for a virtual link must not be a stub or NSSA area to allow backbone LSAs to pass through.
  • The “show ip ospf virtual-links” command verifies virtual link status, adjacency state, timers, and transit interface/cost.
  • Once the virtual link is up, routers in the previously isolated area can receive routing updates from area 0, restoring full OSPF convergence.

We all know about OSPF (Open Shortest Path First) protocol–a fast link state protocol that is a go-to IGP (Interior Gateway Protocol) routing in large enterprises. It is also an open source protocol.

OSPF calculates shortest path for each route using Dijkstra’s algorithm. It uses area 0 as a backbone and every other area must be directly connected to it. There are cases in which we need to circumvent this rule and connect the OSPF area through the transit area to area 0. This occurs, for example, when the OSPF area has no direct connection to the backbone.

The configuration solution is an OSPF virtual link.

Let’s look at the following example:

R3 has no physical connection to the backbone, which means it cannot get routing updates. We will create an OSPF virtual link through R1 and R2 to connect R3 to area 0 by going through transit area AS100.

OSPF Configuration Virtual Link example:

Follow these steps to configure an OSPF virtual link:

  • Configure OSPF

R1:

router ospf 1 log-adjacency-changes network 192.168.1.0 0.0.0.255 area 0 network 10.0.0.0 0.0.0.255 area 100

R2:

router ospf 1 log-adjacency-changes network 10.0.0.0 0.0.0.255 area 100 network 172.16.0.0 0.0.0.255 area 200

  • Apply a virtual link with the following commands:

R1:

area 1 virtual-link 10.0.0.1

R2:

area 1 virtual-link 10.0.0.2

  • To verify the virtual link, use the following command:

show ip ospf virtual-links

This is the output you should get:

R1#

show ip ospf virtual-links

Virtual Link OSPF_VL0 to router 10.0.0.2 is up

Run as demand circuit DoNotAge LSA allowed.

Transit area 100, via interface FastEthernet0/0, Cost of using 1 Transmit Delay is 1 sec, State POINT_TO_POINT,

Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:06 Adjacency State FULL (Hello suppressed) Index 1/2, retransmission queue length 0, number of retransmision 0 First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0) Last retransmission scan length is 0, maximum is 0 Last retransmission scan time is 0 msec, maximum is 0 msec

That’s it! Now R3 will be able to receive routing updates from area 0 and you will have a converged network.

Related content

Three armored figures walking toward a futuristic Las Vegas skyline with pyramids, glowing orb, and "Welcome to Fabulous Las

Your journey to intelligent NetOps begins at Cisco Live

Visit BlueCat’s booth or book a meeting now to learn more about how our solutions can help you build a network that supports constant change.

Read more
Stacked colorful wooden directional arrows on a post by a calm seaside with distant hills and blue sky

Replace BIND and ISC with Micetro DNS/DHCP Server (MDDS)

Tired of patching and manually configuring BIND DNS and ISC DHCP? Discover how Micetro MDDS appliances can replace them for modern DDI.

Read more
Row of orange industrial robotic arms positioned along an automated conveyor belt in a factory setting

Automate it all in Integrity with REST v2 API-first DDI management

Discover API-first DDI with Integrity X by using REST v2 to automate DNS, DHCP, and IPAM for scalable, secure network operations.

Read more
Three colleagues at monitors collaborating, overlaid with network, analytics, cloud, and gear icons.

Agentic AI adoption in network observability propels NetOps teams

Network observability is crucial for today’s networks and even more capable with agentic AI, according to new Omdia and BlueCat research.

Read more

⏳ Cisco Live is almost here. Put BlueCat on your agenda for smarter, more secure networks.