Set Next-Hop IP Address
The infrastructure provided by CEF or process switching performs the recursion to the next-hop IP address. The configuration sequence, which affects routing, is as follows:
1. Next-hop
2. Next-hop recursive
3. Interface
4. Default next-hop
5. Default interface
If both a next-hop and a recursive next-hop IP address are present in the same route-map entry, the next-hop is used. If the next-hop is not available, the recursive next-hop is used. If the recursive next-hop is not available and no other IP address is present, the packet is routed using the default routing table; it is not dropped. If the packet is supposed to be dropped, use the set ip next-hop command with the recursive keyword followed by a set interface null0 configuration.
Perform this task to set the IP address for the recursive next-hop router.
Prerequisites
If loadsharing is required, CEF loadsharing should be configured for per-packet or per-destination loadsharing. Loadbalancing should be done over all equal-cost routes to the subnet that have been configured by the set ip next-hop recursive command.
This functionality should be available in centralized and distributed systems.
Restrictions
Only one recursive next-hop IP address is supported per route-map entry.
SUMMARY STEPS
1. enable
2. configure terminal
3. access-list access-list-number {deny | permit} source [source-wildcard] [log]
4. route-map map-tag
5. set ip next-hop ip-address
6. set ip next-hop {ip-address [...ip-address] | recursive ip-address}
7. match ip address access-list-number
8. end
https://www.cisco.com/en/US/docs/ios/iproute_pi/configuration/guide/iri_prb_rec_next_hop_external_docbase_0900e4b1810fe58b_4container_external_docbase_0900e4b181525fed.html