OSPF Virtual Link

In OSPF Multi Area, all area must be connected to the backbone area (area 0), in order to communicate each other. Inter area routing will through the backbone area (area 0). If there’s area that isn’t connected to the backbone area we can setup a virtual link.

OSPF, Virtual Link, Cisco, Routing Protocol, GNS3

Based on topology above, area 2 doesn’t have connection/route to other area, since it’s not connected to the backbone area (area 0).

In this case, we can setup a Virtual Link from R4 to R2 and vice versa, from R2 to R4.

Virtual Link, OSPF, Cisco, GNS3, rjlogs, Routing Prtotocol, OSPF Multi Area

Firstly, let’s start configure R5 :

R5(config)#interface e0/0
R5(config-if)#ip address 40.40.40.2 255.255.255.252
R5(config-if)#no shut

R5(config)#interface loopback 0
R5(config-if)#ip address 5.5.5.5 255.255.255.255
R5(config-if)#no shut

R5(config)#router ospf 1
R5(config-router)#router-id 5.5.5.5
R5(config-router)#network 40.40.40.0 0.0.0.3 area 2
R5(config-router)#network 5.5.5.5 0.0.0.0 area 2

Now configure R4 :

R4(config)#interface e0/1
R4(config-if)#ip address 40.40.40.1 255.255.255.252
R4(config-if)#no shut

R4(config)#interface e0/0
R4(config-if)#ip address 30.30.30.2 255.255.255.252
R4(config-if)#no shut

R4(config)#interface loopback 0
R4(config-if)#ip address 4.4.4.4 255.255.255.255
R4(config-if)#no shut

R4(config)#router ospf 1
R4(config-router)#router-id 4.4.4.4
R4(config-router)#network 40.40.40.0 0.0.0.3 area 2
R4(config-router)#network 30.30.30.0 0.0.0.3 area 1
R4(config-router)#network 4.4.4.4 0.0.0.0 area 1

Now move to R3 :

R3(config)#interface e0/1
R3(config-if)#ip address 30.30.30.1 255.255.255.252
R3(config-if)#no shut

R3(config)#interface e0/0
R3(config-if)#ip address 20.20.20.2 255.255.255.252
R3(config-if)#no shut

R3(config)#interface loopback 0
R3(config-if)#ip address 3.3.3.3 255.255.255.255
R3(config-if)#no shut

R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 30.30.30.0 0.0.0.3 area 1
R3(config-router)#network 20.20.20.0 0.0.0.3 area 1
R3(config-router)#network 3.3.3.3 0.0.0.0 area 1

Now R2 :

R2(config)#interface e0/1
R2(config-if)#ip address 20.20.20.1 255.255.255.252
R2(config-if)#no shut

R2(config)#interface e0/0
R2(config-if)#ip address 10.10.10.2 255.255.255.252
R2(config-if)#no shut

R2(config)#interface loopback 0
R2(config-if)#ip address 2.2.2.2 255.255.255.255
R2(config-if)#no shut

R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 20.20.20.0 0.0.0.3 area 1
R2(config-router)#network 10.10.10.0 0.0.0.3 area 0
R2(config-router)#network 2.2.2.2 0.0.0.0 area 0

And the last R1 :

R1(config)#interface e0/0
R1(config-if)#ip address 10.10.10.1 255.255.255.252
R1(config-if)#no shut

R1(config)#interface loopback 0
R1(config-if)#ip address 1.1.1.1 255.255.255.255
R1(config-if)#no shut

R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 10.10.10.0 0.0.0.3 area 0
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0

Let’s check on R5 :

R5#sh ip route
–<output omitted>–

Gateway of last resort is not set

5.0.0.0/32 is subnetted, 1 subnets
C 5.5.5.5 is directly connected, Loopback0
40.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 40.40.40.0/30 is directly connected, Ethernet0/0
L 40.40.40.2/32 is directly connected, Ethernet0/0

R5 only has info about network that direct connected to itself.

Now let’s add virtual link configuration on R4 and R2.

R4(config-router)#area 1 virtual-link 2.2.2.2

R2(config-router)#area 1 virtual-link 4.4.4.4

Please keep in mind that destination IP is a Router-ID. IP 4.4.4.4 is Router-ID of R4, and IP 2.2.2.2 is Router-ID of R2.

Let’s check on R5 :

R5#sh ip route ospf
–<output omitted>–

Gateway of last resort is not set

1.0.0.0/32 is subnetted, 1 subnets
O IA 1.1.1.1 [110/41] via 40.40.40.1, 00:02:38, Ethernet0/0
2.0.0.0/32 is subnetted, 1 subnets
O IA 2.2.2.2 [110/31] via 40.40.40.1, 00:02:38, Ethernet0/0
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/21] via 40.40.40.1, 00:02:43, Ethernet0/0
4.0.0.0/32 is subnetted, 1 subnets
O IA 4.4.4.4 [110/11] via 40.40.40.1, 00:02:43, Ethernet0/0
10.0.0.0/30 is subnetted, 1 subnets
O IA 10.10.10.0 [110/40] via 40.40.40.1, 00:02:38, Ethernet0/0
20.0.0.0/30 is subnetted, 1 subnets
O IA 20.20.20.0 [110/30] via 40.40.40.1, 00:02:43, Ethernet0/0
30.0.0.0/30 is subnetted, 1 subnets
O IA 30.30.30.0 [110/20] via 40.40.40.1, 00:02:43, Ethernet0/0

R5 now can learn about other network that advertised by OSPF.

We can use this command to check Virtual Link on R4 and R2 :

R4#sh ip ospf virtual-links
Virtual Link OSPF_VL0 to router 2.2.2.2 is up
Run as demand circuit
DoNotAge LSA allowed.
Transit area 1, via interface Ethernet0/0
Topology-MTID Cost Disabled Shutdown Topology Name
0 20 no no Base
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:06
Adjacency State FULL (Hello suppressed)
Index 1/3, retransmission queue length 0, number of retransmission 0
First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
Last retransmission scan length is 0, maximum is 0
Last retransmission scan time is 0 msec, maximum is 0 msec

R2#sh ip ospf virtual-links
Virtual Link OSPF_VL0 to router 4.4.4.4 is up
Run as demand circuit
DoNotAge LSA allowed.
Transit area 1, via interface Ethernet0/1
Topology-MTID Cost Disabled Shutdown Topology Name
0 20 no no Base
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:06
Adjacency State FULL (Hello suppressed)
Index 2/3, retransmission queue length 0, number of retransmission 0
First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
Last retransmission scan length is 0, maximum is 0
Last retransmission scan time is 0 msec, maximum is 0 msec

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

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