Friday, 6 July 2012

OSPF: Virtual Links - Part I

OSPF: Virtual Links - Part I

·         In OSPF, all areas must be connected to Area 0, Backbone area.
·         If any Area doesn’t have the direct connectivity to Area 0, we need to create a Virtual-link to extend the Backbone area.

·         Virtual-links have to be created in 2 situations:
o    An area doesn’t have direct connectivity to Area 0
o    In case of partitioned Backbone area

·         Creating Virtual-link is not a general practice; it’s a kind of band-aid to the problem.
·         Mostly seen in Company mergers, acquisitions etc.

·         At least one end-point must reside in Area 0.
·         The two end-point routers of a virtual-link must be attached to a common area, called Transit area.
·         Stub area cannot be a Transit area for Virtual-links:
o    Type-5 LSAs (External LSs) are not exchanged over Virtual-links as their scope is entire OSPF domain, simply to avoid duplication.
o    And we know that External LSAs don’t enter a Stub area.
·         Virtual-Links are part of the backbone (need to pay attention in case of Area 0 authentication)

Let me create a small topology to configure this:
·         R1-R2 link is part of Backbone area
·         R2-R3 link is part of Area 23
·         R2 is an ABR for Area0 & Area 23
·         R3-R4 link is part of Area 34

·         R1’s loopback 1.1.1.1/32 is advertised into Area 0
·         R2’s loopback 2.2.2.2/32 is advertised into Area 0
·         R3’s loopback 3.3.3.3/32 is advertised into Area 23
·         R4’s loopback 4.4.4.4/32 is advertised into Area 34

·         Let’s see what happens before creating virtual link

R1#show run | begin router ospf 1
router ospf 1
 router-id 1.1.1.1
 log-adjacency-changes
 network 1.1.1.1 0.0.0.0 area 0
 network 100.1.12.1 0.0.0.0 area 0
!
R2#show run | begin router ospf 1
router ospf 1
 router-id 2.2.2.2
 log-adjacency-changes
 network 2.2.2.2 0.0.0.0 area 0
 network 100.1.12.2 0.0.0.0 area 0
 network 100.1.23.2 0.0.0.0 area 23
!
R3#show run | begin router ospf 1
router ospf 1
 router-id 3.3.3.3
 log-adjacency-changes
 network 3.3.3.3 0.0.0.0 area 23
 network 100.1.23.3 0.0.0.0 area 23
 network 100.1.34.3 0.0.0.0 area 34
!
R4#show run | begin router ospf 1
router ospf 1
 router-id 4.4.4.4
 log-adjacency-changes
 network 4.4.4.4 0.0.0.0 area 34
 network 100.1.34.4 0.0.0.0 area 34
!
R1#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           0   FULL/  -        00:00:35    100.1.12.2      Serial1/0
R1#

R2#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           0   FULL/  -        00:00:33    100.1.12.1      Serial1/0
3.3.3.3           0   FULL/  -        00:00:30    100.1.23.3      Serial1/1
R2#

R3#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           0   FULL/  -        00:00:32    100.1.23.2      Serial1/1
4.4.4.4           0   FULL/  -        00:00:37    100.1.34.4      Serial1/0
R3#

R4#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
3.3.3.3           0   FULL/  -        00:00:37    100.1.34.3      Serial1/0
R4#

R1#show ip route | begin Gateway
Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/65] via 100.1.12.2, 00:02:42, Serial1/0
     100.0.0.0/24 is subnetted, 2 subnets
C       100.1.12.0 is directly connected, Serial1/0
O IA    100.1.23.0 [110/128] via 100.1.12.2, 00:02:38, Serial1/0
     3.0.0.0/32 is subnetted, 1 subnets
O IA    3.3.3.3 [110/129] via 100.1.12.2, 00:02:21, Serial1/0
R1#

R2#show ip route | begin Gateway
Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/65] via 100.1.12.1, 00:02:49, Serial1/0
     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
     100.0.0.0/24 is subnetted, 2 subnets
C       100.1.12.0 is directly connected, Serial1/0
C       100.1.23.0 is directly connected, Serial1/1
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/65] via 100.1.23.3, 00:02:32, Serial1/1
R2#

R3#show ip route | begin Gateway
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 100.1.23.2, 00:02:09, Serial1/1
     2.0.0.0/32 is subnetted, 1 subnets
O IA    2.2.2.2 [110/65] via 100.1.23.2, 00:02:09, Serial1/1
     100.0.0.0/24 is subnetted, 3 subnets
C       100.1.34.0 is directly connected, Serial1/0
O IA    100.1.12.0 [110/128] via 100.1.23.2, 00:02:09, Serial1/1
C       100.1.23.0 is directly connected, Serial1/1
     3.0.0.0/32 is subnetted, 1 subnets
C       3.3.3.3 is directly connected, Loopback0
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/65] via 100.1.34.4, 00:02:09, Serial1/0
R3#

R4#show ip route | begin Gateway
Gateway of last resort is not set

     100.0.0.0/24 is subnetted, 1 subnets
C       100.1.34.0 is directly connected, Serial1/0
     4.0.0.0/32 is subnetted, 1 subnets
C       4.4.4.4 is directly connected, Loopback0
R4#

Observations:

·         OSPF has been configured as per the topology
·         All neighbors are up.

·         R1, which is in Area 0, doesn’t have routes for Area 34.
·         Also, R4, which is in Area 34, doesn’t have routes for other Areas, Area 0 & 23.

·         Area 34 is not connected to Area 0, that’s why we see the output like this.
·         Now, I need to create a virtual link through Area 23, i.e., between R2 and R3.

Configuring Virtual-Link:

R2(config)#router ospf 1
R2(config-router)#area 23 virtual-link 3.3.3.3
R2(config-router)#
*Jul  6 19:57:00.919: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on OSPF_VL0 from LOADING to FULL, Loading Done
R2(config-router)#

R3(config)#router ospf 1
R3(config-router)#area 23 virtual-link 2.2.2.2
R3(config-router)#
*Jul  6 19:57:01.075: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on OSPF_VL0 from LOADING to FULL, Loading Done
R3(config-router)#

R2#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
3.3.3.3           0   FULL/  -           -        100.1.23.3      OSPF_VL0
1.1.1.1           0   FULL/  -        00:00:39    100.1.12.1      Serial1/0
3.3.3.3           0   FULL/  -        00:00:35    100.1.23.3      Serial1/1
R2#

R3#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           0   FULL/  -           -        100.1.23.2      OSPF_VL0
2.2.2.2           0   FULL/  -        00:00:33    100.1.23.2      Serial1/1
4.4.4.4           0   FULL/  -        00:00:38    100.1.34.4      Serial1/0
R3#

R2#show ip ospf virtual-links
Virtual Link OSPF_VL0 to router 3.3.3.3 is up
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 23, via interface Serial1/1, Cost of using 64
  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:00
    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
R2#

R3#show 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 23, via interface Serial1/1, Cost of using 64
  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:04
    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
R3#

Observations:

·         Virtual-link is Up and running

Now, let’s see the Routing table:

R1#show ip route ospf
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/65] via 100.1.12.2, 00:36:10, Serial1/0
     100.0.0.0/24 is subnetted, 3 subnets
O IA    100.1.34.0 [110/192] via 100.1.12.2, 00:36:10, Serial1/0
O IA    100.1.23.0 [110/128] via 100.1.12.2, 00:36:10, Serial1/0
     3.0.0.0/32 is subnetted, 1 subnets
O IA    3.3.3.3 [110/129] via 100.1.12.2, 00:36:10, Serial1/0
     4.0.0.0/32 is subnetted, 1 subnets
O IA    4.4.4.4 [110/193] via 100.1.12.2, 00:36:10, Serial1/0
R1#

R2#show ip route ospf
     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/65] via 100.1.12.1, 00:36:40, Serial1/0
     100.0.0.0/24 is subnetted, 3 subnets
O IA    100.1.34.0 [110/128] via 100.1.23.3, 00:36:40, Serial1/1
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/65] via 100.1.23.3, 00:36:40, Serial1/1
     4.0.0.0/32 is subnetted, 1 subnets
O IA    4.4.4.4 [110/129] via 100.1.23.3, 00:36:40, Serial1/1
R2#

R3#show ip route ospf
     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/129] via 100.1.23.2, 00:36:57, Serial1/1
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/65] via 100.1.23.2, 00:36:57, Serial1/1
     100.0.0.0/24 is subnetted, 3 subnets
O       100.1.12.0 [110/128] via 100.1.23.2, 00:36:57, Serial1/1
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/65] via 100.1.34.4, 00:37:07, Serial1/0
R3#

R4#show ip route ospf
     1.0.0.0/32 is subnetted, 1 subnets
O IA    1.1.1.1 [110/193] via 100.1.34.3, 00:37:15, Serial1/0
     2.0.0.0/32 is subnetted, 1 subnets
O IA    2.2.2.2 [110/129] via 100.1.34.3, 00:37:15, Serial1/0
     100.0.0.0/24 is subnetted, 3 subnets
O IA    100.1.12.0 [110/192] via 100.1.34.3, 00:37:15, Serial1/0
O IA    100.1.23.0 [110/128] via 100.1.34.3, 00:37:25, Serial1/0
     3.0.0.0/32 is subnetted, 1 subnets
O IA    3.3.3.3 [110/65] via 100.1.34.3, 00:37:25, Serial1/0
R4#

R1#ping 4.4.4.4

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 72/90/124 ms
R1#

R4#ping 1.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/92/124 ms
R4#

Observations:

·         Area-34 is learning the routes from Backbone area
·         Backbone area is learning the routes from Area-34
·         Simply I extended the Backbone from R2 to R3

·         What if there is another router R5, which is connected to R4, and is in Area 45?
·         Solution: We need the extend the Backbone from R3 to R4
·         This is sometimes called Nested Virtual links

·         Let me configure this one:

R4(config)#int ser1/1
R4(config-if)#no shut
R4(config-if)#ip address 100.1.45.4 255.255.255.0
R4(config-if)#router ospf 1
R4(config-router)#network 100.1.45.4 0.0.0.0 area 45
R4(config-router)#
*Jul  6 20:51:17.814: %OSPF-5-ADJCHG: Process 1, Nbr 5.5.5.5 on Serial1/1 from LOADING to FULL, Loading Done
R4(config-router)#

R5(config-if)#int ser1/1
R5(config-if)#no shut
R5(config-if)#ip address 100.1.45.5 255.255.255.0
R5(config-if)#router ospf 1
R5(config-router)#router-id 5.5.5.5
R5(config-router)#network 100.1.45.5 0.0.0.0 area 45
R5(config-router)#
*Jul  6 20:51:18.019: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on Serial1/1 from LOADING to FULL, Loading Done
R5(config-router)#

R5#show 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

     100.0.0.0/24 is subnetted, 1 subnets
C       100.1.45.0 is directly connected, Serial1/1
     5.0.0.0/32 is subnetted, 1 subnets
C       5.5.5.5 is directly connected, Loopback0
R5#

Observations:

·         R5 doesn’t have full routes.
·         We need to create another virtual-link between R3 and R4.
·         With this, I’m extending Backbone till R4.

R3(config)#router ospf 1
R3(config-router)#area 34 virtual-link 4.4.4.4
R3(config-router)#
*Jul  6 21:10:08.486: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on OSPF_VL1 from LOADING to FULL, Loading Done
R3(config-router)#

R4(config-if)#router ospf 1
R4(config-router)#area 34 virtual-link 3.3.3.3
R4(config-router)#
*Jul  6 21:10:08.366: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on OSPF_VL0 from LOADING to FULL, Loading Done
R4(config-router)#

R3#show ip ospf virtual-links
Virtual Link OSPF_VL1 to router 4.4.4.4 is up
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 34, via interface Serial1/0, Cost of using 64
  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:03
    Adjacency State FULL (Hello suppressed)
    Index 2/4, 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
Virtual Link OSPF_VL0 to router 2.2.2.2 is up
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 23, via interface Serial1/1, Cost of using 64
  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:04
    Adjacency State FULL (Hello suppressed)
    Index 1/3, retransmission queue length 0, number of retransmission 1
    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
    Last retransmission scan length is 1, maximum is 1
    Last retransmission scan time is 0 msec, maximum is 0 msec
R3#

R4#show ip ospf virtual-links
Virtual Link OSPF_VL0 to router 3.3.3.3 is up
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 34, via interface Serial1/0, Cost of using 64
  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:05
    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
R4#

R5#show ip route ospf
     1.0.0.0/32 is subnetted, 1 subnets
O IA    1.1.1.1 [110/257] via 100.1.45.4, 00:08:55, Serial1/1
     2.0.0.0/32 is subnetted, 1 subnets
O IA    2.2.2.2 [110/193] via 100.1.45.4, 00:08:55, Serial1/1
     100.0.0.0/24 is subnetted, 4 subnets
O IA    100.1.34.0 [110/128] via 100.1.45.4, 00:09:04, Serial1/1
O IA    100.1.12.0 [110/256] via 100.1.45.4, 00:08:55, Serial1/1
O IA    100.1.23.0 [110/192] via 100.1.45.4, 00:08:55, Serial1/1
     3.0.0.0/32 is subnetted, 1 subnets
O IA    3.3.3.3 [110/129] via 100.1.45.4, 00:08:55, Serial1/1
     4.0.0.0/32 is subnetted, 1 subnets
O IA    4.4.4.4 [110/65] via 100.1.45.4, 00:09:04, Serial1/1
R5#ping 1.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 92/118/140 ms
R5#

Observation:
·         Virtual-link has been created successfully and is working fine.
·         Now, R3 has 2 virtual links, one for Transit Area 23 and another for Transit Area 34.
·         R5 has received all OSPF routes.

No comments:

Post a Comment