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-vlan
Parameters
<INTERFACE-COST>
Specifies the interface cost value. Default: 1. Range: 1-65535.
Authority
Administrators or local user group members with execution rights for this command.
Examples
Setting OSPF interface cost
switch(config)# interface vlan 1 switch(config-if-vlan)# ip ospf cost 100
Setting the OSPF interface cost to default
switch(config)# interface vlan 1 switch(config-if-vlan)# no ip ospf cost