cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4416
Views
0
Helpful
1
Replies

How to change Cost/admin distance of static route

Sheraz_35
Level 1
Level 1

I have two static routes to the same destination network, they both have admin distance of 1 and cost of 0, what is the command to make one static route more preferred over another static route? 

Am I right in saying the cost will need to be modified and not the administrative distance as both routes are from the same routing source? And administrative distance only comes into play when you have routes from different routing sources? Thanks

1 Reply 1

Steve Fuller
Level 9
Level 9

Hi,

Correct. To acheive what you're asking simply add the metric to the end of one of the static routes. For example

ip route <destination> <mask> <next_hop_1>
ip route <destination> <mask> <next_hop_2> <metric>

The metric is a value between 1 and 255, with 1 being best and 255 being worst.

Regards

Review Cisco Networking products for a $25 gift card