What is an OSPF virtual link and when would you use one?
Show the answer
Say this first
A virtual link is a logical area 0 link through a non-backbone transit area, between two ABRs. It connects
an area that has no physical link to area 0, or rejoins a partitioned backbone. It is configured on both
ABRs with area <transit> virtual-link <far-end router ID>. I treat it as a temporary fix.
Go deeper
Example
Area 2 attaches only to R3. R3 connects to area 1. R2 is the ABR between area 0 and area 1.
! R2 (router ID 2.2.2.2)
router ospf 1
area 1 virtual-link 3.3.3.3
!
! R3 (router ID 3.3.3.3)
router ospf 1
area 1 virtual-link 2.2.2.2The arguments are the transit area and the router ID of the other end, not an IP address.
R3# show ip ospf virtual-links
Virtual Link OSPF_VL0 to router 2.2.2.2 is up
Run as demand circuit
DoNotAge LSA allowed.
Transit area 1, via interface GigabitEthernet0/0/0
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Adjacency State FULL (Hello suppressed)Rules
- The transit area cannot be a stub or NSSA, and cannot be area 0.
- The virtual link is part of area 0, so area 0 authentication applies to it.
- It runs as a demand circuit: hellos are suppressed once Full, and its LSAs do not age.
- Its cost is the intra-area cost through the transit area.
Why it is a stopgap
Traffic between the two areas still crosses the transit area, often on links not sized for it, and troubleshooting gets harder. The real fix is a physical link into area 0 or a renumbered area design.
They will ask next
Can a GRE tunnel do the same job?
Yes. A GRE tunnel between the two ABRs, with the tunnel interface in area 0. It works through stub areas too, but adds encapsulation overhead and MTU care.
Traps
- Giving the far end's interface IP instead of its router ID.
- Using a stub area as transit.