cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2236
Views
0
Helpful
3
Replies

OSPF cost to ASBR

owalter
Level 1
Level 1

I have the following lab setup :

   R0 ------------------------- R1

    |                              |

    |        Area 0             |

    |                              |

   R2-------------------------- R3

All Routers run OSPF in area 0.

R0 Loop0 : 1.1.1.1

R1 Loop0 : 2.2.2.2

R2 Loop0 : 3.3.3.3

R3 Loop0 : 4.4.4.4

R2 and R3 have a static default route and use default information originate

which makes them ASBRs.

Goal is to achieve loadbalancing on R0 and R1 and have both default routes in RT.

OSPF database on R0 and R1 looks like :

Type-5 AS External Link States
         
Link ID         ADV Router      Age         Seq#       Checksum Tag
0.0.0.0         3.3.3.3         626         0x80000004 0x00DAC8 1
0.0.0.0         4.4.4.4         492         0x80000004 0x00BCE2 1

But RT only includes one default route :

O*E2 0.0.0.0/0 [110/1] via 20.20.20.2, 00:06:02, FastEthernet0/1
R0#

O*E2 0.0.0.0/0 [110/1] via 30.30.30.2, 00:06:32, FastEthernet0/1

R1#

both have E2 Metrik Type, no internal cost is added (default).

Looking at the ASBRs :

R0#sh ip ospf border-routers

OSPF Process 1 internal Routing Table

Codes: i - Intra-area route, I - Inter-area route

i 4.4.4.4 [2] via 10.10.10.2, FastEthernet2/0, ASBR, Area 0, SPF 14
i 4.4.4.4 [2] via 20.20.20.2, FastEthernet0/1, ASBR, Area 0, SPF 14
i 3.3.3.3 [1] via 20.20.20.2, FastEthernet0/1, ASBR, Area 0, SPF 14

R1#sh ip ospf border

OSPF Process 1 internal Routing Table

Codes: i - Intra-area route, I - Inter-area route

i 4.4.4.4 [1] via 30.30.30.2, FastEthernet0/1, ASBR, Area 0, SPF 14
i 3.3.3.3 [2] via 10.10.10.1, FastEthernet2/0, ASBR, Area 0, SPF 14
i 3.3.3.3 [2] via 30.30.30.2, FastEthernet0/1, ASBR, Area 0, SPF 14

In this internal routing table only one ASBR has better path, metric, cost,

hop count, or whatever the value in [ ] is?

Is there a way to manipulate this value ?

Is there a way to have two default routes in the RT of R0 and R1 in this scenario ?

1 Accepted Solution

Accepted Solutions

Hello Oliver,

in real world you would use one or two backbone vlans where all devices are connected and you would see two paths installed on R0 and R1 without any change.

And routers would be connected to two lan switches.

This is a typical POP design.

if your topology is made only of point to point links when you try to make R0 to install two routes R1 will see an even higher metric towards one ASBR.

Hope to help

Giuseppe

View solution in original post

3 Replies 3

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Walter,

may you post

sh ip ospf database external 0.0.0.0

taken from both ASBR candidate routers

if they share the same FA address and that FA is not 0.0.0.0, a suppression mechanism is triggered and router with highest OSPF router-id wins and the other stops to advertise its own LSA.

This is standard based as explained in RFC 2328 OSPFv2

>>

Type 2
                external paths advertising equal type 2 metrics are
                compared by looking at the distance to the forwarding
                addresses.


http://www.rfc-editor.org/rfc/rfc2328.txt

If the new AS external path is still indistinguishable
                from the current paths in the N's routing table entry,
                and RFC1583Compatibility is set to "disabled", select
                the preferred paths based on the intra-AS paths to the
                ASBR/forwarding addresses, as specified in Section
                16.4.1.

 Type 2 external paths advertising equal type 2 metrics are
                compared by looking at the distance to the forwarding
                addresses.

Edit:

in your case metric to ASBR is considered and it may be the metric to OSPF router-id of ASBR.

lowest metric to ASBR is preferred even if the same seed metric of type 2 is used.

To change this you should make the two ASBR router-ids to appear as equal cost on the local node by changing the cost on one link from 1 to 2

ip ospf cost 2 in interface mode so that both are at the same internal metric

Hope to help

Giuseppe

Hello Giuseppe,

thanks a lot for your detailed answer and sorry for my late reply.

Here the output you asked for :

R2#sh ip ospf database external 0.0.0.0

            OSPF Router with ID (3.3.3.3) (Process ID 1)

                Type-5 AS External Link States

  LS age: 118
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 0.0.0.0 (External Network Number )
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000001
  Checksum: 0xE0C5
  Length: 36
  Network Mask: /0
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 1
        Forward Address: 0.0.0.0
        External Route Tag: 1

  Routing Bit Set on this LSA
  LS age: 106
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 0.0.0.0 (External Network Number )
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000001
  Checksum: 0xC2DF
  Length: 36
  Network Mask: /0
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 1
        Forward Address: 0.0.0.0
        External Route Tag: 1

R3#sh ip ospf database external 0.0.0.0

            OSPF Router with ID (4.4.4.4) (Process ID 1)

                Type-5 AS External Link States

  Routing Bit Set on this LSA
  LS age: 173
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 0.0.0.0 (External Network Number )
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000001
  Checksum: 0xE0C5
  Length: 36
  Network Mask: /0
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 1
        Forward Address: 0.0.0.0
        External Route Tag: 1

  LS age: 160
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 0.0.0.0 (External Network Number )
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000001
  Checksum: 0xC2DF
  Length: 36
  Network Mask: /0
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 1
        Forward Address: 0.0.0.0
        External Route Tag: 1

So, both ASBR use 0.0.0.0 as FA.

In this case as you said, the following is valid :

In your case metric to ASBR is considered and it may be the metric to OSPF router-id of ASBR.

lowest metric to ASBR is preferred even if the same seed metric of type 2 is used.

So changing the ospf cost to 2 on the link between R0 and R2 ends in this :

O*E2 0.0.0.0/0 [110/1] via 20.20.20.2, 00:00:30, FastEthernet0/1
               [110/1] via 10.10.10.2, 00:00:30, FastEthernet2/0

So this is the desired behaviour on R0, now both RIDs of the ASBRs have same cost.

Problem now is that this is still not valid on R1. Cost there is 3 to R2 and 1 to R3.

Changing the cost to 2 on link R1 to R3 ends in the situation before the change.

So changing the cost always has impact to both routers (R0 and R1).

I do not see a way to change costs in a way that both R0 and R1 have equal cost

to R2 and R3. I can only achieve this for one of them.

Thanks for your support.

Best regards.

Oliver

Hello Oliver,

in real world you would use one or two backbone vlans where all devices are connected and you would see two paths installed on R0 and R1 without any change.

And routers would be connected to two lan switches.

This is a typical POP design.

if your topology is made only of point to point links when you try to make R0 to install two routes R1 will see an even higher metric towards one ASBR.

Hope to help

Giuseppe

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco