The ospfv3 cost command sets the cost of the interface in different instances.
The undo ospfv3 cost command restores the default cost of the interface in different instances.
By default, the cost of an interface running OSPF is calculated using the following formula: bandwidth-reference command.
where, the bandwidth reference value can be changed using theParameter | Description | Value |
---|---|---|
cost | Specifies the cost for running OSPFv3. | The value is an integer ranging from 1 to 65535. |
instance instance-id | Specifies the instance ID of the interface. | The value is an integer ranging from 0 to 255. The default value is 0. |
Before running this command on an interface, run the ospfv3 area command on the interface to enable OSPFv3.
# Set the cost for public instance to run OSPFv3 on VLANIF 10 to 33.
<HUAWEI> system-view [HUAWEI] ipv6 [HUAWEI] ospfv3 [HUAWEI-ospfv3-1] router-id 10.1.1.1 [HUAWEI-ospfv3-1] quit [HUAWEI] interface vlanif 10 [HUAWEI-Vlanif10] ipv6 enable [HUAWEI-Vlanif10] ospfv3 1 area 1 [HUAWEI-Vlanif10] ospfv3 cost 33
# Specify the cost for public instance to run OSPFv3 on GE0/0/1.
<HUAWEI> system-view [HUAWEI] ipv6 [HUAWEI] ospfv3 [HUAWEI-ospfv3-1] router-id 10.1.1.1 [HUAWEI-ospfv3-1] quit [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo portswitch [HUAWEI-GigabitEthernet0/0/1] ipv6 enable [HUAWEI-GigabitEthernet0/0/1] ospfv3 1 area 1 [HUAWEI-GigabitEthernet0/0/1] ospfv3 cost 33