OSPF Virtual Links

Virtual Link is a non-Physical connectivity or link. As we know OPSF must be connected with Backbone Area0 but sometime it becomes difficult due to some reasons. So there we required Virtual Links for logical connection to Backbone.

Also known as logical link which uses in least cost path connectivity between routers or ABR or backbone/Non-backbone. A virtual link does not have ABR physical Connectivity to Backbone till to configure virtual link between non-backbone area and Backbone. In between two routers, a virtual link can be configured, that have an interface to a single common Transit/Non-backbone area but it can’t happen in multiple transit/Non-backbone area. Transit/Non-backbone area keeps an ABR which is connected with Backbone area.

 

GRE tunnels can also serve the same purpose but it adds a lot of extra overhead when the network size grows. There are some other differences as well which are listed in below:

 

 

Configuration Example

Lets have this explained through an example. Consider below topology with three areas:

Here are three Areas shown in picture as Area 0, Area 1 & Area 2. Here Area 2 is not connected with Area 0 but it is possible by using Virtual Link that can extend Area 0 through Area 1, so Area 2 will be directly connected to Area 0. Let’s take a look at how a virtual link can solve this problem.

The following example configures a virtual link between two devices.

R1(config)#router ospf 1
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0
R1(config-router)#network 12.12.12.0 0.0.0.255 area 1
R2(config)#router ospf 1
R2(config-router)#network 12.12.12.0 0.0.0.255 area 1
R2(config-router)#network 23.23.23.0 0.0.0.255 area 2
R3(config)#router ospf 1
R3(config-router)#network 23.23.23.0 0.0.0.255 area 2
Now, lets configure Virtual Links. First, we need to bring the OSPF. Second step is to configure the OSPF router ID of the other ABR.
An important point here is that: we need to configure the OSPF Router ID, NOT the IP address of the ABR. 
R1(config)#router ospf 1
R1(config-router)#area 1 virtual-link 23.23.23.2
R2(config)#router ospf 1
R2(config-router)#area 1 virtual-link  1.1.1.1

 

After this configuration, if everything is OK even Area2 is not directly connected to Backbone Area (Area0), it will still be connected to Area0 virtually. Let’s try to ping R1’s loopback from R3:

R3#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/3/6 ms

 

We can also use the #show ip ospf virtual-links command to check if our virtual-link is working:

R1#show ip ospf virtual-links
Virtual Link OSPF_VL0 to router 192.168.23.2 is up
Run as demand circuit
DoNotAge LSA allowed.
Transit area 1, via interface FastEthernet0/0, Cost of using 1

 

Written by 

Waqas Karim is a seasoned Network Expert … Geek. He is the founder of ATech. ATech was started for learning & sharing. Over time the platform has grown to include other resources which continue to attract fellow networkers. Today it sees upward trend of a hundred thousand visitors per month, scattered all over the globe. His specialty is networking, but his interest & expertise spans from traditional IT to Network Security including Programming, Virtualization, Service Provider & so on... no matter the badge on the box. He is CCIE Certified (CCIE#56732) in addition to below badges: Telecom Engineer (BE) + CCIE-RS (CCIE#56732) + Huawei Certified (HW#706632) + MBA Microsoft Certified MCITP, MCSE#109*26, CCNP-Sec, CCNP-SP, CCNA-DC, CompTIA Security+, Nokia NRS-I, JNCIA, ITIL Certified (ITIL#*6373), CEH (Certified Ethical Hacker).

avatar
5 Comment threads
4 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
Waqas KarimZhang LeeOliver GeorgeJoseph KenAbraham.K Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Zhang Lee
Guest
Zhang Lee

Is there any solution to the problem, OSPF virtual links could not be created on unnumbered interface on point to point links.

Oliver George
Guest
Oliver George

Are OSPF Virtual links allowed in Stub Areas or only in normal areas?

Joseph Ken
Guest
Joseph Ken

So, if there are multiple links available for a Virtual link, how does it decide which one to choose from?

Abraham.K
Guest
Abraham.K

Nice post. Thanks for sharing.

Adisa Albert
Guest
Adisa Albert

I read Virtual Link but i have some confusion. In a case, ABR A connects Area 0.0.0.1 and Area 0.0.0.0 and ABR B connects Area 0.0.0.1 and Area 0.0.0.2. Then there should be a virtual link between ABR A and ABR B?