Hands-On Lab: Configuring OSPF Virtual Links

This hands-on lab connects a disconnected area to the backbone using an OSPF virtual link, addressing a design violation where an area does not have a direct physical connection to Area 0, and verifies routes flow correctly once the virtual link is established.

OSPF Virtual LinkBackbone Connectivity RequirementArea Transit

~4 min read · Updated Sep 23, 2026

Lab Objective

Configure an OSPF virtual link across a transit area to connect an otherwise-isolated area to the backbone, and verify routes that previously could not propagate begin flowing correctly once the virtual link is established.

Lab Purpose

Every OSPF area must connect directly to Area 0, discussed earlier in this series regarding multi-area design — a strict requirement, not a suggestion. A virtual link provides an exception mechanism for the rare case where physical topology does not allow a direct connection, logically extending the backbone through an intermediate transit area.

Lab Topology

R1 (Area 0) ---- R2 (Area 0/Area 1, ABR) ---- R3 (Area 1/Area 2, ABR) ---- R4 (Area 2)

Area 2 has NO direct connection to Area 0 --
it only connects through Area 1, an invalid
design without a virtual link

Task 1: Configure Basic Multi-Area OSPF

Configure all four routers with OSPF, placing R1-R2's link in Area 0, R2-R3's link in Area 1, and R3-R4's link in Area 2.

Task 2: Observe the Resulting Problem

Confirm R1 cannot learn R4's routes, since Area 2 has no valid path to the backbone.

Task 3: Configure the Virtual Link

Configure a virtual link between R2 and R3, using Area 1 as the transit area, referencing each other's Router ID.

Task 4: Verify the Virtual Link Is Up

Confirm the virtual link shows as active.

Task 5: Verify Routes Now Propagate Correctly

Confirm R1 now learns R4's routes, and vice versa.

Solution and Verification

R1(config)# router ospf 1
R1(config-router)# network 10.1.1.0 0.0.0.3 area 0

R2(config)# router ospf 1
R2(config-router)# network 10.1.1.0 0.0.0.3 area 0
R2(config-router)# network 10.2.2.0 0.0.0.3 area 1

R3(config)# router ospf 1
R3(config-router)# network 10.2.2.0 0.0.0.3 area 1
R3(config-router)# network 10.3.3.0 0.0.0.3 area 2

R4(config)# router ospf 1
R4(config-router)# network 10.3.3.0 0.0.0.3 area 2
R4(config-router)# network 192.168.44.0 0.0.0.255 area 2

R1# show ip route ospf | include 192.168.44

-- (no output -- R4's LAN is completely
--  invisible to R1, since Area 2 has no
--  valid connection to the backbone)

R2# show ip ospf | include Router ID
Routing Process "ospf 1" with ID 2.2.2.2

R3# show ip ospf | include Router ID
Routing Process "ospf 1" with ID 3.3.3.3

R2(config)# router ospf 1
R2(config-router)# area 1 virtual-link 3.3.3.3

R3(config)# router ospf 1
R3(config-router)# area 1 virtual-link 2.2.2.2

-- Both ends reference the SAME transit area
-- (Area 1) and each other's Router ID --
-- this logically extends Area 0 through
-- R2 and R3, treating Area 2 as if it now
-- had an indirect path to the backbone

R2# show ip ospf virtual-links

Virtual Link OSPF_VL0 to router 3.3.3.3 is up
  Run as demand circuit
  Transit area 1, via interface Serial0/0/1

R1# show ip route ospf | include 192.168.44

O IA  192.168.44.0/24 [110/128] via 10.1.1.2

R4# show ip route ospf | include 10.1.1.0
O IA  10.1.1.0/30 [110/128] via 10.3.3.2
-- Routes now flow correctly in both
-- directions across the virtual link

Key Takeaway

A virtual link is explicitly a workaround for a design that violates OSPF's every-area-touches-Area-0 requirement, not a standard design pattern to build around intentionally — the correct long-term fix is almost always re-architecting the physical topology so every area genuinely connects to Area 0 directly, with the virtual link reserved for temporary transitions or genuinely unavoidable physical constraints.

Written & researched by Dr. Shahin Siami

Related Articles

Hands-On Lab: Configuring UDLD

This hands-on lab configures UDLD in aggressive mode on a fiber link between two switches, simulating a unidirectional fiber failure and verifying UDLD detects the mismatch and shuts down the affected port before a Layer 2 loop can form.

Continue

Hands-On Lab: Configuring Loop Guard

This hands-on lab configures Loop Guard on a switch's non-designated ports to prevent a unidirectional link failure from causing a Layer 2 loop, simulating a one-way BPDU loss and verifying the affected port enters a loop-inconsistent blocking state rather than incorrectly transitioning to forwarding.

Continue

Hands-On Lab: Configuring BPDU Guard and BPDU Filter

This hands-on lab configures BPDU Guard globally for PortFast-enabled ports and demonstrates the distinct, riskier behavior of BPDU Filter, comparing how each responds when a switch is connected to an access port that should only ever see end-user devices.

Continue

Hands-On Lab: Configuring Root Guard

This hands-on lab configures Root Guard on switch ports facing access-layer switches to prevent an unauthorized or misconfigured switch from becoming the Spanning Tree root, verifying the port enters a root-inconsistent state when a superior BPDU is received.

Continue

Hands-On Lab: Comprehensive Troubleshooting Challenge

This hands-on lab presents a multi-layer connectivity failure across VLANs, trunking, routing, and NAT simultaneously, requiring systematic bottom-up troubleshooting to identify and correct three independent faults before full connectivity is restored.

Continue

Hands-On Lab: Configuring Enhanced Object Tracking with HSRP

This hands-on lab configures IP SLA-based object tracking on an HSRP-enabled router, automatically lowering its priority when its WAN uplink fails, forcing failover to the standby router without requiring a full interface shutdown.

Continue