OSPF: Virtual links

Reference: Routing TCP/IP Volume 1, page 373:

Virtual link is considered a network type in OSPF. Virtual link like a point-to-point network type does not require DR and BDR, adjacency will form if the hello packet parameters between two routers match.

Two application for virtual links:

1. To bridge a foreign OSPF area (Area 2) to the backbone area  0 via a non-backbone area (in this example is Area 1). In OSPF, all areas should converge with Area 0, in the diagram above only Area 1 is directly connected to Area 0, however Area 2 is not directly connected to Area 0. Hence a virtual link has to be connected between ABRs of Area 1 in order for Area 2 network to be known to the backbone and rest of the backbone area.

2. To connect two partitioned network in Area 0. Partition network occurred when there’s a single point of failure in Area 0 making Area 0 domain partitioned into two isolated Area 0 domains.

We will focus on application point 1.

R1, R2 and R3 advertised their routes. However only routes that are connected to the backbone area (Area 0) are known, Area 2 route is unknown to Area 0 and 1.

Look at R1’s OSPF routing table:

R1#sh ip route ospf
2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/65] via 10.0.0.2, 00:11:38, Serial0/0
3.0.0.0/32 is subnetted, 1 subnets
O IA    3.3.3.3 [110/129] via 10.0.0.2, 00:09:33, Serial0/0
10.0.0.0/24 is subnetted, 2 subnets
O IA    10.0.1.0 [110/128] via 10.0.0.2, 00:11:37, Serial0/0

Area 0 knows the route to Area 1, but there’s no route to Area 2.

Look at R2’s routing table:

R2#sh ip route ospf
1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/65] via 10.0.0.1, 00:12:44, Serial0/0
3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/65] via 10.0.1.2, 00:10:41, Serial0/1

Similar to R1, R2 only knows route to Area 0 and 1 but not Area 2.

R3#sh ip route
Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route

Gateway of last resort is not set

1.0.0.0/32 is subnetted, 1 subnets
O IA    1.1.1.1 [110/129] via 10.0.1.1, 00:11:10, Serial0/1
2.0.0.0/32 is subnetted, 1 subnets
O IA    2.2.2.2 [110/65] via 10.0.1.1, 00:11:10, Serial0/1
3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Loopback0
10.0.0.0/24 is subnetted, 3 subnets
C       10.0.2.0 is directly connected, Loopback1
O IA    10.0.0.0 [110/128] via 10.0.1.1, 00:11:10, Serial0/1
C       10.0.1.0 is directly connected, Serial0/1

As you can see 10.0.2.0/24 is a directly connected route (Area 2) which has already been advertised using OSPF, but R1 and R2 both did not receive this route. Because R3’s se0/0 belongs to Area 1 and Area 1 is a directly connected Area to Area 0, hence within the same OSPF domain Area 0 and 1 routes are known.

To temporary fix this, virtual link is used, now… Virtual link is not an encouraged permanent solution to this issue, the network has to redesign for Area 2 to connect to Area 0.

Virtual link can only be performed at ABR:

Now a virtual link is needed at Area 1 for Area 2 to be connected to Area 0 “directly”

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

*Sep 18 17:51:07.578: %OSPF-4-ERRRCV: Received invalid packet: mismatch area ID,  from backbone area must be virtual-link but not found from 10.0.1.2, Serial0/1

After sometime the router starts to complain, that a virtual link is needed.

R2(config)#router ospf 1
R2(config-router)#area 1 virtual-link 3.3.3.3
R2(config-router)#
*Sep 18 17:52:36.391: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on OSPF_VL0 from LOADING to FULL, Loading Done

Now as soon as I configured the virtual link to “connect” Area 2 to Area 0 the adjacency formed.

IMPORTANT: router-id is needed for virtual link address, if router-id is down all virtual links established will be done as well.

R2#sh ip route ospf
1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/65] via 10.0.0.1, 00:02:35, Serial0/0
3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/65] via 10.0.1.2, 00:02:35, Serial0/1
10.0.0.0/24 is subnetted, 3 subnets
O IA    10.0.2.0 [110/65] via 10.0.1.2, 00:02:35, Serial0/1

R2 learned the route to Area 2 after virtual link was configured.

R1#sh ip route ospf
2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/65] via 10.0.0.2, 00:02:53, Serial0/0
3.0.0.0/32 is subnetted, 1 subnets
O IA    3.3.3.3 [110/129] via 10.0.0.2, 00:02:53, Serial0/0
10.0.0.0/24 is subnetted, 3 subnets
O IA    10.0.2.0 [110/129] via 10.0.0.2, 00:02:53, Serial0/0
O IA    10.0.1.0 [110/128] via 10.0.0.2, 00:02:53, Serial0/0

R1 has learned the route to Area 2 as well after virtual link was configured.

Rules to use virtual links:

1. Virtual links must be configured between two ABRs

2. The area which the virtual link is configured must have full routing information.

3. The area which the virtual link is configured must not be a stub area.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s