Command:

auto-cost


Mode:

Router(config-router)#


Syntax:

auto-cost reference-bandwidth ref-bw
no auto-cost reference-bandwidth

 

Syntax Description:

reference-bandwidth ref-bw

Rate in Mbps (bandwidth). The range is from 1 to 4294967; the default is 100.

 

Command Description:

To control how OSPF calculates default metrics for the interface, use the auto-cost command in router configuration mode. To assign cost based only on the interface type, use the no form of this command.

In Cisco IOS Release 10.3 and later releases, by default OSPF will calculate the OSPF metric for an interface according to the bandwidth of the interface. For example, a 64K link will get a metric of 1562, and a T1 link will have a metric of 64.

The OSPF metric is calculated as the ref-bw value divided by the bandwidth, with ref-bw equal to 108 by default, and bandwidth determined by the bandwidth command. The calculation gives FDDI a metric of 1.

If you have multiple links with high bandwidth (such as FDDI or ATM), you might want to use a larger number to differentiate the cost on those links.

The value set by the ip ospf cost command overrides the cost resulting from the auto-cost command.


Example:

The following example changes the cost of the FDDI link to 10, while the gigabit Ethernet link remains at a cost of 1. Thus, the link costs are differentiated:

Router(config-router)#auto-cost reference-bandwidth 1000


Misconceptions:

None


Related Commands:

ip ospf cost

� Cisco Systems, Inc. 2001, 2002, 2003
World Wide Education

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)