nexthop (OSPF)
Function
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.
Parameters
Parameter | Description | Value |
---|---|---|
ip-address | Indicates the IP address of next hop. | The value is in dotted decimal notation. |
weight 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. |
Usage Guidelines
If the number of equal-cost routes in a network is greater than the value set by using the maximum load-balancing command, if equal-cost routes need to be specified for load balancing, the nexthop command to used to increase the priorities of these routes.