The information you’ll need to complete this task:
- Primary ISP Subnet / Gateway
- Secondary ISP Subnet / Gateway
- A Public host to ping (i.e. 4.2.2.1)
The Public host to ping is a device (read: cluster of devices) that we will use to check if our primary ISP is up or down. For that reason, I advise against using an IP of a single server. I usually go with one of the well-known public DNS servers – 4.2.2.1, 4.2.2.2, or 4.2.2.3.
For this article, we’ll use the following information:
- ISP A
Subnet: 20.20.20.0/24
Gateway: 20.20.20.1
Firewall: 20.20.20.2
- ISP B
Subnet: 30.30.30.0/24
Gateway: 30.30.30.1
- Firewall: 30.30.30.2
Private LAN
Network: 10.10.10.0/24
Firewall: 10.10.10.1
I’ll assume that you’ve already been successful in getting your ASA up and running, and that your config looks something like this (NOTE: I’m using the 8.2 firmware):
As it stands, you will fail over to your secondary ISP only if interface Eth0/0 physically goes down – that is, the cable to your upstream router, public switch, or whatever device you firewall is connected to is unplugged or cut. Realistically, the number of times that an outage is due to something besides a loss of physical link is far greater than an outage caused by a physical outage. For that reason, Cisco lets us do route tracking, which is where our “public IP to ping” comes into play. Basically, we tell the ASA that we want to ping IP address 4.2.2.1 over a specific route, and if that host stops responding, then assume the route is down, and install a backup route into the route table.
To get started, get into configuration mode
First we’ll setup the constant ping to a specific IP:
Here we’ve said that we want to send 3 ICMP echos to 4.2.2.1 and repeat every 10 seconds.
Next we’ll tie a tracked route with the SLA monitor:
And last we’ll specify the route that we want to track:
And that should do it. Keep in mind that for the best test case after completing this setup you should turn off / unplug something that leave the physical interface up. So if you’re firewall connects to a public switch, and then the switch connects to your ISP’s device, unplug the cable between the switch and the ISP.