You can influence route preference by adding a cost metric or an administrative distance to a static route.
device# configure terminal
Option | Description |
---|---|
Cost metric | The value is compared to the metric for other static routes in the IPv6 route table to the same destination. Two or more routes to the same destination with the same metric load share traffic to the destination. The value may range from 1 through 16. The default is 1. A route with a cost of 16 is considered unreachable. |
Administrative distance | This value is compared to the administrative distance of all routes to the same destination. Static routes by default take precedence over learned protocol routes. However, to give a static route a lower priority than a dynamic route, give the static route the higher administrative distance. The value is preceded by the keyword distance and can range from 1 to 254. The default is 1. A value of 255 is considered unreachable. |
device(config)# ipv6 route 2001:DB8::0/64 2001:DB8:2343:0:ee44::1 2
This example configures a static route with an administrative distance of 3.
device(config)# ipv6 route 2001:DB8::0/64 2001:DB8:0:ee44::1 distance 3
This example configures a static route with an administrative distance of 254.
device(config)# ipv6 route 2001:DB8::0/64 2001:DB8:2343:0:ee44::1 distance 254