cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
591
Views
0
Helpful
5
Replies

How to tell which route will be chosen by OSPF

MICHAEL BURNS
Level 1
Level 1

I have an ASA that is learning a default route via two external routers.  I currently have it pointing to a specific router by way of a static route.  I want to remove the static route and let it depend on OSPF.  How can I assure that it choses one router over another?  I have the cost configured to 100 on the interface of the router that I don't want to prefer, so it should work in theory, but I want to verify before removing the static route.  This is the output from the ASA.  Is there a different command I should use to see the cost to each of the routers?

ASA-1# sho ospf database external

       OSPF Router with ID (999.999.22.4) (Process ID 100)

                Type-5 AS External Link States

  Routing Bit Set on this LSA

  LS age: 1661

  Options: (No TOS-capability, DC)

  LS Type: AS External Link

  Link State ID: 0.0.0.0 (External Network Number )

  Advertising Router: 999.999.22.250

  LS Seq Number: 80000001

  Checksum: 0x96fb

  Length: 36

  Network Mask:0.0.0.0

        Metric Type: 2 (Larger than any link state path)

        TOS: 0

        Metric: 1

        Forward Address: 0.0.0.0

        External Route Tag: 100

  Routing Bit Set on this LSA

  LS age: 1820

  Options: (No TOS-capability, DC)

  LS Type: AS External Link

  Link State ID: 0.0.0.0 (External Network Number )

  Advertising Router: 999.999.22.251

  LS Seq Number: 8000033e

  Checksum: 0xd44

  Length: 36

  Network Mask:0.0.0.0

        Metric Type: 2 (Larger than any link state path)

        TOS: 0

        Metric: 1

        Forward Address: 0.0.0.0

        External Route Tag: 100

1 Accepted Solution

Accepted Solutions

Do you manage the router that is injecting the default route in OSPF ?

It would be:

default-information originate metric-type 2 metric 100

View solution in original post

5 Replies 5

Jose Jara
Level 3
Level 3

Both are external external type 2 routes with the same metric. Why do not change the metric for the 0/0 to something worse in the ASBR less preferred?

How would I do that?  I am learning the default from ISP's via BGP on the ASBR's.

Do you manage the router that is injecting the default route in OSPF ?

It would be:

default-information originate metric-type 2 metric 100

Beautiful!  I added that config to the ASBR and the metric now shows 100 on the ASR.

One question, why was the metric showing to be 1 if I configured the cost on the ASBR to be 100?  Is it because it is an external route?

Michael,

is the default metric for external type 2 OSPF routes. You may manipulate the metric of these routes in the ASBR only. However, external type 1 OSPF will add the cost to reach the ASBR.

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: