ip ospf cost
Syntax
ip ospf cost <INTERFACE-COST>
no ip ospf cost
Description
Sets the cost (metric) associated with a particular interface. The interface cost is used as a parameter to calculate the best routes.
The
no
form of this command sets the cost (metric) associated with a particular interface to the default cost 1.
NOTE:
If the user does not change the default previous to upgrading the image to version 10.01, the default (auto cost) is applied on the interface. There is also no change in the
show running
representation.
Command context
config-if
Parameters
<INTERFACE-COST>
Specifies the interface cost value. Default: 1. Range: 1-65535.
Authority
Administrators
Examples
Setting OSPF interface cost
switch# configure terminal switch(config)# interface 1/1/1 switch(config-if)# ip ospf cost 100
Setting the OSPF interface cost to default
switch# configure terminal switch(config)# interface 1/1/1 switch(config-if)# no ip ospf cost