ip route
ip route 2


show ip route
Routing entry for
  Known via "static", distance 2, metric 0, via me0_link1

Routing entry for
  Known via "static", distance 1, metric 0, best
  *, via me0_link2

as you see I set link2 as higher preference on static route, but when link2 failed, does router smart enough to adjust route to link1?

  • Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Aug 7 '17 at 18:46

Yes. If an interface goes down, then any route in the routing table pointing to that interface is withdrawn from the routing table. The route will be reestablished in the routing table when the interface comes back up.

The situation you describe is called a floating static route. This is a useful configuration for some circumstances.

  • How can we achieve this : when me0_link1 is down, traffic should go via me0_link2 ? Does it work in mtik router ? – Shyamkkhadka Oct 26 '18 at 5:57
  • 1
    I don't know enough about MikroTik, but, unfortunately, MikroTik doesn't offer optional paid support, so it is off-topic here. – Ron Maupin Oct 26 '18 at 5:59
  • What about cisco routers ? Does it work or we need to configure additional steps ? – Shyamkkhadka Oct 26 '18 at 6:02
  • 1
    Yes, it works for Cisco routers. Simply put in two static routes for the same route, and add a different AD, like it has in the question. – Ron Maupin Oct 26 '18 at 6:04

Assuming Cisco, the answer is no. It will keep sending to You will need to configure tracking with an ip sla to failover properly.

  • how does ip sla works? mind to explain in detail please? – Thomas G. Lau Jun 23 '17 at 8:26
  • 1. Create ip sla object with icmp-echo 2. Create track object and associate ip sla to the track object 3. Add track command to end of static route, which will decrement the administrative distance when the ip sla is down. If you wan to just monitor if the interface goes down you can also track the line protocol of an interface; this is configured within the track object. Cisco has published a lot of great documents for the configuration details. – esafresa Jun 23 '17 at 17:46
  • Just tracking line protocol might work better for you, which would look something like: track 1 interface me0_link2 line-protocol – esafresa Jun 23 '17 at 17:52

If the next-hop for link2 ( goes down (is no longer in the routing table), then the route will no longer be valid and will also be removed. Link1 will now be the only valid route and become the best route to

If the next-hop ( is still available after the failure, the route will not be lost and will still be best. With some vendors, you can also specify an outgoing interface in addition to a next hop within a static route. If the outgoing interface is lost, the route will be removed, even if the next-hop is still active. Format would be similar to the following

ip route me0_link2

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.