Cisco – Configuring redundancy using floating static

ciscocisco-commandsredundancy

I wanted to post my network layout, but I dont have the required reputation. So I have made up a network diagram below:

       ISP
       / \
      /   \
     /     \
    HQ------Branch
    |         |
  HQ-PC      B-PC

What I am trying to do is to use the WAN Link between HQ and Branch as the back-up link and it must not carry any data unless the link between HQ to ISP or Branch to ISP is down. Meaning it must strictly be only used as a back-up link.

What I have done is using floating static to configure the redundancy. However, it is not quite working out as what I have expected it to be.
What I have done are:

1) a default route at the HQ and Branch to the ISP (0.0.0.0 0.0.0.0
NEXT-HOP-IP)

2) static route at ISP to HQ and Branch (HQ/BRANCH-NETWORK-ADDRESS
SUBNET-MASK NEXT-HOP-IP)

3) a static(prefered) route at HQ (BRANCH-NETWORK-ADDRESS SUBNET-MASK
NEXT-HOP-IP-TO-ISP)

4) a static(prefered) route at Branch (HQ-NETWORK-ADDRESS SUBNET-MASK
NEXT-HOP-IP-TO-ISP)

5) a floating static(back-up) route at HQ (BRANCH-NETWORK-ADDRESS
SUBNET-MASK NEXT-HOP-IP-TO-HQ-THROUGH-BACKUP-LINK)

6) a floating static(back-up) route at Branch (HQ-NETWORK-ADDRESS
SUBNET-MASK NEXT-HOP-IP-TO-BRANCH-THROUGH-BACKUP-LINK)

However, there is a problem. For example, if the link between ISP and HQ is down, when I want to ping from HQ-PC to B-PC, the packet will be successfully sent from HQ-PC to B-PC, but the returning packet from B-PC will be sent to the ISP and not through the back-up link.

So sorry for such a lengthy post, but is there anyone who can help me?
If my explanation is unclear, please feel free to query.
Thanks in advance

EDIT: Sorry for the confusion, there should not be any routing protocols running with the ISP

Best Answer

As you mentioned, your static routes break, because there is no existing way to force failover to the WAN link at both sites when one site looses the uplink to the internet.

The best solution to this problem is to set up some form of routed tunnel (sourced from the ISP-link addresses on R1 and R2 in the diagram) through the internet, run a dynamic routing protocol (OSPF / EIGRP) through your tunnel and backup WAN, and set the routing metrics for the WAN link to be much higher.

HQ-Backup tunnel

Since you source the tunnel from the internet links on both sides, if either side looses internet connectivity the tunnel breaks (and the IGP recoverges to your WAN link). If you do this, be sure that PMTUD works through the tunnel so the tunnel overhead is accounted for. This kind of inter-office encrypted VPN is quite common, so it's a familiar topology for anyone who has to support this network in the future.

The issue you face with your existing design is that all your inter-office traffic traffic seems to be unencrypted (at least if I read your question at face-value). If you are not already doing so, I would strongly recommend that you encrypt all traffic between your corporate sites, if it's going through the internet.