Showing results for 
Search instead for 
Did you mean: 
Join Customer Connection to register!

Is it possible in IOS to have two static routes for the same subnet, one a higher priority and "failover" between the 2?

Hi All

Is it possible in IOS to have for a particular subnet:

a) Two static routes?

b) Make one static route a higher priority than the other?

c) If one static router "goes down", failover to the lower priority static route?

We have a l2tp/vpdn connection to a supplier which can be accessed via two vlans/routes. I would like to make one route the preferred one but the "route" to failover if the preferred route goes down.

Again, many thanks in advance for all responses!




I tried this solution and it works! My question is what if the switch is busy and we lose 2 pings? Will it switch over to the other route? If so, how can I prevent this?

Hi Alain

I don't know what the correct answer to this. If I may explain.

Our routers have interfaces on 2 vlans provided by external providers:



The  other side of the vlans (X.X.X.2, Y.Y.Y.2) are located on the  infrastructure of a 3rd external provider who provides adsl lines.  Through this 3rd external provider, we are able to provide "white  labelled" adsl lines to our clients.

Our routers are LNS whereas the 3rd external provider has two LAC routers (M.M.M.M & N.N.N.N).

Therefore, we currently have the following static route on one router:

ip route M.M.M.M X.X.X.2

Which I would like to put as:

ip route M.M.M.M X.X.X.2 track 1

ip route N.N.N.N Y.Y.Y.2 10

Therefore,  as you may guess, the query you  responded was about if X.X.X.2 went  down and what would happen to the static route in the routing table. My  guess was that X.X.X.1 was still up and therefore the static route would  stay in the routing table despite X.X.X.2 not being available. You  responded as below:

it will depend which type of link tou have between your router and the next-hop.

if   it is a point-to-point( PPP,HDLC, point-to-point Frame-relay   subinterface) then if the other end goes down, yours will too and so  you  don't need tracking.

if it is a multipoint(  Frame-relay,  ethernet) and you have a device in between your ends then  when one end  goes down the other will still stay up and that's where  tracking comes  into place.

In  response to this helpful response, X.X.X.0 is ethernet whereas the vpdn  is PPP. My guess would be that if X.X.X.0 went down, the L2TP tunnel  would drop and therefore the PPP vpdn's would drop also - but I would be  very interested in your opinion. We do seem to have disruptions on the  traces we have to the adsl lines when I believe we get a disruption on  vlan X.X.X.0 but when I look on the router (show vpdn), the vpdn  sessions seem to have stayed up e.g. have been up for 4 weeks.  Therefore, I'm not 100% sure what I'm seeing.

(I say believe as we don't have monitoring directly on the interfaces via snmp)



LondonCisco wrote:

Hi Darren

Thanks, that is very helpful. If ok with you, could we explore how this affects our current setup at work?

If I understand rightly from your example below:

ip route

The static route will only be removed from the routing table if the interface goes down (either physically or administratively). Therefore, if any link between (and including) and (say) went down, the static route would not be removed and would not be available.

The reason that I want to understand this as best we can, is that we have 2 externally provided vlans to a common service supplier (LAC/LNS fyi). I would like to failover between the 2 vlans if the route to LAC service fails i.e. the router cannot reach the LAC service.

My original thought was 2 routes as follows:

ip route X.X.X.X Y.Y.Y.2 1

ip route X.X.X.X Z.Z.Z.2  10

But if Y.Y.Y.2 went down, Y.Y.Y.1 would still be up on our router and therefore the router would still be using the Y.Y.Y.2 static route, despite traffic failing to get to X.X.X.X.

Is this correct?

And then, if I am correct, the obvious need for ip sla tracking as this is sending echo requests to the final destinatinon i.e. X.X.X.X - monitoring whether this reachable or not!




You're 100% correct  - the scenario I described will only drop the static route if the border interface goes down - *not* if the next hop goes down.

As suggested by Naidu, you'd need to run a SLA track to ensure that you're tracking the reachability, not just the interface status - add a reachability SLA to an IP address on the other end of the link, and then your weighted static route should take over if the reachability fails to your speifications.

Of course, you could just put in a dynamic routing protocol (OSPF, for example) and let it figure out the paths, since OSPF monitors link state, and if one path drops the other will automatically take over - might be a bit more of a pain to setup (I suspect you'll need to use virtual links on your remote ends to achieve this), but once it's working you don;t need to worry about SLA monitoring.


Hi John,

Cisco IP Sla feature supports from IOS Release 12.3(14)T or a later.
Please see the below table for your reference.

You can also use below commands to check the IP SLA config and status on your router.

#sh ip sla configuration
#sh ip sla history
#sh ip sla statistics

Please rate the helpfull posts.