R3721-F3210-F3171-HP High-End Firewalls Network Management Command Reference-6PW101

327
Examples
# Enable OSPF and BFD on GigabitEthernet 0/1.
<Sysname> system-view
[Sysname] ospf
[Sysname-ospf-1] area 0
[Sysname-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.255.255
[Sysname-ospf-1-area-0.0.0.0] interface gigabitethernet 0/1
[Sysname-GigabitEthernet 0/1] 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 of 0 to 65535 for a loopback interface and 1 to 65535 for other
interfaces.
Description
Use ospf cost to set an OSPF cost for the interface.
Use undo ospf cost to restore the default.
By default, the cost for a loopback interface is 0, and is computed according to the bandwidth for other
interfaces with the formula: Interface OSPF cost = Bandwidth reference value (100 Mbps) รท Interface
bandwidth (Mbps).
If the calculated cost is greater than 65535, the value of 65535 is used; if the calculated cost is smaller
than 1, the value of 1 is used.
Examples
# Set the OSPF cost for the interface to 65.
<Sysname> system-view
[Sysname] interface gigabitethernet 0/1
[Sysname-GigabitEthernet0/1] ospf cost 65
ospf dr-priority
Syntax
ospf dr-priority priority
undo ospf dr-priority
View
Interface view