[c-nsp] How the "best" route is selected (OSPF)
Kristofer Sigurdsson
kristosig at gmail.com
Fri Jan 27 08:25:22 EST 2006
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
More information about the cisco-nsp
mailing list