OSPF virtual link lab (Scenario 1)

Written on by admin on. Posted in OSPF

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.

OSPF Virtual Link (Scenario 1)

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.

R1

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

R2

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

R3

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.

Neighbor relationship between R1-R2 and R2-R3

Neighbor relationship between R1-R2 and R2-R3

Neighbor relationship between R1-R2 and R2-R3

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.1
R3
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.

Virtual Links status on R1

Virtual Links status on R1

Neighbor relationship on R1

Neighbor relationship on R1

Ping result from R1 to R3

Ping result from R1 to R3

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.

8542 views

Comments (2)

  • JOEL OGBECHIE

    |

    I have a couple of questions. We have a loopback interfaces. why is it not picked as the router id which is not indicated in your show run command output. Also there are no no shut commands in there.
    I love your work. Thumbs up

    Reply

  • admin

    |

    Hi JOEL,
    Sorry about “no shutdown” commands, they where there but weren’t added in article commands, adjusted now :). Regarding Router ID, to me it looks right, if you are asking about 10.0.1.1 then that’s from Router 2, it doesn’t have a loopback and the highest IP is chosen. Or I’m missing something, can you please specify?

    Reply

Leave a comment


9 − = six