ASA 5510 Dual ISP Outbound Failover

AID: 8612
  • Status: Published

2060 points

  • Byanoyes
  • TypeTutorial
  • Posted on2011-11-17 at 17:35:54
This article will cover setting up redundant ISPs for outbound connectivity on an ASA 5510 (although the same should work on the 5520s and up as well).  It’s important to note that this covers outbound connectivity only.  The ASA does not have built in functionality to NAT multiple public IPs to a single internal IP – for that you’d need a router (how-to article soon!).  For an ASA to provide inbound redundancy to your servers you’d need to utilize two separate IPs for each server – one to be NAT’d to each public IP block.
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):
!
hostname firewall
!
interface Ethernet0/0
 description Primary ISP
 nameif outside
 security-level 0
 ip address 20.20.20.2 255.255.255.0
!
interface Ethernet0/1
 description Backup ISP
 nameif backup
 security-level 0
 ip address 30.30.30.2 255.255.255.0
!
interface Ethernet0/2
 description Private LAN
 nameif inside
 security-level 100
 ip address 10.10.10.1 255.255.255.0 
!
interface Ethernet0/3
 shutdown
 no nameif
 no security-level
 no ip address
!
interface Management0/0
 nameif management
 security-level 100
 ip address 192.168.1.1 255.255.255.0 
 management-only
!
global (backup) 1 interface
global (outside) 1 interface
nat (inside) 1 0.0.0.0 0.0.0.0
route outside 0.0.0.0 0.0.0.0 20.20.20.1 1
route backup 0.0.0.0 0.0.0.0 30.30.30.1 10
                                    
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:

Select allOpen in new window



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
firewall> enable
firewall# config t
firewall(config)#
                                    
1:
2:
3:

Select allOpen in new window



First we’ll setup the constant ping to a specific IP:
firewall(config)# sla monitor 1
firewall(config-sla-monitor)# type echo protocol ipIcmpEcho 4.2.2.1 interface outside
firewall(config-sla-monitor)# num-packets 3
firewall(config-sla-monitor)# frequency 10
firewall(config-sla-monitor)# exit
firewall(config)# sla monitor schedule 1 life forever start-time now
                                    
1:
2:
3:
4:
5:
6:

Select allOpen in new window



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:
firewall(config)# track 100 rtr 1 reachability
                                    
1:

Select allOpen in new window


And last we’ll specify the route that we want to track:
firewall(config)# no route outside 0.0.0.0 0.0.0.0 20.20.20.1 1
firewall(config)# route outside 0.0.0.0 0.0.0.0 20.20.20.1 1 track 100
                                    
1:
2:

Select allOpen in new window



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.
Asked On
2011-11-17 at 17:35:54ID8612
Tags

cisco

,

asa

,

adaptive security appliance

,

redundancy

,

failover

Topic

Cisco PIX Firewall

Views
1334

Comments

Add your Comment

Please Sign up or Log in to comment on this article.

Join Experts Exchange Today

Gain Access to all our Tech Resources

Get personalized answers

Ask unlimited questions

Access Proven Solutions

Search 3.2 million solutions

Read In-Depth How-To Guides

1000+ articles, demos, & tips

Watch Step by Step Tutorials

Learn direct from top tech pros

And Much More!

Your complete tech resource

See Plans and Pricing

30-day free trial. Register in 60 seconds.

Loading Advertisement...

Top Cisco PIX/ASA Experts

  1. erniebeek

    122,361

    Master

    0 points yesterday

    Profile
    Rank: Genius
  2. PeteLong

    64,083

    Master

    0 points yesterday

    Profile
    Rank: Genius
  3. fgasimzade

    54,292

    Master

    0 points yesterday

    Profile
    Rank: Wizard
  4. Kvistofta

    51,576

    Master

    0 points yesterday

    Profile
    Rank: Sage
  5. jmeggers

    37,798

    0 points yesterday

    Profile
    Rank: Sage
  6. nazsky

    36,832

    0 points yesterday

    Profile
    Rank: Wizard
  7. lruiz52

    33,783

    0 points yesterday

    Profile
    Rank: Guru
  8. MikeKane

    30,788

    0 points yesterday

    Profile
    Rank: Genius
  9. donjohnston

    29,020

    0 points yesterday

    Profile
    Rank: Genius
  10. lrmoore

    27,412

    0 points yesterday

    Profile
    Rank: Savant
  11. TimotiSt

    21,109

    0 points yesterday

    Profile
    Rank: Master
  12. The_Warlock

    20,300

    0 points yesterday

    Profile
    Rank: Wizard
  13. ArneLovius

    18,640

    0 points yesterday

    Profile
    Rank: Wizard
  14. henkva

    18,216

    0 points yesterday

    Profile
    Rank: Master
  15. ikalmar

    18,108

    10 points yesterday

    Profile
    Rank: Genius
  16. mat1458

    16,796

    0 points yesterday

    Profile
    Rank: Master
  17. harbor235

    16,375

    0 points yesterday

    Profile
    Rank: Genius
  18. jodylemoine

    16,300

    0 points yesterday

    Profile
    Rank: Sage
  19. eeRoot

    14,618

    0 points yesterday

    Profile
    Rank: Wizard
  20. max_the_king

    14,311

    0 points yesterday

    Profile
    Rank: Master
  21. kenboonejr

    14,220

    0 points yesterday

    Profile
    Rank: Sage
  22. Soulja

    14,100

    0 points yesterday

    Profile
    Rank: Genius
  23. craigbeck

    14,000

    0 points yesterday

    Profile
    Rank: Sage
  24. JZeolla

    13,975

    0 points yesterday

    Profile
  25. Netty

    12,436

    0 points yesterday

    Profile
    Rank: Guru

Hall Of Fame