< Home

nexthop (OSPFv3)

Function

The nexthop command sets the preference for equal-cost routes.

The undo nexthop command cancels the preference of equal-cost routes.

By default, the preference is not set for equal-cost routes. That is, equal-cost routes forward packets at the same time for load balancing.

Format

nexthop router-id interface-type interface-number weight value

undo nexthop router-id interface-type interface-number

Parameters

Parameter Description Value
router-id Specifies the router ID of a neighbor. It is in dotted decimal notation.
interface-type interface-number Specifies the type and number of an interface. -
weight value Specifies the weight of the next hop. The smaller the weight is, the higher the route preference is. It is an integer ranging from 1 to 254.

Views

OSPFv3 view

Default Level

2: Configuration level

Usage Guidelines

After OSPFv3 calculates equal-cost routes, you can run the nexthop command to select the route with the highest preference from the equal-cost routes as the next hop. OSPFv3 selects a next hop from these equal-cost routes according to the weight. The smaller the weight is, the higher the route preference is.

Example

# Set the preference for equal-cost routes in OSPFv3.

<HUAWEI> system-view
[HUAWEI] interface vlanif 10
[HUAWEI-Vlanif10] quit
[HUAWEI] ospfv3 1
[HUAWEI-ospfv3-1] nexthop 10.2.2.2 vlanif 10 weight 240
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >