Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Redistribute OSPF with a Metric

Posted on 2013-01-05
Medium Priority
Last Modified: 2013-01-10
When redistributing OSPF into another Routing Protocol using :
Redistribute OSPF 1  Metric <Number>

I am not sure why we need to specify a metric. in which case scenario the metric needs to be specified instead of just letting the OSPF redistribution to take the default?

Question by:jskfan
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 18

Assisted Solution

Akinsd earned 400 total points
ID: 38747587

Assisted Solution

by:Sandeep Gupta
Sandeep Gupta earned 1600 total points
ID: 38750334
This output shows an OSPF router redistributing static, RIP, IGRP, EIGRP, and IS-IS routes.

router ospf 1
network area 0
redistribute static metric 200 subnets
redistribute rip metric 200 subnets
redistribute igrp 1 metric 100 subnets
redistribute eigrp 1 metric 100 subnets
redistribute isis metric 10 subnetsThe OSPF metric is a cost value based on 108/ bandwidth of the link in bits/sec. For example, the OSPF cost of Ethernet is 10: 108/107 = 10

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

When there is a major net that is subnetted, you need to use the keyword subnet to redistribute protocols into OSPF. Without this keyword, OSPF only redistributes major nets that are not subnetted.

It is possible to run more than one OSPF process on the same router. However, running more than one process of the same protocol is rarely needed, and consumes the router's memory and CPU.

You do not need to define metric or use the default-metric command when redistributing one OSPF process into another.

Author Comment

ID: 38758313
I was asking about when redistributing OSPF into orther protocols.
for instance :

Router EIGRP 10
Redistribute OSPF 1  Metric <Number>
what effect will havethe metric in the EIGRP domain?

the metric might have impact on RIP, because if you type
Router RIP
Redistribute OSPF 1  Metric 20

OSPF will not be able to travel more than 15 hops inside RIP.

Accepted Solution

Sandeep Gupta earned 1600 total points
ID: 38758556
first lets understand when to use metric.

when there are multiple redistribution then routing table want to understand which route to take and which to reject. here comes the metric in picture which helps routing table to decide which is the best route to install.

Now see what exactly metric is:

A routing protocol uses a metric to determine which route to include in the routing table when it has two available routes to the same destination. The router will include the route with the smallest metric because it considers this route to be the shortest—and therefore best.

For example, here's a look at the truncated output of a show ip eigrp topology command:

P, 1 successors, FD is 6049536        
via (6049536/5537536), Serial3/0        
via (52825600/281600), Tunnel55

Notice that this routing protocol, EIGRP, has two routes to this network. However, the router will only include one of these routes—the one with the best metric—in the routing table

more simpler:

let say if eigrp recieve any route form ospf and rip it will install ospf route because ospf AD is higher
and if eigrp recieve route with two ospf process ex: ospf 100 & ospf this case AD is same then it will check metric and route with higher metric will win and installed in routng table.

I hope it helps

Author Closing Comment

ID: 38766036
Thank you !!!

Featured Post

ATEN's HDBaseT Presentation at InfoComm 2017

Hear ATEN Product Manager YT Liang review HDBaseT technology, highlighting ATEN’s latest solutions as they relate to real-world applications during her presentation at the HDBaseT booth at InfoComm 2017.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While it is possible to put two routes in place with the secondary having a higher metric, this may not always work. In the event of a failure that does not bring down the physical interface on the router the primary route is not removed. There is a…
How to set-up an On Demand, IPSec, Site to SIte, VPN from a Draytek Vigor Router to a Cyberoam UTM Appliance. A concise guide to the settings required on both devices
After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question