Configure IPv4 Static Routes for Load Sharing and Redundancy

You can configure multiple static routes to the same destination as load sharing or backup routes.

About this task

If you configure more than one static route to the same destination with different next-hop gateways but the same metrics, the router load balances among the routes using a basic round-robin method.

If you configure multiple static IP routes to the same destination with different next-hop gateways and different metrics, the router always uses the route with the lowest metric. If this route becomes unavailable, the router fails over to the static route with the next-lowest metric.

Click to expand in new window
Two static routes to same destination
Note

Note

You can also use administrative distance to set route priority. Assign the static route a lower administrative distance than other types of routes, unless you want the other route types to be preferred over the static route.

Procedure

  1. Access global configuration mode.
    device# configure terminal
    
  2. Enter multiple routes to the same destination using different next hops.
    device(config)# ip route 10.128.2.0/24 10.157.22.1
    device(config)# ip route 10.128.2.0/24 10.111.10.1
    device(config)# ip route 10.128.2.0/24 10.1.1.1
    
    This example creates three next-hop gateways to the destination. Traffic alternates among the three paths through next-hop 10.157.22.1, next-hop 10.111.10.1, and next hop 10.1.1.1.
  3. To prioritize the routes, use different metrics for each possible next hop.
    device(config)# ip route 10.128.2.0/24 10.157.22.1
    device(config)# ip route 10.128.2.0/24 10.111.10.1 2
    device(config)# ip route 10.128.2.0/24 10.1.1.1 3
    
    This example creates three alternate routes to the destination. The primary next hop is 10.157.22.1, which has the default metric of 1 (the default metric is not entered in the CLI). If this path is not available, traffic is directed to 10.111.10.1, which has the next lowest metric of 2. If the second path fails, traffic is directed to 10.1.1.1, which has a metric of 3.