OSPF Virtual Links

Posted: January 30, 2016 in CISCO

Virtual links are used when there are needs to connect backbone area (area 0) and other areas,not directly connected to backbone areas.It happens when backbone area is discontiguous or new area is added to existing ares.

 

Untitled
R1:

!
interface Loopback0
ip address 172.30.30.1 255.255.255.252
!
interface Serial1/0
ip address 10.1.12.1 255.255.255.0
!
router ospf 1
network 10.1.1.0 0.0.0.255 area 0
network 10.1.12.0 0.0.0.255 area 0

 

R2:

!
interface Loopback0
ip address 10.1.2.1 255.255.255.0
!
interface Serial1/0
ip address 10.1.12.2 255.255.255.0
!
interface Serial1/1
ip address 10.1.23.2 255.255.255.0
!
router ospf 1
area 23 virtual-link 192.168.103.1
network 10.1.2.0 0.0.0.255 area 0
network 10.1.12.0 0.0.0.255 area 0
network 10.1.23.0 0.0.0.255 area 23

 

R3:

interface Loopback0
ip address 10.1.3.1 255.255.255.0
ip ospf network point-to-point
!
interface Loopback100
ip address 192.168.100.1 255.255.255.0
ip ospf network point-to-point
!
interface Loopback101
ip address 192.168.101.1 255.255.255.0
ip ospf network point-to-point
!
interface Loopback102
ip address 192.168.102.1 255.255.255.0
ip ospf network point-to-point
!
interface Loopback103
ip address 192.168.103.1 255.255.255.0
ip ospf network point-to-point
!
interface Serial1/1
ip address 10.1.23.3 255.255.255.0
!
router ospf 1
area 23 virtual-link 10.1.2.1
network 10.1.3.0 0.0.0.255 area 23
network 10.1.23.0 0.0.0.255 area 23
network 192.168.100.0 0.0.3.255 area 100

 

Take a look at routing tables on R1 nad R2:

 

R1#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

172.30.0.0/30 is subnetted, 1 subnets
C       172.30.30.0 is directly connected, Loopback0
10.0.0.0/24 is subnetted, 4 subnets
C       10.1.12.0 is directly connected, Serial1/0
O IA    10.1.3.0 [110/129] via 10.1.12.2, 00:00:32, Serial1/0
O       10.1.2.0 [110/65] via 10.1.12.2, 00:00:32, Serial1/0
O IA    10.1.23.0 [110/128] via 10.1.12.2, 00:00:32, Serial1/0

R2(config-router)#
*Mar  1 00:45:29.419: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.103.1 on OSPF_VL3 from FULL to DOWN, Neighbor Down: Interface down or detached
R2(config-router)#do 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

10.0.0.0/24 is subnetted, 4 subnets
C       10.1.12.0 is directly connected, Serial1/0
O       10.1.3.0 [110/65] via 10.1.23.3, 00:14:23, Serial1/1
C       10.1.2.0 is directly connected, Loopback0
C       10.1.23.0 is directly connected, Serial1/1

We can see that routes in Area 100 (192.168.100-103/24) are not shown although are advertised on R3 in OSPF statement.It’s because area 100 is not connects to area 0.Routes on area 23 are not advertised outside that area.

To overcome this issue,we would create virtual link between ABR (R2) and router in area 100 (R3).Prior creating virtual link,we need to identify Router ID on R2 and R3

R2#sh ip ospf
Routing Process "ospf 1" with ID 10.1.2.1

R3(config-router)#do sh ip ospf
Routing Process "ospf 1" with ID 192.168.103.1
R2(config)#router ospf 1
R2(config-router)#area 23 virtual-link 192.168.103.1

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

 

Again,take a look at routing tables on R1 and R2:

R1#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

172.30.0.0/30 is subnetted, 1 subnets
C       172.30.30.0 is directly connected, Loopback0
10.0.0.0/24 is subnetted, 4 subnets
C       10.1.12.0 is directly connected, Serial1/0
O IA    10.1.3.0 [110/129] via 10.1.12.2, 00:00:00, Serial1/0
O       10.1.2.0 [110/65] via 10.1.12.2, 00:00:00, Serial1/0
O IA    10.1.23.0 [110/128] via 10.1.12.2, 00:00:00, Serial1/0
O IA 192.168.102.0/24 [110/129] via 10.1.12.2, 00:00:01, Serial1/0
O IA 192.168.103.0/24 [110/129] via 10.1.12.2, 00:00:01, Serial1/0
O IA 192.168.100.0/24 [110/129] via 10.1.12.2, 00:00:02, Serial1/0
O IA 192.168.101.0/24 [110/129] via 10.1.12.2, 00:00:02, Serial1/0

R2(config-router)#do 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

10.0.0.0/24 is subnetted, 4 subnets
C       10.1.12.0 is directly connected, Serial1/0
O       10.1.3.0 [110/65] via 10.1.23.3, 00:00:21, Serial1/1
C       10.1.2.0 is directly connected, Loopback0
C       10.1.23.0 is directly connected, Serial1/1
O IA 192.168.102.0/24 [110/65] via 10.1.23.3, 00:00:21, Serial1/1
O IA 192.168.103.0/24 [110/65] via 10.1.23.3, 00:00:21, Serial1/1
O IA 192.168.100.0/24 [110/65] via 10.1.23.3, 00:00:21, Serial1/1
O IA 192.168.101.0/24 [110/65] via 10.1.23.3, 00:00:22, Serial1/1

 

Virtual links,however,add processing overhead and extend backbone area onto routes where they might not belong.

 

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s