Chapter 5. Setting the Default Metric for Redistributed Protocols

default-metric cost

Syntax Description:

  • cost—External cost assigned to routes redistributed into OSPF. The range of values is 1 to 4,294,967,295. The default metric for redistributed BGP routes is 1. The default metric for all other redistributed protocols is 20.

Purpose: Used to assign a cost to routes redistributed into OSPF that have not been assigned a metric by the redistribute command. Using the default-metric command will not affect routes that have been assigned a metric by the redistribute command.

Initial Cisco IOS Software Release: 10.0

Configuration Example: Setting the Default Cost for Redistributed Routes

In Figure 5-1, Router B is receiving the routes 3.3.3.0/24 and 10.1.1.4/30 ...

Get Cisco OSPF Command and Configuration Handbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.