Adding Metrics to a Static Route
You can influence route preference by adding a cost metric or an administrative distance
to a static route.
- Enter global configuration mode.
- Designate the route destination and next hop, and add a route priority parameter.
This example configures a static route with an administrative distance of 10.Note: The device replaces a static route if it receives a route to the same destination with a lower administrative distance.This example configures a static route with a metric of 2.
The following example configures a static route to destinations with an IP address beginning with 10.0.0.0. The route uses IP address 10.111.10.1 as the next hop. The static route is assigned an administrative distance of 3.
device# configure terminal device(config)# ip route 10.0.0.0/24 10.111.10.1 distance 3