Mastering ASA Firewall: Narbik Kocharians CCIE #12410 R&S, Security, SP Piotr Matusiak CCIE #19860 R&S, Security
Mastering ASA Firewall: Narbik Kocharians CCIE #12410 R&S, Security, SP Piotr Matusiak CCIE #19860 R&S, Security
Mastering ASA Firewall: Narbik Kocharians CCIE #12410 R&S, Security, SP Piotr Matusiak CCIE #19860 R&S, Security
ASA Firewall
www.MicronicsTraining.com
Narbik Kocharians
CCIE #12410
R&S, Security, SP
Piotr Matusiak
CCIE #19860
R&S, Security
Table of Content
LAB 1.1.
LAB 1.2.
LAB 1.3.
LAB 1.4.
LAB 1.5.
LAB 1.6.
LAB 1.7.
LAB 1.8.
LAB 1.9.
LAB 1.10.
LAB 1.11.
LAB 1.12.
LAB 1.13.
LAB 1.14.
LAB 1.15.
LAB 1.16.
LAB 1.17.
LAB 1.18.
LAB 1.19.
LAB 1.20.
LAB 1.21.
LAB 1.22.
LAB 1.23.
LAB 1.24.
LAB 1.25.
LAB 1.26.
LAB 1.27.
LAB 1.28.
LAB 1.29.
LAB 1.30.
LAB 1.31.
LAB 1.32.
LAB 1.33.
Page 2 of 33
LAB 1.34.
LAB 1.35.
LAB 1.36.
LAB 1.37.
LAB 1.38.
LAB 1.39.
LAB 1.40.
LAB 1.41.
CONFIGURING RA VPN USING CISCO VPN CLIENT AND ASA (PSK) ..................................
LAB 1.42.
CONFIGURING RA VPN USING CISCO VPN CLIENT AND ASA (PKI) ..................................
LAB 1.43.
LAB 1.44.
LAB 1.45.
Page 3 of 33
Physical Topology
F0/1
F0/0
F0/1
F0/1
G0/1
F0/2
R1
F0/2
G0/0
R2
F0/4
F0/0
F0/6
SW2
F0/1
R4
F0/5
F0/0
F0/1
R5
SW1
F0/1
F0/0
R6
F0/4
F0/5
ASA1
F0/6
F0/10
E0/0
F0/11
E0/1
F0/12
E0/2
F0/13
E0/3
F0/14
C&C
F0/15
G0/0
F0/16
G0/1
F0/17
G0/2
F0/18
G0/3
E0/0
F0/10
E0/1
F0/11
E0/2
F0/12
E0/3
F0/13
ACS
F0/14
F0/15
ASA2
IPS
SW4
Page 4 of 33
PC
SW3
F0/23-24
SW1
SW2
0
F0
/
19
-2
0
-2
F0/21-22
F0/21-22
F0
/1
9
F0/23-24
SW3
SW4
To R4: 204
To R5: 205
To R6: 206
R2
To R2: 502
To R4: 504
To R6: 506
S0/1/0
S0/1/0
R5
FR
S0/0/0
R4
S0/1/0
To R2: 402
To R5: 405
To R6: 406
To R2: 602
To R4: 604
To R5: 605
Page 5 of 33
R6
www.MicronicsTraining.com
Page 6 of 33
Active/Standby Failover
Lo0
Inside
R1
.1
F0/0
10.1.101.0/24
.10
E0/1
.11
E0/3
E0/2 .10
Lo0
.10
E0/1
E0/3
.10 E0/2
.4
F0/0
10.1.104.0/24
DMZ
E0/0
.11
E0/0
R4
Lo0
10.1.102.0/24
G0/0 .2
Outside
R2
Lab Setup:
R1s F0/0 and ASA1/ASA2 E0/1 interface should be configured in VLAN 101
R2s G0/0 and ASA1/ASA2 E0/0 interface should be configured in VLAN 102
R4s F0/0 and ASA1/ASA2 E0/2 interface should be configured in VLAN 104
ASA1 and ASA2 E0/3 interface should be configured in VLAN 254
Configure Telnet on all routers using password cisco
Configure static default route on all routers pointing to ASA.
IP Addressing:
Device
R1
R2
R4
Interface
Lo0
F0/0
Lo0
G0/0
Lo0
F0/0
IP address
1.1.1.1/24
10.1.101.1/24
2.2.2.2/24
10.1.102.2/24
4.4.4.4/24
10.1.104.4/24
Page 7 of 33
Task 1
Configure ASA interfaces as follow:
Physical Interface
Interface name
E0/0
IN
Security level
80
E0/1
OUT
E0/2
DMZ
50
IP address
Pri 10.1.101.10/24
Sby 10.1.101.11/24
Pri 10.1.102.10/24
Sby 10.1.102.11/24
Pri 10.1.104.10/24
Sby 10.1.104.11/24
Configure ASA2 device to back up ASA1 firewall in the event of failure. Configure
interface E0/3 as the Failover Link. This interface will be used to transmit failover control
messages. Assign a name of LAN_FO and active IP address of 10.1.254.10/24 with a
standby address of 10.1.254.11. Authenticate the failover control messages using a key
of cisco987. Configure host name of ASA-FW.
ASA failover uses a special link which must be configured appropriately to successfully monitor
state of primary ASA device. This link is a dedicated physical Ethernet interface. The best practice
is to use the fastest ASA interface possible as an amount of data traversing this link may be
significant and usually depends on the amount of data traverses all remaining interfaces. This link
may have two things to do (1) it must synchronize configuration, monitor ASA interfaces and send
those information to second ASA to continue working if primary ASA fails (2) it may carry stateful
information (like state table and translation table) to maintain all connections by second ASA in
case of failure.
Although, the first task does not require fast interface, the second may require significant
bandwidth of the interface. In addition to that, this link shouldnt be set up using crossover cable. It
is highly recommended to use switch for interconnection with PortFast configured on the switch
port.
In case of configuration, the interface used as failover link should be in UP state, meaning an
administrator must enter no shutdown command on that interface. No other configuration is
required. All failover configuration is done using failover. command.
Two very important commands are required (1) failover lan which is used for specifying what
interface will be used as failover link and (2) failover interface ip which configures IP address of
that link (note the IP address is configured here, not under the physical interface).
Note that all ASA interfaces must have standby IP addresses configured. It is usually omitted when
ASA is already pre-configured and we need to add failover to the existing configuration. Those
standby IP addresses will be used on secondary ASA as all interfaces must send out heartbeat
information on their subnet to check if there is standby interface ready on a given subnet.
The first ASA must be marked as primary unit and second ASA as secondary unit. A good
practice mandates usage of encryption key for securing failover communication.
Configuration of secondary ASA is similar to that it was on primary unit. All you need is to unshut
failover interface and configure it in the same way as it was on primary device. The one difference is
that secondary device must be marked as secondary unit.
The very last configuration command is simple failover which enables failover and starts
Page 8 of 33
On primary ASA
ciscoasa(config)# hostname ASA-FW
ASA-FW(config)# interface e0/0
ASA-FW(config-if)# nameif OUT
INFO: Security level for "OUT" set to 0 by default.
ASA-FW(config-if)# ip address 10.1.102.10 255.255.255.0 standby 10.1.102.11
ASA-FW(config-if)# no shut
ASA-FW(config-if)# interface e0/1
ASA-FW(config-if)# nameif IN
INFO: Security level for "IN" set to 0 by default.
ASA-FW(config-if)# security-level 80
ASA-FW(config-if)# ip address 10.1.101.10 255.255.255.0 standby 10.1.101.11
ASA-FW(config-if)# no shut
ASA-FW(config-if)# interface e0/2
ASA-FW(config-subif)# nameif DMZ
INFO: Security level for "DMZ" set to 0 by default.
ASA-FW(config-subif)# security-level 50
ASA-FW(config-subif)# ip address 10.1.104.10 255.255.255.0 standby 10.1.104.11
ASA-FW(config-subif)# no shut
ASA-FW(config-subif)# exit
ASA-FW(config)# int e0/3
ASA-FW(config-if)# no sh
Do not forget to unshut that interface!
ASA-FW(config)# failover lan unit primary
ASA-FW(config)# failover lan interface LAN_FO e0/3
INFO: Non-failover interface config is cleared on Ethernet0/3 and its sub-interfaces
ASA-FW(config)# failover interface ip LAN_FO 10.1.254.10 255.255.255.0 standby 10.1.254.11
ASA-FW(config)# failover key cisco987
ASA-FW(config)# failover
You must enable failover at the endo of the configuration using failover command.
On secondary ASA
ciscoasa(config)# int e0/3
ciscoasa(config-if)# no sh
Same on the secondary ASA. You must manually unshut the interface for LAN failover.
ciscoasa(config)# failover lan unit secondary
ciscoasa(config-if)# failover lan interface LAN_FO e0/3
INFO: Non-failover interface config is cleared on Ethernet0/3 and its sub-interfaces
ciscoasa(config)# failover interface ip LAN_FO 10.1.254.10 255.255.255.0 standby 10.1.254.11
ciscoasa(config)# failover key cisco987
ciscoasa(config)# failover
ciscoasa(config)# .
Detected an Active mate
Beginning configuration replication from mate.
End configuration replication from mate.
ASA-FW(config)#
ASA-FW(config)# int e0/0
Page 9 of 33
On Active ASA
ASA-FW(config)# sh failover
Failover On
Failover unit Primary
Failover LAN Interface: LAN_FO Ethernet0/3 (up)
Unit Poll frequency 1 seconds, holdtime 15 seconds
Interface Poll frequency 5 seconds, holdtime 25 seconds
Interface Policy 1
Monitored Interfaces 3 of 250 maximum
Version: Ours 8.2(1), Mate 8.2(1)
Last Failover at: 17:08:59 UTC Jul 10 2010
This host: Primary - Active
Active time: 105 (sec)
slot 0: ASA5510 hw/sw rev (1.1/8.2(1)) status (Up Sys)
Interface OUT (10.1.102.10): Normal
Interface IN (10.1.101.10): Normal
Interface DMZ (10.1.104.10): Normal
slot 1: empty
Other host: Secondary - Standby Ready
Active time: 291 (sec)
slot 0: ASA5510 hw/sw rev (1.1/8.2(1)) status (Up Sys)
Interface OUT (10.1.102.11): Normal
Interface IN (10.1.101.11): Normal
Interface DMZ (10.1.104.11): Normal
slot 1: empty
Note the IP addresses in the brackets and normal state of those interfaces. The IP
addresses are simply Active and Standby IP address configured on the interface. If you see
0.0.0.0 there, it means you do not have Standby IP address configured on a particular
interface.
Also the state may be different. There may be Waiting, Non-Monitored and Normal states.
Since the ASA does not monitor subinterfaces by default you may see Non-Monitored state
very often when using subinterfaces. However, a Waiting state means there is a process of
communicating between interfaces in the same subnet on both ASA units. If this state is
displayed for too long (couple of minutes) that means the ASA has communication issues
with other ASA device meaning issues with L2 (switch) in most cases.
Stateful Failover Logical Update Statistics
Link : Unconfigured.
It is highly recommended to perform failover test after configuration. Below is an example
test which can easily verify if failover works fine.
1. Enable ICMP inspection to allow ICMP traffic go through the ASA
2. Start pinging R2 from R1 (Inside to Outside)
3. Make Standby ASA to become Active
4. Verify that failover took place and everyting is OK in means of verification
commands and check if ping is still going on.
FAILOVER TEST
1. Enable ICMP inspection on ASA (just to allow ICMP traffic to pass through the ASA)
ASA-FW(config)# policy-map global_policy
ASA-FW(config-pmap)# class inspection_default
ASA-FW(config-pmap-c)# inspect icmp
ASA-FW(config-pmap-c)# exit
ASA-FW(config-pmap)# exit
Page 10 of 33
Page 11 of 33
Link : Unconfigured.
4. Check R1 ping:
R1#ping 10.1.102.2 rep 1000
Type escape sequence to abort.
Sending 1000, 100-byte ICMP Echos to 10.1.102.2, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!
Success rate is 99 percent (999/1000), round-trip min/avg/max = 1/2/4 ms
Note that only one ping is lost. The failover is working quite fast.
Also keep in mind that you can use redundant interfaces along with failover.
Task 2
Configure ASA so that it will maintain TCP connections (including HTTP) in the event of
active device failure. Use the same interface which is already used for LAN Failover.
To use Stateful Failover, you must configure a Stateful Failover link to pass all state information.
You have three options for configuring a Stateful Failover link:
You can use a dedicated Ethernet interface for the Stateful Failover link.
If you are using LAN-based failover, you can share the failover link.
You can share a regular data interface, such as the inside interface (not recommended).
By default, ASA does not replicate HTTP session information when Stateful Failover is enabled.
Because HTTP sessions are typically short-lived, and because HTTP clients typically retry failed
connection attempts, not replicating HTTP sessions increases system performance without causing
serious data or connection loss.
On active ASA
ASA-FW(config)# failover link LAN_FO
ASA-FW(config)# failover replication http
Verification
ASA-FW(config)# sh failover
Failover On
Failover unit Primary
Failover LAN Interface: LAN_FO Ethernet0/3 (up)
Unit Poll frequency 1 seconds, holdtime 15 seconds
Page 12 of 33
rcv
3
3
0
0
0
0
0
0
0
0
0
0
0
0
rerr
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Page 13 of 33
Task 3
Configure ASA so that it will use static MAC address on the outside interface in case
standby device boots first. Use MAC address of 0011.0011.0011 as Active and
0022.0022.0022 as Standby.
MAC addresses for the interfaces on the primary unit are used for the interfaces on the active unit.
However, if both units are not brought online at the same time and the secondary unit boots first
and becomes active, it uses the burned-in MAC addresses for its own interfaces. When the primary
unit comes online, the secondary unit will obtain the MAC addresses from the primary unit. This
change can disrupt network traffic. Configuring virtual MAC addresses for the interfaces ensures
that the secondary unit uses the correct MAC address when it is the active unit, even if it comes
online before the primary unit.
This command has no effect when ASA is configured for Active/Active failover. In A/A failover there
is a command mac address under failover group.
On active ASA
ASA-FW(config)# failover mac address e0/0 0011.0011.0011 0022.0022.0022
Page 14 of 33
rcv
24
24
0
0
0
0
0
0
0
0
0
0
0
0
Page 15 of 33
rerr
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Active/Active Failover
Lo0
Inside1
Inside2
Lo0
R4
.4 F0/0
10.1.104.0/24
R1
.1 F0/0
.10
DMZ
E0/1.104
E0/1.101
Lo0
F0/0
CTX
1
CTX
2
E0/3
.5
.10
.13
E0/0
.10
E0/1.104
E0/1.101
.10
E0/2
R5
10.1.101.0/24
.11
.11
FO
E0/3
CTX
1
CTX
2
.12
E0/0
10.1.105.0/24
10.1.102.0/24
Lo0
G0/0 .2
Outside
R2
Lab Setup:
R2s G0/0 and ASAs E0/0 interface should be configured in VLAN 102
R5s F0/0 and ASAs E0/2 interface should be configured in VLAN 105
Configure Telnet on all routers using password cisco
Configure static default route on all routers pointing to ASA
IP Addressing:
Device
R1
R2
R4
R5
Interface
Lo0
F0/0
Lo0
G0/0
Lo0
F0/0
Lo0
F0/0
IP address
1.1.1.1/24
10.1.101.1/24
2.2.2.2/24
10.1.102.2/24
4.4.4.4/24
10.1.104.4/24
5.5.5.5/24
10.1.105.5/24
Page 16 of 33
Task 1
Configure ASA1 with a hostname of ASA-FW and the following security contexts:
Context name:
CTX1
CTX2
Interfaces:
E0/0 Outside
E0/0 Outside
E0/1.101 Inside
E0/1.104 Inside
E0/2 DMZ
Context file:
CTX1.cfg
CTX2.cfg
The context configuration should be stored on the Flash memory.
Configure interfaces for new contexts as follow:
Context
Interface name
Security level
CTX1
Inside
100
Outside
0
DMZ
50
CTX2
Inside
100
Outside
0
IP address
10.1.101.10/24
10.1.102.10/24
10.1.105.10/24
10.1.104.10/24
10.1.102.12/24
In the Active/Active (A/A) implementation of failover, both appliances in the failover pair process
traffic. To accomplish this, two contexts are needed, as is depicted in the diagram above. On the left
appliance, CTX1 performs an active role and CTX2 a standby role. On the right appliance, CTX1 is
standby and CTX2 is active.
The configuration required in this task is very similar to the configuration of single ASA device. The
ASA must be converted to multiple mode, security contexts must be created and appropriate
interfaces allocated. Then interfaces must be configured as requested inside respective context.
On SW3
SW3(config-if)#int f0/11
SW3(config-if)#sw tru enca dot
SW3(config-if)#sw mo tru
SW3(config)#vlan 101
SW3(config-vlan)#exi
SW3(config)#vlan 104
SW3(config-vlan)#exit
Page 17 of 33
***
*** --- SHUTDOWN NOW --***
*** Message to all terminals:
***
***
change mode
Rebooting....
<output ommited>
On ASA1
ciscoasa(config)# hostname ASA-FW
ASA-FW(config)# int e0/0
ASA-FW(config-if)# no sh
ASA-FW(config-if)# int e0/1
ASA-FW(config-if)# no sh
ASA-FW(config-if)# int e0/1.101
ASA-FW(config-subif)# vlan 101
ASA-FW(config-subif)# no sh
ASA-FW(config-subif)# int e0/1.104
ASA-FW(config-subif)# vlan 104
ASA-FW(config-subif)# no sh
ASA-FW(config-subif)# int e0/2
ASA-FW(config-if)# no sh
ASA-FW(config-if)# context CTX1
Creating context 'CTX1'... Done. (2)
Depends on your previous configuration you may get a message saying:
ERROR: Identify admin context first, using the 'admin-context' command
Then, you need to create admin context first and tell the ASA to use that context for
administrative purposes. Both things can be done using the following command:
ASA-FW(config)# admin-context admin
Creating context 'admin'... Done. (2)
Unfortunately, the above command does not specify when admin context is going to write its
configuration. Hence, we need to specify that manually:
ASA-FW(config)# context admin
ASA-FW(config-ctx)# config-url disk0:/admin.ctx
WARNING: Could not fetch the URL disk0:/admin.ctx
INFO: Creating context with default config
INFO: Admin context will take some time to come up .... please wait.
Note that it is wise to check if there is no file with previous configuration stored on
the flash before configuring config URL. If there is a file with the same name already, it
will be imported and used inside the context.
ASA-FW(config-ctx)# sh disk0: | in cfg|CFG
164 724
Oct 19 2009 18:38:50 admin.cfg
166 1437
Oct 19 2009 18:38:50 old_running.cfg
ASA-FW(config-ctx)# config-url disk0:CTX1.cfg
INFO: Converting disk0:CTX1.cfg to disk0:/CTX1.cfg
WARNING: Could not fetch the URL disk0:/CTX1.cfg
INFO: Creating context with default config
ASA-FW(config-ctx)# allocate-interface e0/1.101
ASA-FW(config-ctx)# allocate-interface e0/0
Page 18 of 33
Verification
ASA-FW/CTX2(config)# ping 10.1.104.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.104.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/10 ms
ASA-FW/CTX2(config)# ping 10.1.102.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.102.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/10 ms
ASA-FW/CTX2(config)# sh int ip brief
Interface
IP-Address
Ethernet0/1.104
10.1.104.10
Ethernet0/0
10.1.102.12
Page 19 of 33
Protocol
up
up
OK?
YES
YES
YES
Method
manual
manual
manual
Status
up
up
up
Protocol
up
up
up
Task 2
Configure Active/Active failover between ASA1 and ASA2 so that the context CTX1 is
active on ASA1 and standby on ASA2 whilst the context CTX2 is active on ASA2 and
standby on ASA1. As there is a shared interface among both devices, ensure that
packet classification is based on MAC addresses. Use interface E0/3 as failover LAN
and stateful link with IP address of 10.1.254.10/24 (VLAN 254). All standby IP
addresses should be derived from the last octet of primary IP address plus one (e.g. if
primary IP address is 10.1.1.10 the standby IP address will be 10.1.1.11). Secure
failover transmission with a key of cisco456.
Change the command line prompt to show hostname, context and current state of the
context for better visibility.
In Active/Standby failover, failover is performed on a unit basis. One unit is active while the other
unit is standby. In Active/Active, one context is active while the same context on the other ASA is in
standby state.
ASA uses failover groups to manage contexts. Each ASA supports up to two failover groups as
there can only be two ASAs in the failover pair. By default all security contexts are assigned to the
failover group 1.
You can control the distribution of active contexts between the ASAs by controlling each context's
membership in a failover group. Within the failover group configuration mode the "primary"
command gives the primary ASA higher priority for failover group 1. However, the "secondary"
command under failover group 2 gives secondary ASA higher priority for this failover group.
Assigning a primary or secondary priority to a failover group specifies which unit the failover group
becomes active on when both units boot simultaneously. If one unit boots before the other, both
failover groups become active on that unit. When the other unit comes online, any failover groups
that have the secondary unit as a priority do not become active on the second unit unless the
failover group is configured with the "preempt" command or is manually forced using "no
failover active" command.
Page 20 of 33
On ASA1
ASA-FW/CTX1(config)# changeto system
ASA-FW(config)# failover group 1
ASA-FW(config-fover-group)# primary
ASA-FW(config-fover-group)# preempt
ASA-FW(config-fover-group)# failover group 2
ASA-FW(config-fover-group)# secondary
ASA-FW(config-fover-group)# preempt
ASA-FW(config-fover-group)# context CTX1
ASA-FW(config-ctx)# join-failover-group 1
ASA-FW(config-ctx)# context CTX2
ASA-FW(config-ctx)# join-failover-group 2
ASA-FW(config-ctx)# exit
ASA-FW(config)# failover lan unit primary
ASA-FW(config)# int e0/3
ASA-FW(config-if)# no sh
ASA-FW(config)# failover lan interface LAN_FO e0/3
INFO: Non-failover interface config is cleared on Ethernet0/3 and its sub-interfaces
ASA-FW(config)# failover interface ip LAN_FO 10.1.254.10 255.255.255.0 standby 10.1.254.11
ASA-FW(config)# failover key cisco456
ASA-FW(config)# failover link LAN_FO
ASA-FW(config)# failover
The failover configuration is exactly the same as it was for Active/Standby failover.
Remember that when adding failover to the existing configuration, you must configure
standby IP addresses for all interfaces inside the security contexts.
ASA-FW(config)# changeto con CTX2
ASA-FW/CTX2(config)# int e0/1.104
ASA-FW/CTX2(config-if)# ip add 10.1.104.10 255.255.255.0 standby 10.1.104.11
ASA-FW/CTX2(config-if)# int e0/0
ASA-FW/CTX2(config-if)# ip add 10.1.102.12 255.255.255.0 standby 10.1.102.13
ASA-FW(config)# changeto con CTX1
ASA-FW/CTX1(config)# int e0/1.101
ASA-FW/CTX1(config-if)# ip add 10.1.101.10 255.255.255.0 standby 10.1.101.11
ASA-FW/CTX1(config-if)# int e0/0
ASA-FW/CTX1(config-if)# ip add 10.1.102.10 255.255.255.0 standby 10.1.102.11
ASA-FW/CTX1(config-if)# int e0/2
ASA-FW/CTX1(config-if)# ip add 10.1.103.10 255.255.255.0 standby 10.1.103.11
ASA-FW/CTX1(config-if)# changeto system
In multiple context mode, you can view the extended prompt when you log in to the system
execution space or the admin context. Within a non-admin context, you only see the default
prompt, which is the hostname and the context name.
The ability to add information to a prompt allows you to see at-a-glance which adaptive
security appliance you are logged into when you have multiple modules. During a failover,
this feature is useful when both adaptive security appliances have the same hostname.
ASA-FW(config)# prompt hostname context priority state
ASA-FW/pri/act(config)#
Note that in Active/Active failover the ASA automatically generates different MAC
addresses on shared interfaces. You do NOT need to configure mac-address auto in A/A
failover scenario.
On SW3
SW3(config)#int f0/13
SW3(config-if)#sw mo acc
SW3(config-if)#sw acc vl 254
Page 21 of 33
On SW4
Switch(config)#ho SW4
SW4(config)#int f0/10
SW4(config-if)#sw mo acc
SW4(config-if)#sw acc vl 102
% Access VLAN does not exist. Creating vlan 102
SW4(config-if)#int f0/11
SW4(config-if)#sw tru enca dot
SW4(config-if)#sw mo tru
SW4(config-if)#int f0/12
SW4(config-if)#sw mo acc
SW4(config-if)#sw acc vl 105
% Access VLAN does not exist. Creating vlan 105
SW4(config-if)#int f0/13
SW4(config-if)#sw mo acc
SW4(config-if)#sw acc vl 254
% Access VLAN does not exist. Creating vlan 254
SW4(config-if)#int ran f0/19 - 24
SW4(config-if-range)#sw tru enca dot
SW4(config-if-range)#sw mo tru
SW4(config-if-range)#exi
SW4(config)#vlan 101
SW4(config-vlan)#exi
SW4(config)#vlan 104
SW4(config-vlan)#exi
On ASA2
On secondary ASA there is only basic failover configuration required. After configuring
and enabling failover, the secondary unit contacts the primary unit and copies
configuration for all contexts and system execution space.
As you can see both failover groups are active on the primary ASA at the beginning.
However, after configuration replication the secondary ASA preempts failover group 2.
ciscoasa(config)# no failover
ciscoasa(config)# failover lan unit secondary
ciscoasa(config)# int e0/3
ciscoasa(config-if)# no sh
ciscoasa(config-if)# failover lan interface LAN_FO e0/3
INFO: Non-failover interface config is cleared on Ethernet0/3 and its sub-interfaces
ciscoasa(config)# failover interface ip LAN_FO 10.1.254.10 255.255.255.0 standby 10.1.254.11
ciscoasa(config)# failover key cisco456
ciscoasa(config)# failover link LAN_FO
ciscoasa(config)# failover
ciscoasa(config)# .
Detected an Active mate
ciscoasa(config)# Removing context 'admin' (1)... Done
INFO: Admin context is required to get the interfaces
Creating context 'admin'... Done. (2)
WARNING: Skip fetching the URL disk0:/admin.cfg
INFO: Creating context with default config
INFO: Admin context will take some time to come up .... please wait.
Creating context 'CTX1'... Done. (3)
WARNING: Skip fetching the URL disk0:/CTX1.cfg
INFO: Creating context with default config
Creating context 'CTX2'... Done. (4)
Page 22 of 33
Verification
ASA-FW/pri/act(config)# sh failover
Failover On
Failover unit Primary
Failover LAN Interface: LAN_FO Ethernet0/3 (up)
Unit Poll frequency 1 seconds, holdtime 15 seconds
Interface Poll frequency 5 seconds, holdtime 25 seconds
Interface Policy 1
Monitored Interfaces 3 of 250 maximum
Version: Ours 8.2(1), Mate 8.2(1)
Group 1 last failover at: 05:37:45 UTC Jul 17 2010
Group 2 last failover at: 05:47:42 UTC Jul 17 2010
This host:
Group 1
Group 2
Primary
State:
Active time:
State:
Active time:
Active
701 (sec)
Standby Ready
597 (sec)
Secondary
State:
Active time:
State:
Active time:
Standby Ready
0 (sec)
Active
103 (sec)
rcv
15
15
0
0
0
0
0
0
0
Page 23 of 33
rerr
0
0
0
0
0
0
0
0
0
Xmit Q:
16
Note that the status for Inside interface in both contexts is Normal (Not-Monitored).
This is because by default ASA does not monitor subinterfaces or logical interfaces. To
enable monitoring for those interfaces there should be monitor-interface Inside command
configured in each of security contexts.
ASA-FW/pri/act(config)# sh failover group 1
Last Failover at: 05:37:45 UTC Jul 17 2010
This host:
Primary
State:
Active time:
Active
829 (sec)
Secondary
State:
Active time:
Standby Ready
0 (sec)
0
0
0
0
0
0
0
0
0
0
0
0
Primary
State:
Active time:
Standby Ready
597 (sec)
Secondary
State:
Active time:
Active
248 (sec)
0
0
0
0
0
0
0
0
0
0
0
0
Page 24 of 33
Page 25 of 33
inspect
inspect
inspect
inspect
inspect
inspect
inspect
inspect
inspect
!
rsh
rtsp
skinny
esmtp
sqlnet
sunrpc
tftp
sip
xdmcp
Note: No ICMP Inspection
Page 26 of 33
FAILOVER TEST:
SW23#conf t
Enter configuration commands, one per line.
SW3(config)#int f0/12
SW3(config-if)#shut
Page 27 of 33
This host:
Group 1
Group 2
Primary
State:
Active time:
State:
Active time:
Failed
1570 (sec)
Standby Ready
597 (sec)
Secondary
State:
Active time:
State:
Active time:
Active
40 (sec)
Active
1012 (sec)
rcv
138
136
0
0
0
0
2
0
0
rerr
0
0
0
0
0
0
0
0
0
ASA-FW/pri/act(config)#
Group 1 preempt mate
ASA-FW/pri/act(config)# sh failover
Failover On
Failover unit Primary
Failover LAN Interface: LAN_FO Ethernet0/3 (up)
Unit Poll frequency 1 seconds, holdtime 15 seconds
Interface Poll frequency 5 seconds, holdtime 25 seconds
Interface Policy 1
Monitored Interfaces 3 of 250 maximum
Version: Ours 8.2(1), Mate 8.2(1)
Group 1 last failover at: 06:07:48 UTC Jul 17 2010
Page 28 of 33
Primary
State:
Active time:
State:
Active time:
Active
1601 (sec)
Standby Ready
597 (sec)
Secondary
State:
Active time:
State:
Active time:
Standby Ready
210 (sec)
Active
1215 (sec)
rcv
165
163
0
0
0
0
2
0
0
rerr
0
0
0
0
0
0
0
0
0
Primary
State:
Active time:
State:
Active
1711 (sec)
Standby Ready
Page 29 of 33
Active time:
597 (sec)
Secondary
State:
Active time:
State:
Active time:
Standby Ready
210 (sec)
Active
1325 (sec)
rcv
187
185
0
0
0
0
2
0
0
rerr
0
0
0
0
0
0
0
0
0
Task 3
To improve failover speed between two ASAs, configure both, unit and interface poll
time to exchange hello packets on every 500ms. Set the hold time to 5sec. Also, ensure
that the ASA will perform switchover for context CTX1 if minimum two interfaces fail.
Configure ASA to monitor all its interfaces.
If you want failover to occur faster, decrease the failover unit poll time, which specifies how often
hello messages are sent on the failover link. The hold time value specifies the amount of time that
ASA will wait (after lost three consecutive hellos) before declaring the peer unit failed and triggering
a failover.
You can also specify those parameters for monitored interfaces, as ASA sends hello packets out of
each monitored data interface to monitor interface health.
Also, there is a default failover policy which specifies a percentage or a number of the interfaces
which must failed before ASA triggers a failover. The default is 1 meaning the failover will trigger
when only one interface fails.
Page 30 of 33
On Primary ASA
ASA-FW/pri/act(config)# changeto system
ASA-FW/pri/act(config)# failover polltime unit msec 500 holdtime 5
ASA-FW/pri/act(config)# failover group 1
ASA-FW/pri/act(config-fover-group)# interface-policy 2
ASA-FW/pri/act(config-fover-group)# polltime interface msec 500 holdtime 5
ASA-FW/pri/act(config-fover-group)# failover group 2
ASA-FW/pri/act(config-fover-group)# polltime interface msec 500 holdtime 5
ASA-FW/pri/act(config-fover-group)# exi
Note that Unit Pooltime and Interface Policy are configured under the failover groups.
ASA-FW/pri/act(config)# changeto context CTX1
ASA-FW/CTX1/pri/act(config)# monitor-interface Inside
Interface monitoring is configured in each security context and this is only one command
related to the failover configured in this place. This is because this is the place where
the ASA has access to the IP address of the interface.
Rest of failover commands are configured under the system context.
ASA-FW/CTX1/pri/act(config)# changeto context CTX2
ASA-FW/CTX2/pri/stby(config)# failover exec active monitor-interface Inside
Verification
ASA-FW/CTX2/pri/stby(config)# changeto system
ASA-FW/pri/act(config)# sh failover
Failover On
Failover unit Primary
Failover LAN Interface: LAN_FO Ethernet0/3 (up)
Unit Poll frequency 500 milliseconds, holdtime 5 seconds
Interface Poll frequency 5 seconds, holdtime 25 seconds
Interface Policy 1
Monitored Interfaces 5 of 250 maximum
Version: Ours 8.2(1), Mate 8.2(1)
Group 1 last failover at: 06:07:48 UTC Jul 17 2010
Group 2 last failover at: 05:47:42 UTC Jul 17 2010
This host:
Group 1
Group 2
Primary
State:
Active time:
State:
Active time:
Active
3114 (sec)
Standby Ready
597 (sec)
Secondary
State:
Active time:
State:
Active time:
Standby Ready
210 (sec)
Active
2728 (sec)
Page 31 of 33
slot 1: empty
Stateful Failover Logical Update Statistics
Link : LAN_FO Ethernet0/3 (up)
Stateful Obj
xmit
xerr
General
368
0
sys cmd
365
0
up time
0
0
RPC services
0
0
TCP conn
0
0
UDP conn
0
0
ARP tbl
3
0
Xlate_Timeout
0
0
SIP Session
0
0
rcv
367
365
0
0
0
0
2
0
0
rerr
0
0
0
0
0
0
0
0
0
Task 4
You have been noticed by you companys networking team that they plan to deploy
another router on the outside network to connect to another ISP for redundancy and
load sharing. You must act proactively and ensure that any asymmetric traffic (including
HTTP) caused by redundant ISPs will be handled by the ASA in both contexts.
In Active/Active designs, there is a greater chance for asymmetric routing. This means that one unit
may receive a return packet for a connection originated through its peer unit. Because this unit
does not have any connection information for this packet, the packet is dropped. This is most
common when there are two ISPs with BGP and packet can return from a different ISP.
This can be prevented on the ASA by using ASR Groups (Asynchronous Routing Groups)
configured on the interface inside the context. When an asr-group is configured on the interface
and it receives a packet for which it has no session information, it checks the session information
for the other interfaces that are in the same ASR Group. Then, instead of being dropped, the Layer 2
header is re-written and the packet is redirected to the other unit.
Page 32 of 33
On Primary ASA
ASA-FW/CTX2/pri/stby(config)# changeto system
ASA-FW/pri/act(config)# failover group 1
ASA-FW/pri/act(config-fover-group)# replication http
ASA-FW/pri/act(config-fover-group)# failover group 2
ASA-FW/pri/act(config-fover-group)# replication http
ASA-FW/pri/act(config-fover-group)# changeto context CTX1
ASA-FW/CTX1/pri/act(config)# interface e0/0
ASA-FW/CTX1/pri/act(config-if)# asr-group 1
ASA-FW/CTX1/pri/act(config-if)# changeto context CTX2
ASA-FW/CTX2/pri/stby(config)# failover exec active interface e0/0
ASA-FW/CTX2/pri/stby(config)# failover exec active asr-group 1
Verification
ASA-FW/CTX2/pri/stby(config)# failover exec active sh interface e0/0 detail
Interface Ethernet0/0 "Outside", is up, line protocol is up
MAC address 1200.0000.0400, MTU 1500
IP address 10.1.102.12, subnet mask 255.255.255.0
Traffic Statistics for "Outside":
4015 packets input, 432772 bytes
4012 packets output, 432696 bytes
0 packets dropped
Control Point Interface States:
Interface number is 1
Interface config status is active
Interface state is active
Asymmetrical Routing Statistics:
Received 0 packets
Transmitted 0 packets
Dropped 0 packets
ASA-FW/CTX2/pri/stby(config)# changeto context CTX1
ASA-FW/CTX1/pri/act(config)# sh interface e0/0 detail
Interface Ethernet0/0 "Outside", is up, line protocol is up
MAC address 1200.0000.0500, MTU 1500
IP address 10.1.102.10, subnet mask 255.255.255.0
Traffic Statistics for "Outside":
6088 packets input, 539738 bytes
4105 packets output, 442420 bytes
1955 packets dropped
Control Point Interface States:
Interface number is 2
Interface config status is active
Interface state is active
Asymmetrical Routing Statistics:
Received 0 packets
Transmitted 0 packets
Dropped 0 packets
Page 33 of 33