cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
338
Views
0
Helpful
2
Replies

OSPF route selection question....

jonathanaxford
Level 3
Level 3

Hi All,

If an OSPF router has two default routes sent to it, via different routers and they are both E1 type routes, does it base its route selection on metric only?

My reason for asking is, I have a router is running two OSPF processes and receives a default route from both via the default-information originate metric-type 1 command from connected routers. The reason for this is that the router participates in a "failover" scenario whereby should the internet connection be lost, all traffic is routed out via another router at a different location. I can explain this in a bit more detail if necessary.

One of these routes has a metric of [110/31] and one has a metric of [110/11].

If i issue the clear ip route * command, the router selects the route with the [110/11] metric and places it into its routing table. This is good. If i shut the interface that connects the router that is sending me that route, it immediately places the [110/31] metric route into the routing table. This is also good.

When i re-enable the shutdown interface, the router does not swap back to using the route with the better metric, unless the clear ip route * command is run. Is this by design? I am struggling to drag my OSPF theory out of the depths of my mind!

More info can follow if necessary,

Many thanks

Jonathan

2 Replies 2

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Jonathan,

when using two OSPF processes they run as "ships in the night" and they compete for installing prefixes in the routing table.

The first to propose a prefix wins.

We had the same issue during the integration of two providers.

This is true also for the default route.

Actually the IP routing maintainer looks only at the AD.

You need to decide a hierarchy between the two OSPF processes using the distance OSPF command that allows to modify AD for internal inter-area and external routes.

router ospf 1

distance ospf external 112

router ospf 2

distance ospf external 115

see

http://www.cisco.com/en/US/docs/ios/iproute/command/reference/irp_osp1.html#wp1013195

Hope to help

Giuseppe

Hi Guiseppe,

I had a play with the OSPF distance command after posting this and it worked perfectly! I have now assigned a different OSPF distance to the necessary OSPF process and all works like a charm.

Many thanks for the explanation, i vaguely remember "Ships in the night" routing from somewhere!

Cheers

Jonathan

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card