cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
574
Views
13
Helpful
15
Replies

Default metric when redistributing the default route into OSPF

I was looking at couple of cisco articles and they happened to mention that the default Metric when redistributing the default route from IGP/Static into OSPF is "20". But when I did a LAB in GNS3, it showed me a metric of "1". Which one is accurate?

Here is the output of "show ip ospf database external"

--------------------------------------------------

LS age: 1
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 0.0.0.0 (External Network Number )
Advertising Router: 30.0.0.2
LS Seq Number: 80000006
Checksum: 0x1677
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

1 Accepted Solution

Accepted Solutions

friend he talking about redistribute prefix and the default metric ospf add into these prefix 
it not talk about default route 
default route always use 1

where other prefix when redistrubte into ospf it may have
1 if it from BGP
20 if it from static or other IGP

Screenshot (925).png

View solution in original post

15 Replies 15

Hello
Apologies but you cannot redistribute a default route into ospf, this is performed via the default-information originate feature in the ospf process.

However for a default route to be entered in the ospf DB the advertising rtr needs to either have a static default route, just like you have mentioned in its route table first or you can "always" advertise a default route using the same command as above but the "always " keyword" appended.

Note -  this default route advertisement even though classed as external route like a redistributed route will not have the same metric cost as that of a redistributed E1/2 route but it will by default perform the same such that an E2 route by default (metric1) or E1 route (metric 2)


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hi @paul driver ,

Yes, when I meant redistributing the default route into OSPF, i meant it by issuing the command "default-information originate". Like you said, in my lab I saw E2 with a metric of 1 . So  cisco article I was referring to needs to get updated. Thank you for answering my question!

I will check this in lab

MHM

@Paheeradan Nagulan 

Are you refering to this?

How your OSPF got the route? Was from BGP? Or is It redistributing to BGP?

"Note: If a metric is not specified, OSPF puts a default value of 20 when it redistributes routes from all protocols except Border Gateway Protocol (BGP) routes, which gets a metric of 1"

Hi @Flavio Miranda ,

Here are the answers to your questions.

1)Are you refering to this?

Yes, I was referring to that specific document. 

2)How your OSPF got the route? Was from BGP? Or is It redistributing to BGP?

I did multiple ways(Redistributing from EIGRP to OSPF , Creating a dummy default route, Added default-information originate always). It was showing the metric of 1 in those scenarios!

I run lab

in R1 if default route from static or from bgp in R3 the metric is 1

for your case can I see cisco doc. talking about 20 ?

Screenshot (919).pngScreenshot (920).pngScreenshot (921).png

@MHM Cisco World ,

Yes, I see Cisco have mentioned default metric =1 and the  default metric type = 2 in your link. Not sure why they have mentioned differently in the other document. Anyways thank you clearing up my doubt. 

Hi @MHM Cisco World ,

First of all, thank you for taking your time to spin up a lab to test it. Yes, I did see the same behavior(The metric of 1).

Here is the doc that is talking about the metric of 20. May be Cisco is having some inconsistency about this.

https://www.cisco.com/c/en/us/support/docs/ip/enhanced-interior-gateway-routing-protocol-eigrp/8606-redist.html

Specifically here is the line I was referring to in that doc.

"Note: If a metric is not specified, OSPF puts a default value of 20 when it redistributes routes from all protocols except Border Gateway Protocol (BGP) routes, which gets a metric of 1."

 

Get it let me check one point 

MHM

friend he talking about redistribute prefix and the default metric ospf add into these prefix 
it not talk about default route 
default route always use 1

where other prefix when redistrubte into ospf it may have
1 if it from BGP
20 if it from static or other IGP

Screenshot (925).png

Hi @MHM Cisco World ,

Ah, didn't think about redistributing the specific prefixes. I need more coffee lol  . Yes, you are right. It makes perfect sense now. Thanks for the explanation!

Hello
@Flavio Miranda @MHM Cisco World  I would say its irrelevant how the default is originated for an default opsf route to be advertised into opsf then my understanding its mainly performed with the default-information originate command (excluding using network 0.0.0.0) appended into the opsf process. but with a default metric-type of E2 or a metric-type of E1 UNLESS it also with own seed metric appended to either.


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hello
Added default-information originate always). It was showing the metric of 1 in those scenarios! 

What you see is correct - if you think about it - its being injected locally by the rtr so the metric will be 1 by default metric-type 2 if you set it to type-1 it will increase due to link cost being added - 

additionally if you add you own seed metric to the originate that will become the default value


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Review Cisco Networking for a $25 gift card