Virtual Links in OSPF - Practical Lab.

In OSPF, no area can communicate with each other until and unless area 0 is in between them and area 0 can communicate with all the areas.

While designing network specially OSPF domain, we should keep in mind that all the areas we're going to define they should be directly connected to area 0 or sometimes referred to as backbone area.

In some cases in networks, there are two areas which are not connected through area 0, they are directly connected and we want to make them communicate with each other we'll do it using virtual links.

Conceptually speaking in Virtual links we expand our area 0, let's do it with the below network.











Checking routing table on all routers


A#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       *****OUTPUT OMITTED INTENTIONALLY****
Gateway of last resort is not set
      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, FastEthernet0/0
L        1.1.1.1/32 is directly connected, FastEthernet0/0
      200.100.50.0/24 is variably subnetted, 2 subnets, 2 masks
C        200.100.50.0/24 is directly connected, Serial1/0
L        200.100.50.100/32 is directly connected, Serial1/0

B#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       *****OUTPUT OMITTED INTENTIONALLY*****
Gateway of last resort is not set
      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, FastEthernet0/0
L        1.1.1.2/32 is directly connected, FastEthernet0/0
      2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        2.1.1.0/24 is directly connected, FastEthernet0/1
L        2.1.1.1/32 is directly connected, FastEthernet0/1
      200.100.100.0/24 is variably subnetted, 2 subnets, 2 masks
C        200.100.100.0/24 is directly connected, Serial1/0
L        200.100.100.100/32 is directly connected, Serial1/0



C#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       *****OUTPUT OMITTED INTENTIONALLY*****
Gateway of last resort is not set
      2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        2.1.1.0/24 is directly connected, FastEthernet0/1
L        2.1.1.2/32 is directly connected, FastEthernet0/1
      200.100.150.0/24 is variably subnetted, 2 subnets, 2 masks
C        200.100.150.0/24 is directly connected, Serial1/0
L        200.100.150.100/32 is directly connected, Serial1/0
You can see all the routers have default routing table i.e. only directly connected interfaces networks are listed in the routing table

Verifying if any routing protocol is configured

A#show ip protocols
*** IP Routing is NSF aware ***




B#show ip protocols
*** IP Routing is NSF aware ***

C#show ip protocols
*** IP Routing is NSF aware ***

Configuring Routing Protocol


A#conf terminal
Enter configuration commands, one per line.  End with CNTL/Z.
A(config)#router ospf 1
A(config-router)#network 1.1.1.0 0.0.0.255 a 1
A(config-router)#network 200.100.50.0 0.0.0.255 a 0
A(config-router)#exit
A(config)#exit
A#
*Feb 29 13:19:17.759: %SYS-5-CONFIG_I: Configured from console by console

B#conf terminal
Enter configuration commands, one per line.  End with CNTL/Z.
B(config)#router ospf 1
B(config-router)#network 1.1.1.0 0.0.0.255 a 1
*Feb 29 13:24:31.315: %OSPF-5-ADJCHG: Process 1, Nbr 200.100.50.100 on FastEthernet0/0 from LOADING to FULL, Loading Done
B(config-router)#network 2.1.1.0 0.0.0.255 a 2
B(config-router)#^Z
B#
*Feb 29 13:24:54.407: %SYS-5-CONFIG_I: Configured from console by console

C#conf terminal
Enter configuration commands, one per line.  End with CNTL/Z.
C(config)#router ospf 1
C(config-router)#network 2.1.1.0 0.0.0.255 a 2
*Feb 29 13:26:17.359: %OSPF-5-ADJCHG: Process 1, Nbr 200.100.100.100 on FastEthernet0/1 from LOADING to FULL, Loading Done
C(config-router)#network 200.100.150.0 0.0.0.255 area 3
C(config-router)#^Z
C#
*Feb 29 13:26:36.259: %SYS-5-CONFIG_I: Configured from console by console
You can see that the Neighbor relationship has been established and the link is up and OSPF is infull state.

Checking Routing tables

Now let's check the routing tables on these routers and notice the difference if there's any



A#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       *****OUTPUT OMITTED INTENTIONALLY*****
Gateway of last resort is not set
      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, FastEthernet0/0
L        1.1.1.1/32 is directly connected, FastEthernet0/0
      200.100.50.0/24 is variably subnetted, 2 subnets, 2 masks
C        200.100.50.0/24 is directly connected, Serial1/0
L        200.100.50.100/32 is directly connected, Serial1/0
Only directly connected interfaces are listed and area 2 is not communicating with area 1



B#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       *****OUTPUT OMITTED INTENTIONALLY*****
Gateway of last resort is not set
      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, FastEthernet0/0
L        1.1.1.2/32 is directly connected, FastEthernet0/0
      2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        2.1.1.0/24 is directly connected, FastEthernet0/1
L        2.1.1.1/32 is directly connected, FastEthernet0/1
O IA  200.100.50.0/24 [110/65] via 1.1.1.1, 00:08:47, FastEthernet0/0
      200.100.100.0/24 is variably subnetted, 2 subnets, 2 masks
C        200.100.100.0/24 is directly connected, Serial1/0
L        200.100.100.100/32 is directly connected, Serial1/0
Router B output shows, area 0 is communicating with area 1 so you can see 200.100.50.0 on Router B, routing table.


C#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       *****OUTPUT OMMITED INTENTIONALLY*****
Gateway of last resort is not set
      2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        2.1.1.0/24 is directly connected, FastEthernet0/1
L        2.1.1.2/32 is directly connected, FastEthernet0/1
      200.100.150.0/24 is variably subnetted, 2 subnets, 2 masks
C        200.100.150.0/24 is directly connected, Serial1/0
L        200.100.150.100/32 is directly connected, Serial1/0
Once again only directly connected interfaces are listed, area 2 and area 3 are not communicating with each other.


How many ABRs are there in this topology?
There's only one ABR in the topology and that is Router A, although Router B and C also have two areas but they are not communicating with each other, only that router is entitled to be ABR which is common between two different areas and is making them communicate with each other. 


Let's Verify


A#show ip ospf 1
 Routing Process "ospf 1" with ID 200.100.50.100
 Start time: 00:14:09.668, Time elapsed: 00:29:08.584
 Supports only single TOS(TOS0) routes
 Supports opaque LSA
 Supports Link-local Signaling (LLS)
 Supports area transit capability
 Supports NSSA (compatible with RFC 3101)
 Event-log enabled, Maximum number of events: 1000, Mode: cyclic
 It is an area border router
 Router is not originating router-LSAs with maximum metric
 *****OUTPUT OMMITED INTENTIONALLY*****


B#show ip ospf 1
 Routing Process "ospf 1" with ID 200.100.100.100
 Start time: 00:20:53.328, Time elapsed: 00:25:11.316
 Supports only single TOS(TOS0) routes
 Supports opaque LSA
 Supports Link-local Signaling (LLS)
 Supports area transit capability
 Supports NSSA (compatible with RFC 3101)
 Event-log enabled, Maximum number of events: 1000, Mode: cyclic
 Router is not originating router-LSAs with maximum metric
 *****OUTPUT OMMITED INTENTIONALLY*****
Output do not says it's an area border router



C#show ip ospf 1
 Routing Process "ospf 1" with ID 200.100.150.100
 Start time: 00:22:33.140, Time elapsed: 00:25:17.948
 Supports only single TOS(TOS0) routes
 Supports opaque LSA
 Supports Link-local Signaling (LLS)
 Supports area transit capability
 Supports NSSA (compatible with RFC 3101)
 Event-log enabled, Maximum number of events: 1000, Mode: cyclic
 Router is not originating router-LSAs with maximum metric     *****OUTPUT OMMITED INTENTIONALLY*****
Even router C output do not says it's an ABR



B# show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
--- Output Omitted---
Gateway of last resort is not set
C    1.0.0.0/8 is directly connected, Serial1/0
C    2.0.0.0/8 is directly connected, Serial1/1
O IA 200.100.50.0/24 [110/65] via 1.1.1.1, 00:03:53, Serial1/0
C    200.100.100.0/24 is directly connected, FastEthernet0/0
200.100.50.0 is in the routing table of B but 200.100.150.0 is not, so in this case when area 0 is not directly connected to another area, here we make virtual link.

When we're talking about a Link, it's for sure that it will be between, atleast two points similarly in the case of virtual links two routers will be involved.

Now in this situation we'll have to create a virtual link to make these areas communicate with each other, not everywhere you can create a virtual link 











Area 1 have no problem as it is directly connected to area 0, the problem starts from area 2 as it is not directly connected to area 0 so it cannot communicate with area 0

Conditions for making a virtual link

There are certain conditions if 2 routers meets those requirements only then you can make a virutal link, it's not like you can make a virtual link from anywhere to anywhere.

CONDITIONS FOR MAKING VIRTUAL LINKS
  • At-least one of the two routers where we’re going to create a virtual link, should be part of area 0.
  • Both routers in which we are going to create a virtual link, must be sharing a common area.

Router A has
A0, A1
Router B has
A1, A2
Router C has
A2, A3







Checking conditions between different routers to make virtual links, in case of above diagram.
Between
Area 0
Common area
A – B
ü   
ü   
A - C
ü   
     0
B - C
     0
ü   












according to the table above, a virtual link is only possible between Router A and B, because only these two routers satisfy both conditions which are necessary for making a virtual link.

Making a virtual link between Router A and B is like you've expanded area 0 from Router A to Router B, not physically but it's a conceptual thing.


Time to configure Virtual Link

Right now 200.100.50.0 is appearing as "O IA" on router B because it's coming from another area but after creating a virtual link area 0 will be expanded till router B so it should be appearing as only "O" let's verify



B# show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
--- Output Omitted---
Gateway of last resort is not set
C    1.0.0.0/8 is directly connected, Serial1/0
C    2.0.0.0/8 is directly connected, Serial1/1
O IA 200.100.50.0/24 [110/65] via 1.1.1.1, 00:03:53, Serial1/0
C    200.100.100.0/24 is directly connected, FastEthernet0/0


Before you configure a Virtual Link
It’s always very important to verify neighbor ID because sometimes unexpected IP becomes router ID, in live environments always use hard coated router ID, so that everything is stable and in control.


Configuring Virtual Link on A


A#show ip ospf neighbor

Neighbor ID     Pri   State       Dead Time   Address    Interface
200.100.100.100   1   FULL/BDR    00:00:35    1.1.1.2    FastEthernet0/0

A#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
A(config)#router ospf 1
A(config-router)#area 1 virtual-link 200.100.100.100
A(config-router)#exit



Configuring Virtual Link on B

B#show ip ospf neighbor
Neighbor ID     Pri   State      Dead Time   Address    Interface
200.100.50.100    1   FULL/DR    00:00:39    1.1.1.1    FastEthernet0/0
200.100.150.100   1   FULL/BDR   00:00:36    2.1.1.2    FastEthernet0/1


B#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
B(config)#router ospf 1
B(config-router)#area 1 virtual-link 200.100.50.100
B(config-router)#
*Feb 29 14:33:05.527: %OSPF-5-ADJCHG: Process 1, Nbr 200.100.50.100 on OSPF_VL0 from LOADING to FULL, Loading Done
B(config-router)#^Z
*Feb 29 14:33:07.331: %SYS-5-CONFIG_I: Configured from console by console

This log message says that the virtual link is established.


Let's Verify

B#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       *****OUTPUT OMITTED*****
Gateway of last resort is not set
      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, FastEthernet0/0
L        1.1.1.2/32 is directly connected, FastEthernet0/0
      2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        2.1.1.0/24 is directly connected, FastEthernet0/1
L        2.1.1.1/32 is directly connected, FastEthernet0/1
O     200.100.50.0/24 [110/65] via 1.1.1.1, 00:02:38, FastEthernet0/0
      200.100.100.0/24 is variably subnetted, 2 subnets, 2 masks
C        200.100.100.0/24 is directly connected, Serial1/0
L        200.100.100.100/32 is directly connected, Serial1/0

Now you can see that 200.100.50.0 is appearing as "O" which was appearing as "OIA" before, which means that area 0 has been expanded to router B, As routes coming from within the area are being displayed with "O" and coming from another area are displayed as "O IA"

Now Router B should be ABR

B#show ip ospf 1
 Routing Process "ospf 1" with ID 200.100.100.100
 Start time: 00:20:53.328, Time elapsed: 01:16:34.280
 Supports only single TOS(TOS0) routes
 Supports opaque LSA
 Supports Link-local Signaling (LLS)
 Supports area transit capability
 Supports NSSA (compatible with RFC 3101)
 Event-log enabled, Maximum number of events: 1000, Mode: cyclic
 It is an area border router
 Router is not originating router-LSAs with maximum metric


A#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       *****OUTPUT OMITTED*****
Gateway of last resort is not set
      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, FastEthernet0/0
L        1.1.1.1/32 is directly connected, FastEthernet0/0
      2.0.0.0/24 is subnetted, 1 subnets
O IA     2.1.1.0 [110/2] via 1.1.1.2, 00:10:36, FastEthernet0/0
      200.100.50.0/24 is variably subnetted, 2 subnets, 2 masks
C        200.100.50.0/24 is directly connected, Serial1/0
L        200.100.50.100/32 is directly connected, Serial1/0
Another proof that area 0 has been expanded to router B

You can see 2.1.1.0 is appearing in router B's routing table as "O IA", before configuring virtual link it wasn't in the routing table.


After making this virtual link




Now area 0 has been expanded till router B and area 2 is communicating with area 0 but still area 3 cannot communicate with area 2 because router C is still not an ABR and it's not directly connected to area 0, so to make them communicate we'll have to create another virtual link from router B to router C.

We can create multiple virtual links i.e. a virtual link over another virtual link.


Now after creating this virtual link router B and Router C meets both the conditions to create a virtual link, before creating 1st virtual link it wasn't possible to create virtual link between router B and C but now as area 0 is expanded to router B so now we can create virtual link between router B and C.


Configuring virtual link between B and C


B#show ip ospf neighbor
Neighbor ID     Pri   State       Dead Time   Address    Interface
200.100.50.100    0   FULL/  -       -        1.1.1.1    OSPF_VL0
200.100.50.100    1   FULL/DR     00:00:32    1.1.1.1    FastEthernet0/0
200.100.150.100   1   FULL/BDR    00:00:37    2.1.1.2    FastEthernet0/1

B#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
B(config)#router ospf 1
B(config-router)#area 2 virtual-link 200.100.150.100


C#show ip ospf neighbor
Neighbor ID     Pri   State      Dead Time   Address    Interface
200.100.100.100   1   FULL/DR    00:00:35    2.1.1.1    FastEthernet0/1


C#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
C(config)#router ospf 1
C(config-router)#area 2 virtual-link 200.100.100.100
C(config-router)#^Z
C#
*Feb 29 14:58:13.723: %SYS-5-CONFIG_I: Configured from console by console
*Feb 29 14:59:00.767: %OSPF-5-ADJCHG: Process 1, Nbr 200.100.100.100 on OSPF_VL0 from LOADING to FULL, Loading Done


We cannot replace router ID with network ID in the VR command
Example-
C(config-router)#area 2 virtual-link 200.100.100.0         (Wrong)
C(config-router)#area 2 virtual-link 200.100.100.100     (Right)











You won't see this kind of topology in live networks, even if you see it's the worst possible approach, here I created this kind of design just to make your concepts clear.

Now although area 0 has been virtually expanded to router C but still Area 1 and 2 won't disappear they will maintain their existence.


A#show ip route
Codes: L - local, 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, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, FastEthernet0/0
L        1.1.1.1/32 is directly connected, FastEthernet0/0
      2.0.0.0/24 is subnetted, 1 subnets
O IA     2.1.1.0 [110/2] via 1.1.1.2, 00:31:42, FastEthernet0/0
      200.100.50.0/24 is variably subnetted, 2 subnets, 2 masks
C        200.100.50.0/24 is directly connected, Serial1/0
L        200.100.50.100/32 is directly connected, Serial1/0
O IA  200.100.150.0/24 [110/66] via 1.1.1.2, 00:04:48, FastEthernet0/0

You can see although aera 0 has been virtually expanded to router C still 2.1.1.0 is displayed on router A's routing table as "O IA" and now 200.100.150.0 is also displayed as "O IA"





Post a Comment

0 Comments