Resolving the next hop through a protocol

You can use routes from a specific protocol to resolve a configured static route.

Perform these steps to resolve the next hop for a static route using learned routes from a protocol.
NOTE
Connected routes are always used to resolve static routes.
  1. Enter global configuration mode.
    device# configure terminal
    
  2. Enable resolution through the desired protocol.
    These protocol options are available:
    • bgp
    • ospf
    • rip
    device(config)# ip route next-hop ospf
    This example enables route resolution through OSPF.
    device(config)# ip route next-hop bgp
    This example resolves static routes through BGP. Both iBGP and eBGP routes are used to resolve the routes.
    device(config)# ip route next-hop rip
    This example resolves static routes through RIP.