ip ospf cost

Last Updated : Nov 06, 2012 |
Statically configures the interface cost metric. Use no ip ospf cost to return to dynamic calculation of the cost.
Prolog information

Syntax

ip ospf cost cost
no ip ospf cost

Parameters

Parameter
Description
Possible Values
Default Value
cost
The price assigned to each interface for the purpose of determining the shortest path
1-65535
1

User level

read-write

Context

interface:FastEthernet (L2-L3, L3, PPP L2-L3, PPP L3), VLAN (L2-L3, L3), Loopback (L2-L3, L3), Tunnel (L2-L3, L3), Dialer (L2-L3, L3)

Example

To set the cost metric for the VLAN 1 interface to 10:
Gxxx-001(if:Vlan 1)# ip ospf cost 10