Tuesday, June 29, 2010

Repairing OSPF AREA 0 - Bandages For OSPF

Today I would like to talk about some crazy stuff. It's about repairing OSPF AREA 0. Repairing...?

Yes, it's very interesting scenario indeed which I learned long back while preparing for R&S written exam. Here it is:


The task requirement was something like this:

R1's S0/0, R2's S0/0, R4 , R5 are configured in OSPF AREA 0.
R1's S0/1, R2's S0/1 and R3 are configured in OSPF AREA 1.


R4 should be able to reach R5 even if Frame-Relay Link between R1 & R2 goes down.


Now lets start with basic configuration and see what kind of issues appears and how to fix those.


*****************
* CONFIGURATION *
*****************
R1(config)#do sh prot | e do
Global values:
  Internet Protocol routing is enabled
FastEthernet0/0 is up, line protocol is up
  Internet address is 14.14.14.1/24
Serial0/0 is up, line protocol is up
  Internet address is 12.12.12.1/24
Serial0/1 is up, line protocol is up
  Internet address is 13.13.13.1/24

R1(config)#do sh run | s r o
router ospf 100
 router-id 11.11.11.11
 log-adjacency-changes
 network 12.12.12.1 0.0.0.0 area 0
 network 13.13.13.1 0.0.0.0 area 1
 network 14.14.14.1 0.0.0.0 area 0

R2(config)#do sh prot | e do
Global values:
  Internet Protocol routing is enabled
FastEthernet0/0 is up, line protocol is up
  Internet address is 25.25.25.2/24
Serial0/0 is up, line protocol is up
  Internet address is 12.12.12.2/24
Serial0/1 is up, line protocol is up
  Internet address is 23.23.23.2/24

R2(config)#do sh run | s r o
router ospf 200
 router-id 22.22.22.22
 log-adjacency-changes
 network 12.12.12.2 0.0.0.0 area 0
 network 23.23.23.2 0.0.0.0 area 1
 network 25.25.25.2 0.0.0.0 area 0

R3(config)#do sh prot | e do
Global values:
  Internet Protocol routing is enabled
Serial0/0 is up, line protocol is up
  Internet address is 23.23.23.3/24
Serial0/1 is up, line protocol is up
  Internet address is 13.13.13.3/24

R3(config)#do sh run | s r o
router ospf 300
 router-id 33.33.33.33
 log-adjacency-changes
 network 13.13.13.3 0.0.0.0 area 1
 network 23.23.23.3 0.0.0.0 area 1

R4(config)#do sh prot | e do
Global values:
  Internet Protocol routing is enabled
FastEthernet0/0 is up, line protocol is up
  Internet address is 14.14.14.4/24

R4(config)#do sh run | s r o
router ospf 400
 router-id 44.44.44.44
 log-adjacency-changes
 network 14.14.14.4 0.0.0.0 area 0

R5(config)#do sh prot | e do
Global values:
  Internet Protocol routing is enabled
FastEthernet0/0 is up, line protocol is up
  Internet address is 25.25.25.5/24

R5(config)#do sh run | s r o
router ospf 500
 router-id 55.55.55.55
 log-adjacency-changes
 network 25.25.25.5 0.0.0.0 area 0


R1(config)#do sh run int s0/0
Building configuration...

Current configuration : 216 bytes
!
interface Serial0/0
 ip address 12.12.12.1 255.255.255.0
 encapsulation frame-relay
 ip ospf network point-to-point
 clock rate 2000000
 frame-relay map ip 12.12.12.2 102 broadcast
 no frame-relay inverse-arp
end

R2(config)#do sh run int s0/0
Building configuration...

Current configuration : 216 bytes
!
interface Serial0/0
 ip address 12.12.12.2 255.255.255.0
 encapsulation frame-relay
 ip ospf network point-to-point
 clock rate 2000000
 frame-relay map ip 12.12.12.1 201 broadcast
 no frame-relay inverse-arp
end

!

*********************
* BASIC VERIFICATION *

*********************


R1(config)#do sh ip ro os
     23.0.0.0/24 is subnetted, 1 subnets
O       23.23.23.0 [110/128] via 13.13.13.3, 00:14:28, Serial0/1
     25.0.0.0/24 is subnetted, 1 subnets
O       25.25.25.0 [110/74] via 12.12.12.2, 00:02:29, Serial0/0


R2(config)#do sh ip ro os
     13.0.0.0/24 is subnetted, 1 subnets
O       13.13.13.0 [110/128] via 23.23.23.3, 00:13:26, Serial0/1
     14.0.0.0/24 is subnetted, 1 subnets
O       14.14.14.0 [110/74] via 12.12.12.1, 00:01:52, Serial0/0


R1(config)#do ping 25.25.25.5

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 25.25.25.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 136/608/1800 ms


R2(config)#do ping 14.14.14.4

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 14.14.14.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 352/528/608 ms


R4(config)#do sh ip ro os
     23.0.0.0/24 is subnetted, 1 subnets
O IA    23.23.23.0 [110/138] via 14.14.14.1, 00:02:44, FastEthernet0/0
     25.0.0.0/24 is subnetted, 1 subnets
O       25.25.25.0 [110/84] via 14.14.14.1, 00:03:37, FastEthernet0/0
     12.0.0.0/24 is subnetted, 1 subnets
O       12.12.12.0 [110/74] via 14.14.14.1, 00:03:37, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
O IA    13.13.13.0 [110/74] via 14.14.14.1, 00:03:37, FastEthernet0/0


R5(config)#do sh ip ro os
     23.0.0.0/24 is subnetted, 1 subnets
O IA    23.23.23.0 [110/74] via 25.25.25.2, 00:05:33, FastEthernet0/0
     12.0.0.0/24 is subnetted, 1 subnets
O       12.12.12.0 [110/74] via 25.25.25.2, 00:05:33, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
O IA    13.13.13.0 [110/138] via 25.25.25.2, 00:05:33, FastEthernet0/0
     14.0.0.0/24 is subnetted, 1 subnets
O       14.14.14.0 [110/84] via 25.25.25.2, 00:05:33, FastEthernet0/0


R4(config)#do ping 25.25.25.5

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 25.25.25.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 340/416/536 ms


R5(config)#do ping 14.14.14.4

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 14.14.14.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 312/528/956 ms


Perfectly cool as R4 and R5 can reach each other's Fast Ethernet Interfaces without any problem.

-------------------------------


Now lets hop on to R1 and shutdown the frame relay link:

R1(config)#int s0/0
R1(config-if)#sh
R1(config-if)#
*Mar  1 01:04:39.507: %OSPF-5-ADJCHG: Process 100, Nbr 22.22.22.22 on Serial0/0 from
FULL to DOWN, Neighbor Down: Interface down or detached
*Mar  1 01:04:41.503: %LINK-5-CHANGED: Interface Serial0/0, changed state to administ
ratively down
*Mar  1 01:04:42.503: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, chan
ged state to down

R1(config)#do sh frame map
Serial0/0 (administratively down): ip 12.12.12.2
              dlci 102(0x66,0x1860), static,
              broadcast,
              CISCO, status deleted



-----------------------------------


Now lets see if R4 can still reach R5:

R4(config)#do ping 25.25.25.5

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 25.25.25.5, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

R4(config)#do sh ip ro os
     23.0.0.0/24 is subnetted, 1 subnets
O IA    23.23.23.0 [110/138] via 14.14.14.1, 00:03:25, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
O IA    13.13.13.0 [110/74] via 14.14.14.1, 00:11:32, FastEthernet0/0



Hmmmm....Now lets fix this :-)


But before that in short R4 is not able to reach R5 is because of OSPF rule that we learned in CCNA is that two areas must cross AREA O in order to reach each other. Why that rule is there ? Hmmm .... I have just explained it in my last OSPF post.

But here in our scenario AREA 0 gets split in half . Basically I call it broken AREA 0. If we take a look little deeper the scenario looks like is AREA 0 -> AREA 1 -> AREA 0. Now because of our AREA 0 in center rule we can't directly cross AREA 1 in the middle. So the way we can fix it using a OSPF bandage called OSPF Virtual Link.





So by building a virtual link between R1 and R2 passing through R3 we can fix this issue. So basically by building a virtual link we are extending AREA 0 size. In short "Virtual links are used to extend Area 0 across another area. They also can be thought of as tunnels for LSAs. They are deployed in cases when areas become partitioned or an area does not border Area 0".

*********************************
*          Fixture & Verification             *
*********************************

R1(config)#router ospf 100
R1(config-router)#area 1 virtual-link 22.22.22.22

R2(config)#router ospf 200
R2(config-router)#area 1 virtual-link 11.11.11.11

R1(config-router)#
*Mar  1 01:10:49.811: %OSPF-5-ADJCHG: Process 100, Nbr 22.22.22.22 on OSPF_VL0 from L
OADING to FULL, Loading Done

R2(config-router)#
*Mar  1 01:09:18.335: %OSPF-5-ADJCHG: Process 200, Nbr 11.11.11.11 on OSPF_VL0 from L
OADING to FULL, Loading Done

R4(config)#do ping 25.25.25.5

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 25.25.25.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 160/283/408 ms


R4(config)#do sh ip ro os
     23.0.0.0/24 is subnetted, 1 subnets
O IA    23.23.23.0 [110/138] via 14.14.14.1, 00:09:14, FastEthernet0/0
     25.0.0.0/24 is subnetted, 1 subnets
O       25.25.25.0 [110/148] via 14.14.14.1, 00:03:04, FastEthernet0/0
     12.0.0.0/24 is subnetted, 1 subnets
O       12.12.12.0 [110/202] via 14.14.14.1, 00:03:04, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
O IA    13.13.13.0 [110/74] via 14.14.14.1, 00:17:21, FastEthernet0/0


R1(config)#do sh ip ro os
     23.0.0.0/24 is subnetted, 1 subnets
O       23.23.23.0 [110/128] via 13.13.13.3, 00:22:26, Serial0/1
     25.0.0.0/24 is subnetted, 1 subnets
O       25.25.25.0 [110/138] via 13.13.13.3, 00:05:42, Serial0/1
     12.0.0.0/24 is subnetted, 1 subnets
O       12.12.12.0 [110/192] via 13.13.13.3, 00:05:42, Serial0/1


R2(config)#do sh ip ro os
     13.0.0.0/24 is subnetted, 1 subnets
O       13.13.13.0 [110/128] via 23.23.23.3, 00:45:56, Serial0/1
     14.0.0.0/24 is subnetted, 1 subnets
O       14.14.14.0 [110/138] via 23.23.23.3, 00:08:03, Serial0/1


R3#sh ip ro os
     25.0.0.0/24 is subnetted, 1 subnets
O IA    25.25.25.0 [110/74] via 23.23.23.2, 00:26:34, Serial0/0
     12.0.0.0/24 is subnetted, 1 subnets
O IA    12.12.12.0 [110/128] via 23.23.23.2, 00:26:34, Serial0/0
     14.0.0.0/24 is subnetted, 1 subnets
O IA    14.14.14.0 [110/74] via 13.13.13.1, 00:25:25, Serial0/1




HTH....

DEEPAK ARORA

4 comments:

江婷 said...

知識可以傳授,智慧卻不行。每個人必須成為他自己。......................................................................

貴寶 said...

向著星球長驅直進的人,反比踟躕在峽路上的人,更容易達到目的。............................................................

Anonymous said...

Hi,
I would be happy if you could assist me in finding out answer, Why OSPF area 0 is always a backbone area, Why not area 1 or other number in range from 0.0.0.1 to 255.255.255.254

Deepak Arora said...

Hi Anonymous,

As per SPEC, Area 0 is the only area that can be backbone. Check section 3.1 from RFC - 2328.

Apart from this it's only area 0 that can not be dis-contiguous, but at the same time any other area can be dis-contiguous.

So basically you can create a network with area 0 in middle and rest all areas can be area 1.

Now why area 0 is needed. I can explain...but Jeff has already done it itself
:-)

check this out:

http://www.networkworld.com/community/node/19293

HTH...
Deepak Arora