C613-50631-01 Rev A Command Reference for IE340 Series 1141
AlliedWare Plus™ Operating System - Version 5.5.3-0.x
OSPF COMMANDS
IP
OSPF COST
ip ospf cost
Overview This command explicitly specifies the cost of the link-state metric in a router-LSA.
The no variant of this command resets the interface cost to the default.
Syntax
ip ospf [<ip-address>] cost <1-65535>
no ip ospf [<ip-address>] cost
Default No static value. The OSPF cost is automatically calculated by using the auto-cost
reference bandwidth command.
Mode Interface Configuration for a VLAN interface.
Usage notes This command explicitly sets a user specified cost of sending packets out the
interface. Using this command overrides the cost value calculated automatically
with the auto-cost reference bandwidth feature.
The interface cost indicates the overhead required to send packets across a certain
interface. This cost is stated in the Router-LSA’s link. Typically, the cost is inversely
proportional to the bandwidth of an interface. By default, the cost of an interface
is calculated according to the following formula:
• reference bandwidth/interface bandwidth
Use the ip ospf cost command to set the interface cost manually.
Example To set the OSPF cost to 10 on VLAN interface vlan25 for IP address 10.10.10.50, use
the commands:
awplus# configure terminal
awplus(config)# interface vlan25
awplus(config-if)# ip ospf 10.10.10.50 cost 10
Related
commands
show ip ospf interface
auto-cost reference bandwidth
Parameter Description
<ip-address> The IPv4 address of the interface, in dotted decimal notation.
<1-65535> The link-state metric.