The nexthop weight command sets a priority for equal-cost routes. After OSPF calculates the equal-cost routes, the next hop is chosen from these equal-cost routes based on the priority value. The smaller the value, the higher the priority.
The undo nexthop command cancels the priority of equal-cost routes.
By default, the value is 255. Equal-cost routes load-balance traffic.