Configuring a default static route
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.
- Enter global configuration mode.
- 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.
The example creates a default route through IP address 10.24.4.1.
- (Optional) Enable the default network route for static route next-hop resolution.
Note: This command can be independently applied on a per-VRF basis.
- (Optional) Configure next-hop recursive lookup to resolve the next-hop gateway.
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.
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