DGS-6604
ip ospf cost
ip ospf cost COST
no ip ospf cost
Syntax Description
COST
Default
Command Mode
Usage Guideline
Example
Switch# configure terminal
Switch(config)# interface vlan1
Switch(config-if)# ip ospf cost 10
CLI Reference Guide
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.
Specifies the value of the link-state metric. The range is 1 to 65535.
Cost is not configured
Interface configuration
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.
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.
ip ospf cost
278