Showing results for 
Search instead for 
Did you mean: 



Hello All,

Needing some assistance with an IP SLA setup that I'm having some issues wrapping my head around.     I have a router that has two connections to a remote site router.    One connection from HQ-Rtr has a serial connection to an MPLS cloud using BGP as it's routing protocol.   The other connection is an Ethernet connection to an ASA (which uses an IPSEC tunnel to the remote router).    Here is what I'd like to do.   I'd like to use the MPLS cloud connection as the primary connection.  Once it fails, I would want the Ethernet connection to the ASA to kick in.   However, I would like it to fall BACK over to the MPLS cloud connection in the event that the Serial connection comes back online.    


With that said, I know I'll have to use IP SLA to make this work but I'm running into an issue getting it to fall BACK to the primary route.  I'm not sure why.     I'm basically doing the following:

       track 1 ip sla 1 reachability

       ip sla auto discovery
           ip sla 1
                icmp-echo a.a.a.a source-interface Serial1/0
                request-data-size 32
       ip sla schedule 1 life forever start-time now


       ip route  x.x.x.x track 1  (learned via bgp from cloud, metric 20)

       ip route  y.y.y.y 25


So, to me.....this says as long as I can ping a.a.a.a from source int s1/0, the route for network should go to x.x.x.x.   Then once it fails, it falls over to y.y.y.y.   It requires the 25 cost so that it doesn't take precedence over the x.x.x.x route.    Am I seeing this correctly so far?   Then once x.x.x.x comes back online, it SHOULD fall back over to that one being it has the lower cost route of 20.   Is this right?   


Well regardless it's not working quite as expected so someone had mentioned something about setting another IP SLA up with a 'Boolean and' statement.   I'm not 100% sure about this so if anyone can explain this to me and how it would work in the above scenario or why it would be done, then that would help also.   Here is what they suggested:

      track 2 list boolean and
         object 1 not

and to change my routes to look like the following:

       ------Remove route for x.x.x.x all-together-------

       ip route  y.y.y.y track 2

I'm guessing (and I do mean guessing) this says to monitor track 1 and if track 1 is NOT true (false) then apply the route for y.y.y.y? 

Can someone take a look and help me with the concept, I guess maybe I'm in left field here but I'm struggling a bit on making this work.  

Thanks in advance,


1 Accepted Solution

Accepted Solutions

Jon Marshall
VIP Community Legend VIP Community Legend
VIP Community Legend

Okay I think the issue is this.

You are redistributing statics into BGP. So what happens is that when your MPLS link is up you receive the loopback via BGP and it has an AD of 20 so goes into the IP routing table because it has a better AD.

When the MPLS link fails your static route with an AD of 200 is placed into the IP routing table and redistributed into BGP.

When the MPLS link comes back up your router receives the same route from the PE router.

Now your MPLS router has two routes in BGP for the same destination and prefix.

The one from the PE has a weight of 0 but the static that was redistributed locally has a weight of 32768 because that is the weight assigned to locally generated routes.

The higher the weight the better so BGP sticks with the route via the ASA.

The usual solution to this is to modify the routes received from the PE so they have a weight > 32768 and so once the MPLS link comes back up they are preferred and installed in the IP routing table.

You can do that as a test if you want however you are just unfortunate in that you have hit this issue with your test because in production it wouldn't occur.

The reason being you would have a summary route or default static route pointing to your ASA so the more specific routes via MPLS are always used if they are available.

Hope that makes sense.


View solution in original post

30 Replies 30

Jon Marshall
VIP Community Legend VIP Community Legend
VIP Community Legend

Why do you need IP SLA ?

IP SLA is usually used when you need to track a static route.

But you are using BGP on the MPLS link.

If you receive a default route from BGP then simply configure a static default route with an AD > 20 pointing to the ASA

If you don't receive a default route from BGP and you don't have local internet connectivity in that site just configure a static default route pointing to the ASA.

Either way if the MPLS link fails then you don't receive BGP routes any more so your default route is used and if the link comes back up you go back to MPLS.

The only downside is that BGP can take up to 3 minutes before it realises a neighbor is down and stops advertising routes but that is dependant on the timers ie. they can be reduced if the SP agrees to it.

But you also mention you are connected to MPLS via serial so if the other end went down your router would know about it immediately and remove the BGP routes.


Hey Jon!   Thanks for responding.

So I've tried that and it fails over just fine....very fast actually.....but for some reason I can never get it to fall back.   I've waited quite a while to have it fall back over, but its like it won't.   I've set my cost on my route to be 200 to make sure that it was >20.    Does the backup link HAVE to fail in order for it to fall back?    In the production scenario the backup is a cellular link and obviously we want to try and not use that as much as possible and that's why even though the cellular is up, I'd rather fall back to MPLS if its working.  

Jon Marshall
VIP Community Legend VIP Community Legend
VIP Community Legend

As soon as your router gets the BGP routes again it should prefer those and stop using the ASA.

It may be something to do with your configuration.

The backup link doesn't have to fail.

Is the internal interface of the router for the LAN and the inside interface of your firewall in the same IP subnet and if so what is the default gateway of the clients ?


The internal interface of the ASA is just a point to point ( to which I have connected to the router I'm trying to perform the routes on.   For instance:

This would be the router:

int g0/0

   ip address 192.168.10 6


int g0/2

   ip address  


ASA would have an internal interface of   There is no default route assigned on this network.   Basically statically mapping each subnet.     So right now I'm just routing the loopback IP to test with.   

Hopefully that makes sense.