R3303-HP HSR6800 Routers Layer 3 - IP Routing Command Reference

116
Syntax
ospf cost value
undo ospf cost
Default
The default cost depends on the interface type. The cost is 0 for a loopback interface and the costs for
other interfaces are computed according to the bandwidth with the formula: Interface OSPF cost = 100
Mbps ÷ Interface bandwidth (Mbps).
Views
Interface view
Default command level
2: System level
Parameters
value: Specifies an OSPF cost in the range of 0 to 65535 for a loopback interface and 1 to 65535 for
other interfaces.
Usage guidelines
According to the formula interface OSPF cost = 100 Mbps ÷ Interface bandwidth (Mbps), default costs
for various interfaces are as follows:
1785 for 56 kbps serial interfaces.
1562 for 64 kbps serial interfaces.
48 for E1 (2.048 Mbps).
1 for Ethernet (100 Mbps).
Examples
# Set the OSPF cost for the interface to 65.
<Sysname> system-view
[Sysname] interface GigabitEthernet 2/0/0
[Sysname-GigabitEthernet2/0/0] ospf cost 65
ospf dr-priority
Use ospf dr-priority to set the priority for DR/BDR election on an interface.
Use undo ospf dr-priority to restore the default value.
Syntax
ospf dr-priority priority
undo ospf dr-priority
Default
The priority is 1.
Views
Interface view