Configuring a default static route

You can manually create a default static route that the router uses if there are no other default routes to a destination.

If the default route is a protocol route, that protocol needs to be enabled to resolve static routes. Use the ip route next-hop command to allow protocol resolution through the default route.

If the default route itself is a static route, you must configure the ip route next-hop-enable-default command to resolve other static routes through the default route. You may also configure recursive lookup to resolve the next hop.

Perform these steps to configure a default route.
  1. Enter global configuration mode.
    device# configure terminal
    
  2. Enter 0.0.0.0 0.0.0.0 as the destination route and network mask. On the same line, enter a valid next-hop address.
    device(config)# ip route 0.0.0.0 0.0.0.0 10.24.4.1
    The example creates a default route through IP address 10.24.4.1.
  3. (Optional) Enable the default network route for static route next-hop resolution.
    device(config)# ip route next-hop-enable-default
    
    Note: This command can be independently applied on a per-VRF basis.
  4. (Optional) Configure next-hop recursive lookup to resolve the next-hop gateway.
    device# configure terminal
    device(config)# ip route next-hop-recursion
    

The following example configures static routing next-hop recursion to three levels (the default). It configures the network default static route through next-hop IP address 10.24.4.1 and allows the default route to resolve other static routes.

Note: You can specify a level of recursion up to 10.

device# configure terminal
device(config)# ip route next-hop-recursion
device(config)# ip route 0.0.0.0 0.0.0.0 10.24.4.1
device(config)# ip route next-hop-enable-default