< Home

ospfv3 cost

Function

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: Interface cost = Bandwidth reference value/Interface bandwidth where, the bandwidth reference value can be changed using the bandwidth-reference command.

Format

ospfv3 cost cost [ instance instance-id ]

undo ospfv3 cost [ cost ] [ instance instance-id ]

Parameters

Parameter 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.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Before running this command on an interface, run the ospfv3 area command on the interface to enable OSPFv3.

Example

# 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
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >