01-28-2025 08:18 PM
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
Solved! Go to Solution.
01-29-2025 06:52 AM
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
01-28-2025 10:12 PM - edited 01-28-2025 10:16 PM
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)
01-29-2025 06:22 AM
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!
01-29-2025 12:41 AM
I will check this in lab
MHM
01-29-2025 01:23 AM - edited 01-29-2025 01:26 AM
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"
01-29-2025 05:52 AM - edited 01-29-2025 05:53 AM
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!
01-29-2025 01:26 AM
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 ?
01-29-2025 02:26 AM
01-29-2025 06:02 AM - edited 01-29-2025 06:30 AM
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.
01-29-2025 05:58 AM
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.
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."
01-29-2025 06:35 AM
Get it let me check one point
MHM
01-29-2025 06:52 AM
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
01-29-2025 07:15 AM - edited 01-29-2025 07:18 AM
Hi @MHM Cisco World ,
Ah, didn't think about redistributing the specific prefixes. I need more coffee lol
01-29-2025 02:33 AM
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.
01-29-2025 06:03 AM - edited 01-29-2025 06:05 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide