ip ospf cost

Configures cost for a specific interface.

Syntax

ip ospf cost value
no ip ospf cost

Command Default

Cost value is 1.

Parameters

value
Cost value. Valid values range from 1 through 65535. The default is 1.

Modes

Interface subtype configuration mode

Usage Guidelines

Use this command to set or reset the OSPFv2 cost on the interface. If the cost is not configured with this command, OSPFv2 calculates the value from the reference and interface bandwidths.

The no form of the command disables the configured cost.

Examples

The following example sets the cost to 520 on a specific Loopback interface.

device# configure terminal
device(config)# interface loopback 1
device(config-Loopback-1)# ip ospf cost 520