[j-nsp] OSPF Confusion

Crist Clark cjc+j-nsp at pumpky.net
Thu Feb 27 19:50:44 EST 2014


On Thu, Feb 27, 2014 at 02:23:17PM -0600, Eduardo Barrios wrote:
> Hi Christ,
> 
> This from Juniper about exporting into ospf and metrics:
> 
> http://www.juniper.net/techpubs/en_US/junos13.1/topics/concept/ospf-routing-external-metrics-overview.html
> 
> 
> So if you exported your static routes into OSPF they will be a Type 2 external metric (you can check with "show ospf database external detail"), use only external cost and not take into account the link-state metric in your diagram. 

I'm pretty sure that's not how it works. Think about the case where you
have the same external route imported in multiple places.  How would OSPF
decide which route to take?

That explanation of type-1 versus type-2 is misleading. For a type-2 route,
the path to the best (lowest metric) type-2 LBA is the best path to that
LBA's ASBR. So in my case, the best path from R3 to R2 (the ASBR for the
external routes) is through R1 (at least that's how it looks to me).

I have tried changing all of the external routes to be imported as type-1,
and I get the exact same result.

But being able to see all of the metrics did show some interesting things.
I was playing with costs, trying to make them reflect the inverse-bandwidth
model better, when I noticed that this,

    1    1
R1 --------- R2
 \           /20
  \10       /
   \       /
    \     /
     \   /
    10\ /50
      R3

Set of metrics got me the behavior I wanted. From R3, the next hop for
external routes off of R2 was R1. I was running with type-1 externals,
so the path metric shows up. The metric for one of those externals is
32.

So that is elucidating in one way. Now I see why, when the cost for
R2->R3 equals the the cost for R3->R2, that the R3-R2 link is the best
next hop. The metric is 10+1+(cost on that link) versus just (cost on
that link). But in another way, I'm still confused. Why does the cost
for R2->R3 come into the calculation of the cost for R3->R2 at all.

I think I'm missing some basic understanding of OSPF.

I'll also add that when I purposely break the R1-R3 link, the protocol
does not seem to deal with it at all. So, yeah, I really seem to be
lost on traffic engineering in OSPF.

> * You might have to write an export policy: from protocol static + any route-filter that you need, then accept and also add metric xx
> 
> Thanks,
> Eduardo
> 
> Eduardo Barrios, EIT, JNCIP-SP
> Telecommunications Specialist
> Lower Colorado River Authority  | 3505 Montopolis Dr. |  Austin, TX 78744
> 512.730.6332 ph  
> 
> 
> 
> -----Original Message-----
> From: juniper-nsp [mailto:juniper-nsp-bounces at puck.nether.net] On Behalf Of Crist Clark
> Sent: Tuesday, February 25, 2014 5:12 PM
> To: <juniper-nsp at puck.nether.net> Puck
> Subject: [External] [j-nsp] OSPF Confusion
> 
> .
> 
> The problem is that R3 sees R2 as the best next hop for all of the statics
> on R2. I don't understand why. The cost of the path from R3 to R2 is lowest
> via R1, 11 vs. 20, right?
> 
> .
> 


More information about the juniper-nsp mailing list