Configuring load sharing and redundancy

You can configure multiple IP static routes to the same destination to set up load sharing or backup routes.

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. The following figure depicts two routes with different metrics configured for the same destination.
Figure 16  Two static routes to same destination

To set up multiple routes for load sharing or redundancy, perform the following steps.

NOTE
You can also use administrative distance to set route priority; however, be sure to give a static route a lower administrative distance than other types of routes, unless you want other route types to be preferred over the static route.
  1. Enter 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.69/24 10.157.22.1
    device(config)# ip route 10.128.2.69/24 10.111.10.1
    device(config)# ip route 10.128.2.69/24 10.1.1.1
    
    This example creates three next-hop gateways for all destinations beginning with 10.128.2.69. Traffic will alternate 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 three routes, use different metrics for each of the three potential next hops.
    device(config)# ip route 10.128.2.69/24 10.157.22.1
    device(config)# ip route 10.128.2.69/24 10.111.10.1 2
    device(config)# ip route 10.128.2.69/24 10.1.1.1 3
    
    This example creates three alternate routes to all destinations beginning with 10.128.2.69. 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.