Routing Configuration 81Example 2: Assigning Administrative Preferences to Static RoutesBy default, static routes are assigned a preference value of 1. The following command changes thisdefault:console#Configip route distance 20exitWhen you configure a static route, you can assign a preference value to it. The preference overrides thesetting inherited as the default value for static routes.In this example, two static routes are defined to the same destination but with different next hops anddifferent preferences (25 and 30). The route with the higher preference will only be used when thepreferred route is unavailable:console#Configip route 10.25.67.0 255.255.255.0 10.25.22.2 metric 25ip route 10.25.67.0 255.255.255.0 10.25.21.0 metric 30exitSimilarly, you can create two default routes—one preferred and the other used as a backup. In thisexample, the preference values 1 and 10 are assigned:console#Configip route default 10.25.67.2 1ip route default 10.25.67.7 10exitUsing Equal Cost MultipathThe equal cost multipath (ECMP) feature allows a router to use more than one next hop to forwardpackets to a given destination prefix. It can be used to promote a more optimal use of network resourcesand bandwidth.A router that does not use ECMP forwards all packets to a given destination through a single next hop.This next hop may be chosen from among several next hops that provide equally good routes to thedestination. For example, in Figure 4-7, Router A sends all traffic to destinations in Network D throughnext hop NH1, even though the route through NH2 is equally good. Forwarding all traffic via NH1 maycause Link A to be overloaded while Link B is not used at all.