OSPF – Detached Backbone

If there is one thing I’ve always been sure about OSPF since my CCNA, it is that all areas need to be connected to the backbone area or “Area 0”

So what if you come across a real life situation where this is just not possible?

This could happen in a number of circumstances but I will explain the two most common;

1. A new area needs to be added to your existing network, however, the connection for this area should be a low cost link with no clear way of implementing the much needed connection to the backbone area.

2. Two companies merge, each with their own OSPF design and their own backbone area. It might be more convenient and/or cost-effective to connect these two networks through an existing non-backbone area. In this case you will end up with two “Area 0″‘s which is not allowed.

For OSPF each area should be contiguous and each non-backbone area should connect to the backbone area through an ABR.
In the above two cases, the network will not meet the requirement and the engineers will have to redesign the network bringing with it costs and downtime.

Enter “Virtual Links”.

OSPF provides provides an alternate tool for the above situations called an OSPF Virtual Link.
Using this Virtual Link, you can create a point-to-point connection between two ABRs, either merging the two backbone area’s from the second scenario or creating a “transit” link through a non-backbone area for the first scenario.

In this update, I will explore how to configure a Virtual Link for the first scenario.

In this topology, we can see that R1’s Loopback interface resides in Area 0 and R3’s in Area 2, causing it to be detached from the backbone area.

Here’s the initial configuration of all three routers.

R1#sh run int fa 0/0

interface FastEthernet0/0
ip address 10.0.0.1 255.255.255.0
duplex auto
speed auto

R1#sh run int lo 1

interface Loopback1
ip address 192.168.0.1 255.255.255.0
ip ospf network point-to-point

R1#sh run | sec ospf
router ospf 10
router-id 1.1.1.1
log-adjacency-changes
network 10.0.0.0 0.0.0.255 area 1
network 192.168.0.0 0.0.0.255 area 0

R2#sh run int fa 0/0

interface FastEthernet0/0
ip address 10.0.0.2 255.255.255.0
duplex auto
speed auto

R2#sh run int fa 0/1

interface FastEthernet0/1
ip address 20.0.0.2 255.255.255.0
duplex auto
speed auto

R2#sh run | sec ospf
router ospf 10
router-id 2.2.2.2
log-adjacency-changes
network 10.0.0.0 0.0.0.255 area 1
network 20.0.0.0 0.0.0.255 area 1

R3#sh run int fa 0/1

interface FastEthernet0/1
ip address 20.0.0.1 255.255.255.0
duplex auto
speed auto

R3#sh run int lo 1

interface Loopback1
ip address 192.168.2.1 255.255.255.0
ip ospf network point-to-point

R3#sh run | sec ospf
router ospf 10
router-id 3.3.3.3
log-adjacency-changes
network 20.0.0.0 0.0.0.255 area 1
network 192.168.2.0 0.0.0.255 area 2

Looking at R1’s OSPF Database, we can see the loopback on R3 is not showing up even though R2 is advertising it.

R1#sh ip ospf database

OSPF Router with ID (1.1.1.1) (Process ID 10)

Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         281         0x80000002 0x003A84 1

Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
10.0.0.0        1.1.1.1         841         0x80000001 0x004DD7
20.0.0.0        1.1.1.1         793         0x80000001 0x002FE1

Router Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         808         0x80000002 0x001AEE 1
2.2.2.2         2.2.2.2         804         0x80000003 0x0009B2 2
3.3.3.3         3.3.3.3         809         0x80000002 0x0029BD 1

Net Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
10.0.0.2        2.2.2.2         807         0x80000001 0x0043D6
20.0.0.1        3.3.3.3         812         0x80000001 0x000104

Summary Net Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
192.168.0.0     1.1.1.1         279         0x80000001 0x00C30B

This is because all data coming from non-backbone areas must eventually move through the backbone area.

So for example: OSPF Traffic from Area 2 to Area 1 must go through Area 2 until it reaches an Area 2 Border Router. It then travels only within the backbone Area 0 until it reaches an Area 1 Border Router. It then travels within Area 1 to its destination.

So what our OSPF traffic flow should look like;
Source Area 2 –> Area 2 ABR –> Area 0 –> Area 1 ABR -> Destination Area 1

As you can see there’s no way in our topology to get from Area 0 to Area 2 ABR so we will implement a virtual link to “bridge the gap”.

We can do this with the OSPF router process command “Area transit-area Virtual-Link Remote-RID“.

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

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

After entering the Virtual Link configuration, we can see the following log message.

*Mar  1 00:35:03.255: %OSPF-5-ADJCHG: Process 10, Nbr 3.3.3.3 on OSPF_VL0 from LOADING to FULL, Loading Done

Looking at the neighbours on R1, R3 is now showing up as if configured over a real point-to-point link.

R1#sh ip ospf neighb

Neighbor ID     Pri   State           Dead Time   Address         Interface
3.3.3.3           0   FULL/  –           –        20.0.0.1        OSPF_VL0
2.2.2.2           1   FULL/DR         00:00:31    10.0.0.2        FastEthernet0/0

Let’s take a look at this Virtual Link interface “OSPF_VL0

R1#sh ip ospf interface
OSPF_VL0 is up, line protocol is up
Internet Address 10.0.0.1/24, Area 0
Process ID 10, Router ID 1.1.1.1, Network Type VIRTUAL_LINK, Cost: 20
Configured as demand circuit.
Run as demand circuit.
DoNotAge LSA allowed.
Transmit Delay is 1 sec, State POINT_TO_POINT
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:04
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 2/3, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 3.3.3.3  (Hello suppressed)
Suppress hello for 1 neighbor(s)

Okay, we can see a Network Type of VIRTUAL_LINK with a cost of 20.
The cost for this link is 20 because the virtual link is taking all connections into account that its point-to-point link is comprised off, which in this case, are two fast ethernet links.

If need be, you can also configure authentication for your Virtual Link.
More information about this can be found here.

References:
Introducing OSPF
Virtual Link Config