All areas in an Open Shortest Path First (OSPF) autonomous system must be physically connected to the backbone area (area 0). In some cases where this is not possible, you can use a virtual link to connect to the backbone through a non-backbone area. You can also use virtual links to connect two parts of a partitioned backbone through a non-backbone area. The area through which you configure the virtual link, known as a transit area, must have full routing information. The transit area cannot be a stub area. This document examines the OSPF database in a virtual link environment. 




Router 1.1.1.1 

Current configuration: 

hostname r1.1.1.1 

interface Loopback0 
ip address 1.1.1.1 255.0.0.0 

interface Ethernet2/0/0 
ip address 4.0.0.1 255.0.0.0 

interface Serial2/1/0 
ip address 5.0.0.1 255.0.0.0 

router ospf 2 
network 4.0.0.0 0.255.255.255 area 0 
network 5.0.0.0 0.255.255.255 area 1 
area 1 virtual-link 3.3.3.3 

!--- The area "1" is the transit area. The IP 
!--- address "3.3.3.3" is the router ID of the 
!--- connecting link. See the Note below. 

end 

Note: The OSPF router-id is usually the highest IP address on the box or the highest loopback address, if one exists. The router-id is only calculated at boot time or any time the OSPF process is restarted. Use the show ip ospf interface command to find the router-id. 
--------------------- 
Router 2.2.2.2 

Current configuration: 

hostname r2.2.2.2 

interface Loopback0 
ip address 2.2.2.2 255.0.0.0 

interface Serial0/1/0 
ip address 5.0.0.2 255.0.0.0 

interface ATM1/0.20 point-to-point 
ip address 6.0.0.2 255.0.0.0 

router ospf 2 
network 6.0.0.0 0.255.255.255 area 1 
network 5.0.0.0 0.255.255.255 area 1 

end 
--------------------- 

Router 3.3.3.3 

Current configuration: 

hostname r3.3.3.3 

interface Loopback0 
ip address 3.3.3.3 255.0.0.0 

interface Ethernet0/0 
ip address 12.0.0.3 255.0.0.0 

interface ATM2/0.20 point-to-point 
ip address 6.0.0.3 255.0.0.0 

router ospf 2 
network 12.0.0.0 0.255.255.255 area 2 
network 6.0.0.0 0.255.255.255 area 1 
area 1 virtual-link 1.1.1.1 

end 
How the Virtual Link Operates 

Initially, the virtual link is down because Router 1.1.1.1 does not know how to reach Router 3.3.3.3 (the other end of the virtual link). All the link state advertisements (LSAs) in area 1 need to be flooded, and the shortest path first (SPF) algorithm needs to run within area 1 by all three routers in order for Router 1.1.1.1 to know how to reach Router 3.3.3.3 through area 1. 

After the routers know how to reach each other through the transit area, they try to form adjacency across the virtual link. The OSPF packets between the two ends of the virtual link are not multicast packets. They are tunneled packets since they are tunneled to the other end of the virtual link. 

Once the routers become adjacent on the virtual link, Router 3.3.3.3 considers itself an area border router (ABR) since it now has a link in area 0. As a result, Router 3.3.3.3 creates a summary LSA for 12.0.0.0/8 in area 0 and area 1. 

If the virtual link is misconfigured for some reason, then Router 3.3.3.3 does not consider itself an ABR since it does not have any interfaces in area 0. If this is the case, it does not create summary LSAs or advertise 12.0.0.0/8 into area 1.