What is IP SLA and why to use it?
ISP failover is the ability to failover from one ISP to another, or more specifically from one route to another, in order to ensure availability and access. In order to facilitate this functionality we must use a feature called IP SLA . IP SLAs sends data across the network to measure reachability between one or more devices across one or more network paths. Should the target become unreachable across the primary network path the second network path (route) can be use.
In the network below there are a total of five routers and two end-user computers. ISP Failover using IP SLA is deployed in order to direct traffic across multiple Internet Service Providers (ISP) in the event of an outage. This allows devices on the network to maintain Internet reachability. When the destination we are tracking (18.104.22.168) becomes unavailable for 30 seconds the IP SLA will determine the primary path is unusable. At that time the second path (route) will become after and traffic will start to flow over the second redundant ISP.
Steps to configure route failover
Step 1: Configure an IP SLA with a target that is pinged every 30 seconds.
R2(config)#track 101 ip sla 101 reachability ! R2(config)#ip sla 101 R2(config-ip-sla)#icmp-echo 22.214.171.124 ! R2(config)#ip sla schedule 101 life forever start-time now
Step 2: Enable route tracking on the primary route to the Internet.
R2(config)#ip route 0.0.0.0 0.0.0.0 126.96.36.199 track 101 R2(config)#ip route 0.0.0.0 0.0.0.0 188.8.131.52
Verify the configuration
Now that the configuration is finished lets verify our routes. Using the show ip route and traceroute commands you can verify the expected routes in the routing table and verify the network paths used to reach the destination. Use the ping command to verify connectivity. When the primary route goes down and the destination is not reachable R2 will display a message stating the primary route is down. Using traceroute before and after will allow you to verify the route has successfully failed over.