[c-nsp] How the "best" route is selected (OSPF)

Adam Greene maillist at webjogger.net
Fri Jan 27 09:31:56 EST 2006


Kristo,

This document may not reflect your topology, but it does give some insight
into how routes from mulitple OSPF processes are injected into the routing
table.

http://www.cisco.com/en/US/customer/tech/tk365/technologies_tech_note09186a00801069aa.shtml

To quote: "...OSPF does not do any OSPF route selection between processes
(for instance, OSPF metrics and route types are not taken into account, when
deciding the route of which process should be installed into the routing
table)."

We faced a similar issue on our network and resolved the problem by issuing
the command "distance ospf external <metric>" under the OSPF process which
was receiving the route we didn't want to prefer (i.e. we made <metric>
high). Perhaps some variation of the command can work for you.

Best,
Adam

----- Original Message ----- 
From: "Kristofer Sigurdsson" <kristosig at gmail.com>
To: <cisco-nsp at puck.nether.net>
Sent: Friday, January 27, 2006 8:25 AM
Subject: [c-nsp] How the "best" route is selected (OSPF)


> Hi guys,
>
> I am a bit lost in a case where my understanding of OSPF seems
> to be a bit off.
>
> The scenerio: Same network, learned through two seperate OSPF processes,
> same type (I tried external 1 and external 2).  This route is in the
> OSPF databases
> for both processes.
> The only difference is the metric.  It's much higher in one of the
> processes, as it's
> preferred.
>
> Now, the way I understand it, the route with the lower metric should
> always be chosen and put into the routing table.  However, it seems
> that the route that's injected first wins.  Even if the other one pops
> in only a few minutes later, as long as the first one is valid, it
> continues to be the one in the routing table.
> If I try to clear the route (clear ip route x.x.x.x), it gets
> refreshed...as the same route as before I cleared...
>
> Here's a glimpse of how it looks in the two databases:
>
> router#sh ip ospf 3 database external x.x.x.x
>
>             OSPF Router with ID (y.y.y.y) (Process ID 3)
>
>                 Type-5 AS External Link States
>
>   Routing Bit Set on this LSA
>   LS age: 108
>   Options: (No TOS-capability, DC)
>   LS Type: AS External Link
>   Link State ID: x.x.x.x (External Network Number )
>   Advertising Router: z.z.z.z
>   LS Seq Number: 80000001
>   Checksum: 0xF67E
>   Length: 36
>   Network Mask: /24
>         Metric Type: 1 (Comparable directly to link state metric)
>         TOS: 0
>         Metric: 400
>         Forward Address: 0.0.0.0
>         External Route Tag: 0
>
> rtr3.s24#sh ip ospf 4 database external x.x.x.x
>
>             OSPF Router with ID (v.v.v.v) (Process ID 4)
>
>                 Type-5 AS External Link States
>
>   Routing Bit Set on this LSA
>   LS age: 112
>   Options: (No TOS-capability, DC)
>   LS Type: AS External Link
>   Link State ID: x.x.x.x (External Network Number )
>   Advertising Router: t.t.t.t
>   LS Seq Number: 80000001
>   Checksum: 0x5D87
>   Length: 36
>   Network Mask: /24
>         Metric Type: 1 (Comparable directly to link state metric)
>         TOS: 0
>         Metric: 30
>         Forward Address: 0.0.0.0
>         External Route Tag: 0
>
> >From show ip route:
>
> router#sh ip route x.x.x.x
> Routing entry for x.x.x.x/24
>   Known via "ospf 3", distance 110, metric 401, type extern 1
>   Last update from z.z.z.z on GigabitEthernet1/22, 00:14:01 ago
>   Routing Descriptor Blocks:
>   * z.z.z.z, from z.z.z.z, 00:14:01 ago, via GigabitEthernet1/22
>       Route metric is 401, traffic share count is 1
>
> ...now, why is the route with the higher metric in the routing table?
> Is there something I'm missing?
>
> Thanks,
> -Kristo
>
> _______________________________________________
> cisco-nsp mailing list  cisco-nsp at puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-nsp
> archive at http://puck.nether.net/pipermail/cisco-nsp/
> ---
> [This e-mail was scanned for viruses by Webjogger's AntiVirus Protection
System]
>
>

---
[This e-mail was scanned for viruses by Webjogger's AntiVirus Protection System]



More information about the cisco-nsp mailing list