The nexthop command sets a preference for 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 weights. A smaller value indicates a higher preference.
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 the next hop. | The value is in dotted decimal notation. |
weight value | Indicates the weight of the next hop. A smaller value indicates a higher preference. | It is an integer that ranges from 1 to 254. |