The nexthop command sets the preference for the equal-cost routes. After OSPF calculates the equal-cost routes, the next hop is chosen from these equal-cost routes based on the value of weight. The smaller the value is, the higher the preference is.
The undo nexthop command cancels the preference of these equal-cost routes.
By default, the value of weight is 255. Equal-cost routes have no preference, and they forward packets at the same time. Load balancing is performed among them.
| Parameter | Description | Value |
|---|---|---|
| ip-address | Indicates the IP address of next hop. | It is in the decimal notation format. |
| value | Indicates the weight of the next hop. The smaller the value is, the higher the preference of the route is. | It is an integer that ranges from 1 to 254. By default, it is 255. |
When the number of equal-cost routes on the network is larger than the number of the routes specified in the maximum load-balancing command, set the preference of specified valid routes to high running the nexthop command if you need to specify valid routes for load balancing.