I have cisco 3750 with three routed interfaces. IntA have an auto-assing cost of 1, IntB have an auto-assing cost of 10 and IntC have a manually-assing cost of 100. If IntB goes protocol down, I will like the device to automaticlly increment/decrement the cost of IntA and IntC, in such a way that IntC get the routing path preference.

  • The routing path preference is based on a cumulative cost for a given prefix through the whole network. Changing the local cost on an interface may only be a tiny part of the cost assigned to a prefix path.
    – Ron Maupin
    Nov 7 '14 at 19:10
  • Is it possible to get a diagram of you setup? Typically you don't change the interface cost when another interface goes down, instead you properly set the cost on the interfaces when you first set them up. Nov 7 '14 at 20:02
  • Ron if I understand you correctly then manually setting the ospf cost of an interface is not locally significant on the router?
    – 3D1L
    Nov 7 '14 at 23:08
  • Tim - To simplify things imagine router A connected to router B with 3 links. The cost values that I provided are the correct ones (1, 10, 100), while all 3 links are up. If IntA goes down IntB must take precedence over IntC but if IntB goes down IntC must take precedence over IntA. Funny thing is that IntC does have a better routing path than IntA and IntB from RA to RB but sadly I'm obliged to do the routing the way I'm describing.
    – 3D1L
    Nov 7 '14 at 23:22
  • Depending on the code version you could try and use EEM and static routes for this. It wouldn't be pretty or easy to troubleshoot, but it could be done.
    – cpt_fink
    Nov 8 '14 at 1:41

The cost on the interface may only be a small part of the total cost for using the interface. The cost to a destination is cumulative, and the local costs may only be a small part of the total cost. You simply cannot tell which interface is preferred for a given destination just by the local cost on an interface. For example, the interface with the cost of 100 may be preferred if the total cost to the destination is smaller than the total cost to the destination using the interface with a cost of 1.

In any case, you would need to use something like an EEM script to change the cost of an interface when a different interface goes down, but you really cannot tell from that which interface will be preferred for a given destination without looking at the total cost for each path to the destination. You can check that in the OSPF database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.