cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2133
Views
25
Helpful
10
Replies

OSPF Default Route

lamav
Level 8
Level 8

Hi:

Here is my set up:

R1--R2

| |

R3--R4

Its a square. Each link is a Ten gig.

Each router is running ospf and has an OSPF adjacency with its directly connected neighbor.

R1 and R2 have static routes in their RIB. R1 learns its default from the ISP and R2 learns it from R1. Each originates a default route with the default-information originate command.

So, R3 has a default that pointsto R1. And R2 has a default that points to R1, too.

Shouldnt R4 have two default routes, one from R1 (which it learns from R3) and one from R2?

Right now, it only has 1 that points to R3 and shows that it was originated by R1.

R4#sh ip ro 0.0.0.0

Routing entry for 0.0.0.0/0, supernet

Known via "ospf 1", distance 110, metric 1, candidate default path

Tag 1, type extern 2, forward metric 11

Last update from 71.22.7.157 on TenGigabitEthernet9/3, 1d02h ago

Routing Descriptor Blocks:

* 71.22.7.157, from 64.13.44.104, 1d02h ago, via TenGigabitEthernet9/3

Route metric is 1, traffic share count is 1

Route tag 1

R4#

A bit confused...

Thanks

1 Accepted Solution

Accepted Solutions

Victor,

Make sure all routers in the topology have:

auto-cost reference-bandwidth 100000

You do understand you are bumping the cost reference to 100 Gig?

Based on the forwarding metric I see from R2, it is a bit higher on routes from R1 vs R3 on routes from R1.

View solution in original post

10 Replies 10

lamav
Level 8
Level 8

I know it looks weird in the figure above, but R1 has only one link, the other connects R2 to R4.

Edison Ortiz
Hall of Fame
Hall of Fame

Verify all routers are OSPF neighbors and let's see the OSPF Database (just the external section).

__

Edison.

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Victor,

check if R2 in this scenario is really injecting a default route in the OSPF domain.

Because R2 receives R1's OSPF default route and this can make it to inhibit its own route.

I see that this is an O E2 route.

I would use O E1 route on both devices.

>> Tag 1, type extern 2, forward metric 11

check also the metric to reach R1 and R2 from R4.

you may have missed to update auto-reference bandwidth on one device

11 = 1 + 10

two different tengiga link one with cost 1 and one with cost 10 maked me think of this.

Hope to help

Giuseppe

Hey, Edison/Giuseppe:

1.) All routers are ospf neighbors of each other -- verified.

Here is the route table and database info fromrouters in question:

R2:

R2#sh ip ospf database external 0.0.0.0

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

Type-5 AS External Link States

Routing Bit Set on this LSA in topology Base with MTID 0

LS age: 1601

Options: (No TOS-capability, DC)

LS Type: AS External Link

Link State ID: 0.0.0.0 (External Network Number )

Advertising Router: 64.13.44.104

LS Seq Number: 8000004F

Checksum: 0x4C36

Length: 36

Network Mask: /0

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

MTID: 0

Metric: 1

Forward Address: 0.0.0.0

External Route Tag: 1

R2#sh ip ro 0.0.0.0

Routing entry for 0.0.0.0/0, supernet

Known via "ospf 1", distance 110, metric 1, candidate default path

Tag 1, type extern 2, forward metric 10

Last update from 71.22.7.129 on TenGigabitEthernet9/3, 1d18h ago

Routing Descriptor Blocks:

* 71.22.7.129, from 64.13.44.104, 1d18h ago, via TenGigabitEthernet9/3

Route metric is 1, traffic share count is 1

Route tag 1

R2#

R2#

R2#sh run | be router ospf

router ospf 1

router-id 64.13.44.105

log-adjacency-changes

auto-cost reference-bandwidth 100000

nsf ietf

passive-interface default

no passive-interface GigabitEthernet1/3

no passive-interface TenGigabitEthernet9/2

no passive-interface TenGigabitEthernet9/3

network 10.41.253.128 0.0.0.31 area 0

network 64.13.44.105 0.0.0.0 area 0

network 71.22.7.130 0.0.0.0 area 0

network 71.22.7.165 0.0.0.0 area 0

default-information originate

R3:

R3#sh ip ospf database external 0.0.0.0

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

Type-5 AS External Link States

Routing Bit Set on this LSA in topology Base with MTID 0

LS age: 1849

Options: (No TOS-capability, DC)

LS Type: AS External Link

Link State ID: 0.0.0.0 (External Network Number )

Advertising Router: 64.13.44.104

LS Seq Number: 8000004F

Checksum: 0x4C36

Length: 36

Network Mask: /0

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

MTID: 0

Metric: 1

Forward Address: 0.0.0.0

External Route Tag: 1

R3#

R3#sh ip ro 0.0.0.0

Routing entry for 0.0.0.0/0, supernet

Known via "ospf 1", distance 110, metric 1, candidate default path

Tag 1, type extern 2, forward metric 1

Last update from 71.22.7.161 on TenGigabitEthernet9/1, 1d16h ago

Routing Descriptor Blocks:

* 71.22.7.161, from 64.13.44.104, 1d16h ago, via TenGigabitEthernet9/1

Route metric is 1, traffic share count is 1

Route tag 1

R3#

R4

R4#sh ip ospf database ext 0.0.0.0

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

Type-5 AS External Link States

Routing Bit Set on this LSA in topology Base with MTID 0

LS age: 1993

Options: (No TOS-capability, DC)

LS Type: AS External Link

Link State ID: 0.0.0.0 (External Network Number )

Advertising Router: 64.13.44.104

LS Seq Number: 8000004F

Checksum: 0x4C36

Length: 36

Network Mask: /0

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

MTID: 0

Metric: 1

Forward Address: 0.0.0.0

External Route Tag: 1

R4#

R4#

R4#sh ip ro 0.0.0.0

Routing entry for 0.0.0.0/0, supernet

Known via "ospf 1", distance 110, metric 1, candidate default path

Tag 1, type extern 2, forward metric 11

Last update from 71.22.7.157 on TenGigabitEthernet9/3, 1d10h ago

Routing Descriptor Blocks:

* 71.22.7.157, from 64.13.44.104, 1d10h ago, via TenGigabitEthernet9/3

Route metric is 1, traffic share count is 1

Route tag 1

R4#

Victor,

I was unable to duplicate your problem in my lab with the same square topology.

My R4 router produces the following output:

R4#sh ip route 0.0.0.0

Routing entry for 0.0.0.0/0, supernet

Known via "ospf 1", distance 110, metric 1, candidate default path

Tag 1, type extern 2, forward metric 2

Last update from 192.168.24.2 on FastEthernet0/1, 00:02:30 ago

Routing Descriptor Blocks:

192.168.34.3, from 1.1.1.1, 00:02:30 ago, via FastEthernet0/0

Route metric is 1, traffic share count is 1

Route tag 1

* 192.168.24.2, from 2.2.2.2, 00:02:30 ago, via FastEthernet0/1

Route metric is 1, traffic share count is 1

Route tag 1

R4#sh ip os data external

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: 660

Options: (No TOS-capability, DC)

LS Type: AS External Link

Link State ID: 0.0.0.0 (External Network Number )

Advertising Router: 1.1.1.1

LS Seq Number: 80000001

Checksum: 0x1D91

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: 315

Options: (No TOS-capability, DC)

LS Type: AS External Link

Link State ID: 0.0.0.0 (External Network Number )

Advertising Router: 2.2.2.2

LS Seq Number: 80000001

Checksum: 0xD95A

Length: 36

Network Mask: /0

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

TOS: 0

Metric: 1

Forward Address: 192.168.12.1

External Route Tag: 1

And R2 itself has two 0.0.0.0 entries similar to R4's OSPF external database.

It seems your R2 router isn't generating the default route at all. You mentioned R1 is getting its default from the ISP, how the default is being sent from R1 to R2? eBGP, iBGP or EIGRP?

For R2 to generate a default route into OSPF with the default-information originate the default route must be learned via a routing protocol other than OSPF.

On my lab, I did an eBGP peering to send the default from R1 to R2. If you were using iBGP, the OSPF default route from R1 will win over the iBGP due to the administrative distance and I stated this won't generate a default route from R2.

HTH,

__

Edison.

For R2 to generate a default route into OSPF with the default-information originate the default route must be learned via a routing protocol other than OSPF.

Thats the answer, Edison. R2 IS learning the default route from OSPF and iBGP rom R1. I dint kow about that rule for generating a default. As for iBGP, the AD s higher, so....

OK, so R2 is not generating a default. How about passing on the default from R1? Shouldnt it be doing that?

Hello Victor,

>> R2 IS learning the default route from OSPF and iBGP rom R1.

and OSPF route is installed in the routing table for its lower AD.

>> OK, so R2 is not generating a default. How about passing on the default from R1? Shouldnt it be doing that?

it should be doing this however if the forwarding metric is higher you cannot see this on R4.

R4 will see a single LSA and will use the shortest path to R1 the ASBR node

so as Edison has suggested check ospf costs and also if the link R2-R4 is in the same area.

Hope to help

Giuseppe

Victor,

Make sure all routers in the topology have:

auto-cost reference-bandwidth 100000

You do understand you are bumping the cost reference to 100 Gig?

Based on the forwarding metric I see from R2, it is a bit higher on routes from R1 vs R3 on routes from R1.

H, Giuseppe/Edison:

Sorry it took me so long ot get back - busy day yesterday.

Edison, yes. There is an extra zero. Gotta get rid of it.

Anyway, I am stumped. I had looked at the forwarding metric before and it seems that the crosslinks offer a forwarding metric of 10 and the links that go north/south bound are 1. So, the total is 11 if R4 takes the default path through R3 or R2.

R2#sh ip ro 0.0.0.0

Routing entry for 0.0.0.0/0, supernet

Known via "ospf 1", distance 110, metric 1, candidate default path

Tag 1, type extern 2, forward metric 10

Last update from 71.22.7.129 on TenGigabitEthernet9/3, 3d03h ago

Routing Descriptor Blocks:

* 71.22.7.129, from 64.13.44.104, 3d03h ago, via TenGigabitEthernet9/3

Route metric is 1, traffic share count is 1

Route tag 1

R2#

R3#sh ip ro 0.0.0.0

Routing entry for 0.0.0.0/0, supernet

Known via "ospf 1", distance 110, metric 1, candidate default path

Tag 1, type extern 2, forward metric 1

Last update from 71.22.7.161 on TenGigabitEthernet9/1, 3d00h ago

Routing Descriptor Blocks:

* 71.22.7.161, from 64.13.44.104, 3d00h ago, via TenGigabitEthernet9/1

Route metric is 1, traffic share count is 1

Route tag 1

R3#

R4#sh ip ro 0.0.0.0

Routing entry for 0.0.0.0/0, supernet

Known via "ospf 1", distance 110, metric 1, candidate default path

Tag 1, type extern 2, forward metric 11

Last update from 71.22.7.157 on TenGigabitEthernet9/3, 2d18h ago

Routing Descriptor Blocks:

* 71.22.7.157, from 64.13.44.104, 2d18h ago, via TenGigabitEthernet9/3

Route metric is 1, traffic share count is 1

Route tag 1

R4#sh ip ro 64.13.44.105

[EDIT] Why should the forwarding metrics be different when they are all equal cost links? Theyre all 10 G links. [EDIT]

Nevermind! I am stupid and careless. I was indeed missing an auto-cost reference-bandwidth 100000 statement on R3. Dumb ass....

Sorry, guys.

Thanks for your time.

Victor

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