Location A (Router A) and Location B (Router B) are connected to each other using GRE tunnel over internet. All the internet destined traffic reaches to Router B from Router A and also the location B local traffic destined for internet. NAT is performed on the Location B firewall.
Due to ISP failure at Router B, GRE tunnel goes down and users from Location A are not able to access internet as there is no NAT or PAT configured on Router A.
Case 1. GRE tunnel is up , then send all internet traffic into the GRE tunnel to Router B. Router B will then decapsulate the packet NATs it and send to internet. This is normal working.
Case 2. ISP at Router B has failed. GRE between Router A and Router B is down.
Check - GRE tunnel - If down - Do the NAT / PAT on router A and send the traffic to internet.
Check - GRE tunnel - Tunnel has been recovered and is up -- STOP NAT / PAT on router A and start sending traffic to GRE tunnel.
Is it possible to do the NAT with help of Track, sla, monitor, route-map or any other logic and then take the corresponding action as that of in Case1 or Case2.
Please share the experience.