DGS-6604
ip ospf cost
CLI Reference Guide
288
ip ospf cost
Use this command to explicitly specify the cost of sending a packet on an
interface. Use the no form of the command to remove the assignment.
ip ospf cost
COST
no ip ospf cost
Default
Cost is not configured
Command Mode
Interface configuration
Usage Guideline
The interface cost indicates the overhead required to send packets across a
certain interface. This cost is advertised as the link cost in the router link
advertisement. The cost is inversely proportional to the bandwidth of an
interface. The cost can be either manually assigned or be automatically
determined.
By default, the cost of an interface is calculated based on the bandwidth
(10E8 / bandwidth); use the
ip ospf cost
command to set the cost manually.
If the cost is explicitly assigned, the assigned cost will override the auto-
determined cost. Otherwise, the auto-determined cost will be adopted.
Example
The following example shows sets the interface cost value to 10 on interface
VLAN 1.
Verify the settings by entering the
show ip ospf interface
command.
Syntax Description
COST
Specifies the value of the link-state metric. The range is 1 to 65535.
Switch# configure terminal
Switch(config)# interface vlan1
Switch(config-if)# ip ospf cost 10