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.
nexthop router-id interface-type interface-number weight value
undo nexthop router-id interface-type interface-number
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. |
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.