The ospfv3 cost command sets a cost for an OSPFv3 interface.
The undo ospfv3 cost command restores the default cost.
By default, the cost of an OSPFv3 interface is calculated based on the interface bandwidth.
100GE interface view, 10GE interface view, 25GE sub-interface view, 25GE interface view, 400GE interface view, 40GE interface view, 50GE sub-interface view, 50GE interface view, Eth-Trunk interface view, FlexE interface view, GE optical interface view, GE electrical interface view, Global VE sub-interface view, VBDIF interface view, VE sub-interface view, VLANIF interface view
Usage Scenario
OSPFv3 can automatically calculate the link cost for an interface based on the interface bandwidth. You can also set the link cost for the interface using the ospfv3 cost commands.
Prerequisites
OSPFv3 has been enabled using the ospfv3 area command in the interface view.
Configuration Impact
The ospfv3 cost command cannot be run on null interfaces.
Precautions
If no cost is set for an OSPFv3 interface using the ospfv3 cost command, OSPFv3 automatically calculates its cost based on the interface bandwidth. The calculation formula is as follows: Cost of the interface = Bandwidth reference value/Interface bandwidth. The integer of the calculated result is the cost of the interface. If the calculated result is smaller than 1, the cost is 1. Changing the bandwidth reference value can change the cost of an interface.
<HUAWEI> system-view [~HUAWEI] ospfv3 1 [*HUAWEI-ospfv3-1] quit [*HUAWEI] interface GigabitEthernet 0/1/0 [*HUAWEI-GigabitEthernet0/1/0] ipv6 enable [*HUAWEI-GigabitEthernet0/1/0] ospfv3 1 area 0 instance 1 [*HUAWEI-GigabitEthernet0/1/0] ospfv3 cost 33 instance 1