180
Cisco Nexus 3548 Switch NX-OS Unicast Routing Command Reference
OL-27852-01
Chapter Unicast Routing Commands
ip ospf cost
ip ospf cost
To specify the cost of sending a packet on an interface, use the ip ospf cost command. To reset the path
cost to the default, use the no form of this command.
ip ospf cost interface-cost
no ip ospf cost interface-cost
Syntax Description
Command Default Calculates the cost based on the reference bandwidth divided by the configured interface bandwidth. You
can configure the reference bandwidth or it defaults to 40 Gb/s.
Command Modes Interface configuration mode
Command History
Usage Guidelines This command overrides any settings for the reference bandwidth that you set using the
reference-bandwidth command in router configuration mode.
If this command is not used, the link cost is calculated using the following formula:
link cost = reference bandwidth / interface bandwidth
This command requires the LAN Base Services license.
Examples This example shows how to configure the interface cost value to 65:
switch# configure terminal
switch(config)# interface ethernet 1/2
switch(config-if)# no switchport
switch(config-if)# ip ospf cost 65
switch(config-if)#
Related Commands
interface-cost Unsigned integer value expressed as the link-state metric. The range
is from 1 to 65535.
Release Modification
5.0(3)A1(1) This command was introduced.
Command Description
reference-bandwidth Specifies the reference bandwidth that OSPF uses to calculate the link cost.