4-50
[Sysname-ospf-1] area 0
[Sysname-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.255.255
[Sysname] interface vlan-interface 11
[Sysname-Vlan-interface11] ospf bfd enable
ospf cost
Syntax
ospf cost value
undo ospf cost
View
Interface view
Default Level
2: System level
Parameters
value
: OSPF cost, in the range 0 to 65535 for a loopback interface and 1 to 65535 for other interfaces.
Description
Use the
ospf cost
command to set an OSPF cost for the interface.
Use the
undo ospf cost
command to restore the default.
By default, the OSPF cost for a loopback interface is 0, and an OSPF interface calculates its cost with
the formula: interface default OSPF cost=100 Mbps/interface bandwidth(Mbps). Default OSPF costs
of some interfaces are:
z
1785 for the 56 kbps serial interface
z
1562 for the 64 kbps serial interface
z
48 for the E1 (2.048 Mbps) interface
z
1 for the Ethernet (100 Mbps) interface
You can use the
ospf cost
command to set an OSPF cost for an interface manually.
This configuration is not supported on null interfaces.
Examples
# Set the OSPF cost for the interface to 65.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf cost 65