OSPF Inter-Area Cost

Answered Question
Nov 14th, 2007
User Badges:

ROUTER1


|(172.31.11.4/24, Serial1/0.1, OSPF Area 0, Point-to-Multipoint)

|

|

|


Frame Relay Cloud----------(172.31.11.2/24, Serial1/0.1, OSPF Area 0, Point-to-Multipoint) ROUTER2


|

|

|

|(172.31.11.1/24, Serial1/0.1, OSPF Area 0, Point-to-Multipoint)


ROUTER3 (10.1.0.1/24, Serial1/1, OSPF Area 1)----------(10.1.0.2/24, Serial1/1, OSPF Area 1) ROUTER2


|(10.1.1.1/24, FastEthernet0/0, OSPF Area 1)

|

|

|(10.1.1.3/24, FastEthernet0/0, OSPF Area 1)


ROUTER4



*Note that in the diagram above, the same Router2 is connected to the Frame Relay Cloud via Serial1/0.1 subinterface and is also connected to Router3 via Serial1/1.

* No bandwidth command has been configured on the interfaces.



In Router3's routing table, I have the following route:


O 172.31.11.2/32 [110/128] via 172.31.11.4, 00:30:43, Serial1/0.1


In Router4's routing table, I have the following route:


O IA 172.31.11.2/32 [110/65] via 10.1.1.1, 00:10:20, FastEthernet0/0



Shouldn't the cost of the route be 129 instead of 65?



Thanks.






Correct Answer by Edison Ortiz about 9 years 4 months ago

> Shouldn't the cost of the route be 129 instead of 65?



No, it reports the cost to the ABR (R3).

F0/0 cost 1 + Serial1/1 cost 64 = 65.



  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Edison Ortiz Wed, 11/14/2007 - 20:43
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

> Shouldn't the cost of the route be 129 instead of 65?



No, it reports the cost to the ABR (R3).

F0/0 cost 1 + Serial1/1 cost 64 = 65.



akhran1974 Tue, 12/04/2007 - 14:07
User Badges:

Should the cost from R4 to R3 (ABR) be the F0/0 cost of 1 only? How does the Serial1/1 cost come into play?


Thank you.

Edison Ortiz Tue, 12/04/2007 - 14:49
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

After drawing the diagram here, it's not the cost to the ABR as I stated incorrectly but the cost to the destination IP by adding all links.


R2 is the ABR on this situation. It has a link on area 0 and a link on area 1 while R4 has a link in area 1.


The cost from R4 to R2 is 1 (as you stated correctly) and in order from R4 to reach R1, it needs to use the serial interface between R2 and R1 which is the frame-relay (cost of 64).


You can find the cost of each link by typing show ip ospf int brie

akhran1974 Tue, 12/04/2007 - 16:10
User Badges:

In R3's routing table, it has a route to 172.31.11.2 with a metric of 128. It seems that R3 has a higher preference for the higher cost (128) intra-area (area 0) route via R1 to reach 172.31.11.2, over the shorter inter-area route via R2's Serial1/1. So to reach 172.31.11.2 from R3, the packet goes R3->R1->R2.


If that is correct, and if R3 is the router advertising the route 172.31.11.0/24 to R4, then shouldn't the cost be the cost at R3 (128) + the cost of FastEthernet interface (1) between R3 and R4, resulting in total cost of 129 ?


Does intra-area route have two categories like external route-type E1 and E2, where E2 only display the cost at the ASBR?


Thanks !

Edison Ortiz Tue, 12/04/2007 - 17:38
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

Well, how is the physical connection ? I was assuming R1 was the hub and R3 and R2 the spokes.


There isn't any direct connection between R2 and R3, though they share the same subnet in the frame-relay cloud.


R3 will always prefer area 0 over any other area. Area 0 is considered the backbone.


When R4 reaches to R2, R2 will look for routes that are in area 0, that's why you see the cost from R4-(1)->R2-(64)->R1.

akhran1974 Wed, 12/05/2007 - 05:53
User Badges:

R1 should be the hub while R2 and R3 should be the spokes. Logically, R1's Serial1/0.1 is connected to R2's Serial 1/0.1 _and_ R3's Serial1/0.1 through the frame relay cloud (The three interfaces are in Area 0). The only direct connection between R2 and R3 is via the Serial1/1 interfaces (Area 1) on both routers. My apologies for the poor representation.


Since R3 will always prefer Area 0 over any other area, R3 will take the path of R3->R1->R2 to reach 172.31.11.2 (R2's Serial1/0.1, Area 0)


This will translate to R3 having a route with metric cost of 128 to 172.31.11.2.


If that is the case, should R4 have a route of metric cost 129 (128 + 1) to 172.31.11.2 ? (R4 FastEthernet -> (cost 1) -> R3 FastEthernet + R3 Serial1/0.1 -> (cost 64) -> R1 Serial1/0.1 + R1 Serial1/0.1 -> (cost 64) -> R2 Serial1/0.1 (172.31.11.2) = total cost 129 ?)


Thanks and my apologies again for the poor representation in the diagram.

Edison Ortiz Wed, 12/05/2007 - 08:13
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

> If that is the case, should R4 have a route of metric cost 129 (128 + 1) to 172.31.11.2 ?

> (R4 FastEthernet -> (cost 1) -> R3 FastEthernet + R3 Serial1/0.1 -> (cost 64) -> R1 Serial1/0.1 + R1 Serial1/0.1 ->

>(cost 64) -> R2 Serial1/0.1 (172.31.11.2) = total cost 129 ?)


__________________________________


R4 connects to R2 via the LAN interface (cost 1) and it doesn't need R3 to get to R1's frame-relay serial interface (cost 64).


R1 is the hub so the connection will go directly from R2 to R1.


akhran1974 Wed, 12/05/2007 - 15:29
User Badges:

But there is no LAN interface connection between R4 and R2. In my diagram above, R4's FastEthernet0/0 (10.1.1.3/24) is connected to R3 FastEthernet0/0 (10.1.1.1/24). So for R4 to reach the frame relay cloud, it has to pass through R3 since R4 is connected only to R3 (via the FastEthernet interface)?


Thanks.

Edison Ortiz Wed, 12/05/2007 - 17:02
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

I had R2 and R4 being neighbor on my diagram :)



R4 knows that in order to get to R2's WAN interface is must go via area 1.


R4 ->(cost1)->R3 s1/1-(cost64)-(R2).



akhran1974 Thu, 12/06/2007 - 00:45
User Badges:

I have attached the network diagram (proper diagram this time :) )


Since 172.31.11.2 is in Area 0, R3's preferred route should be via R1 to reach 172.31.11.2? If that is so, then the route from R4 to 172.31.11.2 should be R4-(cost1)->R3 f0/0-(cost64)->R1 Serial1/0.1-(cost64)->R2 Serial1/0.1 (172.31.11.2)?


Many thanks !



bvsnarayana03 Thu, 12/06/2007 - 01:17
User Badges:
  • Silver, 250 points or more

Hi,


Before explaining your topology, pls understand the ospf concept.


When a same route is learnt by multiple sources, then ospf's preference of route is given below (from high preference to low preference):


Intra area route (highest preferred)

Inter area route

External E1

External E2 (least preferred)


Coming to your topology. R3 learns the route to 11.2 from R1(inter area i.e. via area 0) & R2(intra area i.e. via area 1 from serial interface 1/1). Thus from above concept of preferred routes, R3 prefers the intra area path (i.e. directly to R2 via serial interface) to reach 11.2.


So on R4, route to 11.2 is showing cost of 65. This cost is the sum of cost to reach R3 (cost of 1 via fa eth) + cost to reach R2 (cost of 64 via serial)=(1 +64) i.e. 65.


Hope that clarifies your confusion.



Pls rate all helpful posts.

akhran1974 Thu, 12/06/2007 - 16:07
User Badges:

>> Coming to your topology. R3 learns the route to 11.2 from R1(inter area i.e. via area 0) & R2(intra area i.e. via area 1 from serial interface 1/1). Thus from above concept of preferred routes, R3 prefers the intra area path (i.e. directly to R2 via serial interface) to reach 11.2.


172.31.11.2 is in Area 0 and R3's Serial 1/0.1 is also in Area 0. So the route learnt from R1 should be intra-area ? If so, would the preferred route be from R3 S1/0.1->R1 S1/0.1->R2 S1/0.1(Area 0) ?


That said, from R4 to 172.31.11.2, it would be from R4 fastethernet -> R3 fastethernet -> R1 serial1/0.1 -> R2 Serial1/0.1, making a total cost of 1+64+64?


Thanks.

Actions

This Discussion