{"id":863,"date":"2024-08-13T19:16:36","date_gmt":"2024-08-13T13:46:36","guid":{"rendered":"http:\/\/ipwithease.com\/?p=863"},"modified":"2025-04-01T15:33:06","modified_gmt":"2025-04-01T10:03:06","slug":"ospf-virtual-link","status":"publish","type":"post","link":"https:\/\/ipwithease.com\/ospf-virtual-link\/","title":{"rendered":"How to Configure OSPF Virtual Link?"},"content":{"rendered":"<div id=\"ipwit-126296505\" class=\"ipwit-before-content ipwit-entity-placement\" style=\"width: 728px;\"><div class=\"ipwit-adlabel\">Google ADs<\/div><div style=\"height: 90px;\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-1375203873676133\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:inline-block;width:728px;height:90px;\" \ndata-ad-client=\"ca-pub-1375203873676133\" \ndata-ad-slot=\"9359532231\"><\/ins> \n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div><\/div>\n<div class=\"wp-block-rank-math-toc-block has-white-background-color has-background\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#introduction-to-ospf-virtual-link\">Introduction to OSPF Virtual Link<\/a><\/li><li><a href=\"#ospf-virtual-link-configuration-example-scenario\">OSPF Virtual Link Configuration: Example Scenario<\/a><\/li><li><a href=\"#another-scenario\">Another Scenario<\/a><\/li><li><a href=\"#continue-reading\">Continue Reading<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"introduction-to-ospf-virtual-link\">Introduction to OSPF Virtual Link<\/h2>\n\n\n\n<p><strong>Virtual links<\/strong>&nbsp;are used to extend Area 0 across another area. They also can be thought of as tunnels for LSAs. They are deployed in cases when areas become partitioned or an area does not border Area 0. To configure a virtual link, use the following router command:<\/p>\n\n\n\n<p><strong>Router(config-route)#<\/strong>area \u201ctransit_area_id\u201d virtual-link \u201crouter_id_of_remote\u201d<\/p>\n\n\n\n<p>The area_id is the \u201c<strong>transit area<\/strong>\u201d that OSPF will tunnel through. The \u201ctransit area\u201d cannot be a stub area of any kind. At the end of the tunnel will be another router terminating the virtual link; use the router ID of that router in the router_id field. Virtual links use RIDs, and they are another reason why we use fixed RIDs when configuring OSPF. Remember that a virtual link is actually an extension of Area 0. Think of the virtual link as the router\u2019s new interface into Area 0. Configure all interface options on the virtual link.<\/p><div id=\"ipwit-1297277425\" class=\"ipwit-content ipwit-entity-placement\"><div class=\"ipwit-adlabel\">Google ADs<\/div><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-1375203873676133\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block;\" data-ad-client=\"ca-pub-1375203873676133\" \ndata-ad-slot=\"2483378328\" \ndata-ad-format=\"auto\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div><br style=\"clear: both; display: block; float: none;\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"ospf-virtual-link-configuration-example-scenario\">OSPF Virtual Link Configuration: Example Scenario<\/h2>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" width=\"800\" height=\"455\" src=\"https:\/\/ipwithease.com\/wp-content\/uploads\/2020\/09\/OSPF-VIRTUAL-LINK-1.jpg\" alt=\"\" class=\"wp-image-14211\" title=\"\" srcset=\"https:\/\/ipwithease.com\/wp-content\/uploads\/2020\/09\/OSPF-VIRTUAL-LINK-1.jpg 800w, https:\/\/ipwithease.com\/wp-content\/uploads\/2020\/09\/OSPF-VIRTUAL-LINK-1-300x171.jpg 300w, https:\/\/ipwithease.com\/wp-content\/uploads\/2020\/09\/OSPF-VIRTUAL-LINK-1-600x341.jpg 600w, https:\/\/ipwithease.com\/wp-content\/uploads\/2020\/09\/OSPF-VIRTUAL-LINK-1-768x437.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>The Below example scenario will help illustrate where , when and how to use <span style=\"color: #0000ff;\"><a href=\"https:\/\/www.cisco.com\/c\/en\/us\/support\/docs\/ip\/open-shortest-path-first-ospf\/47866-ospfdb7.html\" target=\"_blank\" rel=\"noreferrer noopener\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-1-color\">OSPF virtual link configuration<\/mark><\/a><\/span> in the OSPF domain \u2013<\/p>\n\n\n\n<p>As depicted in the diagram , we have 3 areas connected in series \u2013 Area 0 , Area 1 and Area 2.<\/p>\n\n\n\n<p>The IP address , subnets and interface detail in respective area is shown in the table \u2013<img decoding=\"async\" class=\"alignnone size-full wp-image-865\" src=\"https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-02.png\" alt=\"ospf-virtual-link\" width=\"677\" height=\"370\" title=\"\" srcset=\"https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-02.png 677w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-02-300x164.png 300w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-02-600x328.png 600w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-02-150x82.png 150w\" sizes=\"(max-width: 677px) 100vw, 677px\" \/><\/p>\n\n\n\n<p>Once the OSPF is configured as per above table , we can see the OPSF neighborship formed amongst all the OSPF speaking routers R1 , R2, R3 and R4:<\/p>\n\n\n\n<p> <img decoding=\"async\" width=\"703\" height=\"364\" class=\"alignnone size-full wp-image-866\" src=\"https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-03.png\" alt=\"ospf-virtual-link\" title=\"\" srcset=\"https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-03.png 703w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-03-300x155.png 300w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-03-600x311.png 600w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-03-150x78.png 150w\" sizes=\"(max-width: 703px) 100vw, 703px\" \/><\/p>\n\n\n\n<p>Now Lets see , how many routes R1 learns from its OSPF neighbor R2:<\/p>\n\n\n\n<p><img decoding=\"async\" width=\"703\" height=\"61\" class=\"alignnone size-full wp-image-868\" src=\"https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-04.png\" alt=\"ospf-virtual-link\" title=\"\" srcset=\"https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-04.png 703w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-04-300x26.png 300w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-04-600x52.png 600w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-04-150x13.png 150w\" sizes=\"(max-width: 703px) 100vw, 703px\" \/><\/p>\n\n\n\n<p>As we see, no Inter area (OIA) route is being learnt by R1 . The reason \u2013 OSPF rule book says , a non-backbone area cannot learn OSPF routes from another non backbone area , which means R1 (in Area 2) cannot learn OSPF routes of Area 1 (which again is another non-backbone area) directly.<\/p>\n\n\n\n<p>Also , lets see whether R3 learns Area 2 routes: <\/p>\n\n\n\n<p><img decoding=\"async\" width=\"707\" height=\"110\" class=\"alignnone size-full wp-image-869\" src=\"https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-05.png\" alt=\"ospf-virtual-link\" title=\"\" srcset=\"https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-05.png 707w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-05-300x47.png 300w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-05-600x93.png 600w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-05-150x23.png 150w\" sizes=\"(max-width: 707px) 100vw, 707px\" \/><\/p>\n\n\n\n<p>And as expected , no routes learned by R3 for networks in Area 2<\/p>\n\n\n\n<p>Now , how do we correct this situation and have OSPF to have R1 to learn routes from Area 1 and Area 0.<\/p>\n\n\n\n<p>The solution is Virtual Link \u2013 We need to extend the Backbone (Area 0 ) via virtual link up to ABR Router R2.Note \u2013 Virtual link is a logical link using the least cost path between the ABR of the non-backbone connected area and the backbone ABR of the transit area.<\/p>\n\n\n\n<p>The configuration needs to be performed in the transit area ABR routers ie between R2 and R3 as follows: <\/p>\n\n\n\n<p><img decoding=\"async\" width=\"706\" height=\"127\" class=\"alignnone size-full wp-image-870\" src=\"https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-06.png\" alt=\"ospf-virtual-link\" title=\"\" srcset=\"https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-06.png 706w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-06-300x54.png 300w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-06-600x108.png 600w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-06-150x27.png 150w\" sizes=\"(max-width: 706px) 100vw, 706px\" \/><\/p>\n\n\n\n<p>Now , lets see how the ospf neighbor tabe looks like after Virtual link is configured between ABRs R2 and R3: <\/p>\n\n\n\n<p><img decoding=\"async\" width=\"706\" height=\"209\" class=\"alignnone size-full wp-image-871\" src=\"https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-07.png\" alt=\"ospf-virtual-link\" title=\"\" srcset=\"https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-07.png 706w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-07-300x89.png 300w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-07-600x178.png 600w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-07-150x44.png 150w\" sizes=\"(max-width: 706px) 100vw, 706px\" \/><\/p>\n\n\n\n<p>Finally , its time to see whether R1 (Area 2) receives all the routes post configuration of virtual link between R2 and R3 (ABRs on transit Area 1).<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"707\" height=\"186\" src=\"https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-08.png\" alt=\"ospf-virtual-link\" class=\"wp-image-872\" title=\"\" srcset=\"https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-08.png 707w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-08-300x79.png 300w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-08-600x158.png 600w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-08-150x39.png 150w\" sizes=\"(max-width: 707px) 100vw, 707px\" \/><\/figure>\n\n\n\n<p>The virtual link successfully extends Area 0 up to Area 2 (via transit area 1)<\/p>\n\n\n\n<p><img decoding=\"async\" width=\"709\" height=\"176\" class=\"alignnone size-full wp-image-873\" src=\"https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-09.png\" alt=\"ospf-virtual-link\" title=\"\" srcset=\"https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-09.png 709w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-09-300x74.png 300w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-09-600x149.png 600w, https:\/\/ipwithease.com\/wp-content\/uploads\/2018\/01\/028-ospf-virtual-link-09-150x37.png 150w\" sizes=\"(max-width: 709px) 100vw, 709px\" \/><\/p>\n\n\n\n<p>The Routers now have the complete routing table.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"another-scenario\">Another Scenario<\/h2>\n\n\n\n<p>Another Scenario where we need to implement virtual link \u2013<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" width=\"800\" height=\"291\" src=\"https:\/\/ipwithease.com\/wp-content\/uploads\/2020\/09\/OSPF-VIRTUAL-LINK-2.jpg\" alt=\"\" class=\"wp-image-14212\" title=\"\" srcset=\"https:\/\/ipwithease.com\/wp-content\/uploads\/2020\/09\/OSPF-VIRTUAL-LINK-2.jpg 800w, https:\/\/ipwithease.com\/wp-content\/uploads\/2020\/09\/OSPF-VIRTUAL-LINK-2-300x109.jpg 300w, https:\/\/ipwithease.com\/wp-content\/uploads\/2020\/09\/OSPF-VIRTUAL-LINK-2-600x218.jpg 600w, https:\/\/ipwithease.com\/wp-content\/uploads\/2020\/09\/OSPF-VIRTUAL-LINK-2-768x279.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p id=\"fWwUlst\">In the above topology, Area 0 has been split into 2 parts and separated by Area 1.<\/p>\n\n\n\n<p>On the left side, R1 &amp; R2 are in Area 0 and on the right side, R3 &amp; R4 are again in Area 0, separated by Area 1 configured on directly connected interfaces of R2 &amp; R3.<\/p>\n\n\n\n<p>Since, Area 0 should be single backbone area unlike the above diagram. So, in order to render it a single backbone domain, a virtual link needs to be configured between R2 &amp; R3. Once this configuration is done (i.e. single backbone area is configured) OSPF domain will not have any challenge and the database table would be consistent.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"continue-reading\"><span style=\"color: #ff6600;\">Continue Reading:<\/span><\/h2>\n\n\n\n<p><span style=\"color: #0000ff;\"><em><strong><a style=\"color: #0000ff;\" href=\"https:\/\/ipwithease.com\/ospf-lsa-types\/\" target=\"_blank\" rel=\"noopener\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-1-color\">OSPF LSA Types: The Ultimate Guide<\/mark><\/a><\/strong><\/em><\/span><\/p>\n\n\n\n<p><span style=\"color: #0000ff;\"><em><strong><a style=\"color: #0000ff;\" href=\"https:\/\/ipwithease.com\/ospf-external-e1-and-e2-routes\/\" target=\"_blank\" rel=\"noopener\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-1-color\">OSPF External E1 vs E2 Routes<\/mark><\/a><\/strong><\/em><\/span><\/p>\n<h3>ABOUT THE AUTHOR<\/h3><div id=\"ipwit-3522370650\" class=\"ipwit-post-end-ad ipwit-entity-placement\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-1375203873676133\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block;\" data-ad-client=\"ca-pub-1375203873676133\" \ndata-ad-slot=\"2483378328\" \ndata-ad-format=\"auto\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div><br style=\"clear: both; display: block; float: none;\"\/>","protected":false},"excerpt":{"rendered":"<p>Introduction to OSPF Virtual Link Virtual links&nbsp;are used to extend Area 0 across another area. They also can be thought [&hellip;]<\/p>\n","protected":false},"author":782,"featured_media":14210,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[177],"tags":[96,45],"class_list":["post-863","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-routing-switching","tag-configuration","tag-ospf"],"_links":{"self":[{"href":"https:\/\/ipwithease.com\/wp-json\/wp\/v2\/posts\/863","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ipwithease.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ipwithease.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ipwithease.com\/wp-json\/wp\/v2\/users\/782"}],"replies":[{"embeddable":true,"href":"https:\/\/ipwithease.com\/wp-json\/wp\/v2\/comments?post=863"}],"version-history":[{"count":0,"href":"https:\/\/ipwithease.com\/wp-json\/wp\/v2\/posts\/863\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ipwithease.com\/wp-json\/wp\/v2\/media\/14210"}],"wp:attachment":[{"href":"https:\/\/ipwithease.com\/wp-json\/wp\/v2\/media?parent=863"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ipwithease.com\/wp-json\/wp\/v2\/categories?post=863"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ipwithease.com\/wp-json\/wp\/v2\/tags?post=863"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}