- 456 -
Router OSPF Config Mode

8.3.2.22 auto-cost

By default, OSPF computes the link cost of each inte rface from the interface bandwidth. Faster l inks have
lower metrics,making them more attractive in route selection. The configuration parameters in the
auto-cost reference bandwidth and bandwidth commands give you control ov er the default link cost.
You can configure for OSPF an interface bandwidth that is independent of the actual link speed. A second
configuration parameter all ows you to control the ratio of interface band width to link co st. The l ink co st is
computed as the ratio of a referen ce bandwidth to the i nterface bandwidth (ref_ bw /interface bandwi dth),
where interface bandwidth is defined by the bandwidth command. Because the default reference
bandwidth is 100 Mbps, OSPF uses the same default link cost for all interfaces whose bandwidth is 100
Mbps or greater. Use the auto-cost command to change the refe rence bandwidth, specifying the
reference bandwidth in megabits per second (Mbps). The reference bandwidth range is 1-4294967 Mbps.
The different reference bandwidth can be independently configured for OSPFv2 and OSPFv3.
Use no auto-cost command to set the reference bandwidth to the default value.
Syntax
auto-cost reference-bandwidth <1 to 4294967>
no auto-cost reference-bandwidth
Default Setting
100Mbps
Command Mode
Router OSPF Config Mode

8.3.2.23 bandwidth

By default, OSPF computes the link cost of an interface as the ratio of the reference bandwidth to the
interface bandwidth. Reference bandwidth is specifie d with the auto-cost command. For the purpose of
the OSPF link cost calculat ion, use the bandwidth command to specify the interface bandwidth. The
bandwidth is specified i n kilobits p er second. If no b an dwidth i s conf igure d, the ba ndwi dth defaults to the
actual interface bandwidth for port-based routing interfaces and to 10 Mbps for VLAN routin g interfaces.
This command does not affect the actu al speed of an interface. Use no bandwidth command to set the
interface bandwidth to its default value
Syntax
bandwidth <1-100000 00>
no bandwidth
Default Setting
Actual interface bandwidth
Command Mode