Hello everybody! There are times when you need in OSPF network to connect backbone area (Area 0) with a non backbone area, but there is no a direct connection between them. The other case is when you want to connect two parts of an Area (let’s say area 0), separated by some other area, we’ll discuss today about this case . To handle such situations you can use OSPF future called “Virtual Links”.
In this scenario we’ll set up a virtual link connection to connect two parts of Area 0 separated by Area 1 (see the other scenario at OSPF Virtual Link scenario 2). In image below is shown topology for this lab.
As you can see in the picture, Router R1 and R3 are in area 0, while R2 in area 1. So, our task is to set up virtual link between R1 and R3 trough Area 1, but before that, let’s configure this network. Also, it is worth mentioning that if you want to use area 1 as a transit one, routers (R1 and R3 in this case) that want to connect trough a virtual link must be part of both areas, the transit area and the transited area, which in our case is area 1 and area 0.
interface Loopback0 ip address 192.168.0.1 255.255.255.0 interface FastEthernet0/0 ip address 10.0.0.2 255.255.255.0 no shutdown router ospf 1 network 10.0.0.0 0.0.0.255 area 1 network 192.168.0.0 0.0.0.255 area 0
interface FastEthernet0/0 ip address 10.0.0.1 255.255.255.0 no shutdown interface FastEthernet0/1 ip address 10.0.1.1 255.255.255.0 no shutdown router ospf 1 network 10.0.0.0 0.0.0.255 area 1 network 10.0.1.0 0.0.0.255 area 1
interface Loopback0 ip address 192.168.1.1 255.255.255.0 interface FastEthernet0/0 ip address 10.0.1.2 255.255.255.0 no shutdown router ospf 1 network 10.0.1.0 0.0.0.255 area 1 network 192.168.1.0 0.0.0.255 area 0
IP addresses of loopback interfaces for R1 and R3 will be Router ID for OSPF Process, while for R2, the Router ID will be the IP address of Fa0/1 since it has the highest value. At this stage we have neighbor relationship between R1-R2 and R2-R3 in area 1.
It is time to create a virtual link between R1 and R3. Configurations we need to do only on R1 and R3.R1
area 1 virtual-link 192.168.1.1R3
area 1 virtual-link 192.168.0.1
In the commands above, area 1 is transit, and IP address is Router ID of the other end of Virtual Link. Commands are written under OSPF configuration mode, very easy. So, now there should be neighbor relationship between R1 and R3 in Area 0. Let’s see it in next pictures when we took screenshots of virtual link status of R1, neighbors and ping to R3 Loopback interface.
Now you can see that results are as expected, Virtual Link is up and R1 with R3 became neighbors in Area 0, also from picture is seen that DNA (Do Not Age) LSA bit is set, so database entries will not be flooded out every 30 minutes on this virtual link.