How to configure OSPF Stub Area

Hello Konstantinos

The metric that OSPF chooses to use for a particular destination does not depend upon how the destination was learned. A destination network may be learned from a static route redistributed into OSPF, from a directly connected network advertised by OSPF, or from networks learned via another OSPF router. This will not affect the metric of the route.

It is the sum of the cost of outgoing interfaces along the path to the destination that determines the metric. The following shows some of the metric values assigned to particular interface speeds by default:

  • 128 Kbps | OSPF cost: 781
  • 1.544 Mbps | OSPF cost: 64
  • 10 Mbps | OSPF cost: 10
  • 100 Mbps or greater | OSPF cost: 1

This, of course, can be adjusted by changing the reference bandwidth. More about this can be found in the following lesson:

So the metric will not be affected by the fact that this particular route is statically assigned on one of the routers.

Are you possibly thinking about administrative distance? Statically defined routes have an administrative distance of 1, but only on the router they have been configured on. And why should the metric be 20? Can you elaborate?

I hope this has been helpful!

Laz