Failover over Firewall - NetwaxLab

Breaking

Facebook Popup

BANNER 728X90

Thursday, May 21, 2015

Failover over Firewall

Failover is switching to a redundant or standby computer server, system, hardware component or network upon the failure or abnormal termination of the previously active application, server, system, hardware component, or network.

Failover is a backup operational mode in which the functions of a system component (such as a processor, server, network, or database, for example) are assumed by secondary system components when the primary component becomes unavailable through either failure or scheduled down time.


Failover over Firewall
Failover can apply to any aspect of a system: within an personal computer, for example, failover might be a mechanism to protect against a failed processor; within a network, failover can apply to any network component or system of components, such as a connection path, storage device, or Web server.

The security appliance supports two failover configurations, Active/Active failover and Active/Standby failover. Each failover configuration has its own method for determining and performing failover.

With Active/Active failover, both units can pass network traffic. This also lets you configure traffic sharing on your network. Active/Active failover is available only on units running in multiple context mode.

With Active/Standby failover, only one unit passes traffic while the other unit waits in a standby state. Active/Standby failover is available on units running in either single or multiple context mode.

Both failover configurations support stateful or stateless (regular) failover.

There are two types of failover:

  1. Stateless: When a failover occurs, all active connections are dropped. Clients need to reestablish connections when the new active unit takes over. In Stateless failover the complete configuration on Active firewall is replicated on the Standby firewall through failover interface.
  2. Stateful: When Stateful Failover is enabled, the active unit continually passes per-connection state information to the standby unit. After a failover occurs, the same connection information is available at the new active unit. Supported end-user applications are not required to reconnect to keep the same communication session. In Stateful failover the complete configuration along with state informations like connection table and state table are replicated from Active firewall to Standby firewall.
(Note: In Stateful failover HTTP replication does not occur on its own, for that one needs to run this command failover replication http)

Pre-requisites for Failover Configurations


  1. Both units of Firewall must have same version of ASA code.
  2. The model number of both the firewalls must be same.
  3. Both the units must have same number of interfaces and of same type with same amount of RAM and additional cards etc.
  4. Both units must have failover activated license installed on them.

Failover and Stateful Failover Links


Failover Link

The two units in a failover pair constantly communicate over a failover link to determine the operating status of each unit. The following information is communicated over the failover link:

  • The unit state (active or standby).
  • Power status (cable-based failover only—available only on the PIX 500 series security appliance).
  • Hello messages (keep-alives).
  • Network link status.
  • MAC address exchange.
  • Configuration replication and synchronization.

LAN-Based Failover Link

You can use any unused Ethernet interface on the device as the failover link; however, you cannot specify an interface that is currently configured with a name. The LAN failover link interface is not configured as a normal networking interface. It exists for failover communication only. This interface should only be used for the LAN failover link (and optionally for the stateful failover link).

Connect the LAN failover link in one of the following two ways:

  • Using a switch, with no other device on the same network segment (broadcast domain or VLAN) as the LAN failover interfaces of the ASA.
  • Using a crossover Ethernet cable to connect the appliances directly, without the need for an external switch.
Failover can be configured in two ways:

  1. Active/Standby (configured in single mode firewall): Formed between two physical firewalls, where at a time one remains active and the other remains standby
  2. Active/Active (configured in multiple mode firewall): Two firewalls and two contexts required [or any even combination] . Each security context will be active for one firewall and standby for other firewall. Hence here both firewalls work at the same time ,having opposing contexts active on each of them.

Active/Standby Failover

Active/Standby failover lets you use a standby security appliance to take over the functionality of a failed unit. When the active unit fails, it changes to the standby state while the standby unit changes to the active state. The unit that becomes active assumes the IP addresses (or, for transparent firewall, the management IP address) and MAC addresses of the failed unit and begins passing traffic. The unit that is now in standby state takes over the standby IP addresses and MAC addresses. Because network devices see no change in the MAC to IP address pairing, no ARP entries change or time out anywhere on the network.

(Note: The crypto ca server command and related sub-commands are not synchronized to the failover peer.)

Primary/Secondary Status and Active/Standby Status

The main differences between the two units in a failover pair are related to which unit is active and which unit is standby, namely which IP addresses to use and which unit actively passes traffic.

However, a few differences exist between the units based on which unit is primary (as specified in the configuration) and which unit is secondary:

  • The primary unit always becomes the active unit if both units start up at the same time (and are of equal operational health).
  • The primary unit MAC addresses are always coupled with the active IP addresses. The exception to this rule occurs when the secondary unit is active, and cannot obtain the primary unit MAC addresses over the failover link. In this case, the secondary unit MAC addresses are used.
The active unit is determined by the following:

  • If a unit boots and detects a peer already running as active, it becomes the standby unit.
  • If a unit boots and does not detect a peer, it becomes the active unit.
  • If both units boot simultaneously, then the primary unit becomes the active unit and the secondary unit becomes the standby unit.

Command Replication

Command replication always flows from the active unit to the standby unit.


Commands Replicated to the Standby Unit
Commands Not Replicated to the Standby Unit
all configuration commands except for the modefirewall, and failover lan unit commands
all forms of the copy command except for copy running-config startup-config
copy running-config startup-config
all forms of the write command except for write memory
delete
crypto ca server and associated sub-commands
mkdir
debug
rename
failover lan unit
rmdir
firewall
write memory
mode
show
terminal pager and pager

If you enter the write standby command on the active unit, the standby unit clears its running configuration (except for the failover commands used to communicate with the active unit), and the active unit sends its entire configuration to the standby unit.

For multiple context mode, when you enter the write standby command in the system execution space, all contexts are replicated. If you enter the write standby command within a context, the command replicates only the context configuration.

Replicated commands are stored in the running configuration. To save the replicated commands to the Flash memory on the standby unit:

  • For single context mode, enter the copy running-config startup-config command on the active unit. The command is replicated to the standby unit, which proceeds to write its configuration to Flash memory.
  • For multiple context mode, enter the copy running-config startup-config command on the active unit from the system execution space and within each context on disk. The command is replicated to the standby unit, which proceeds to write its configuration to Flash memory. Contexts with startup configurations on external servers are accessible from either unit over the network and do not need to be saved separately for each unit. Alternatively, you can copy the contexts on disk from the active unit to an external server, and then copy them to disk on the standby unit.

Failover Triggers

The unit can fail if one of the following events occurs:

  • The unit has a hardware failure or a power failure.
  • The unit has a software failure.
  • Too many monitored interfaces fail.
  • The no failover active command is entered on the active unit or the failover active command is entered on the standby unit.

Failover Actions


Failure Event
Policy
Active Action
Standby Action
Notes
Active unit failed (power or hardware)
Failover
n/a
Become active
Mark active as failed
No hello messages are received on any monitored interface or the failover link.
Formerly active unit recovers
No failover
Become standby
No action
None.
Standby unit failed (power or hardware)
No failover
Mark standby as failed
n/a
When the standby unit is marked as failed, then the active unit does not attempt to fail over, even if the interface failure threshold is surpassed.
Failover link failed during operation
No failover
Mark failover interface as failed
Mark failover interface as failed
You should restore the failover link as soon as possible because the unit cannot fail over to the standby unit while the failover link is down.
Failover link failed at startup
No failover
Mark failover interface as failed
Become active
If the failover link is down at startup, both units become active.
Stateful Failover link failed
No failover
No action
No action
State information becomes out of date, and sessions are terminated if a failover occurs.
Interface failure on active unit above threshold
Failover
Mark active as failed
Become active
None.
Interface failure on standby unit above threshold
No failover
No action
Mark standby as failed
When the standby unit is marked as failed, then the active unit does not attempt to fail over even if the interface failure threshold is surpassed.

Active/Active Failover

Active/Active failover is only available to security appliances in multiple context mode. In an Active/Active failover configuration, both security appliances can pass network traffic.

In Active/Active failover, you divide the security contexts on the security appliance into failover groups. A failover group is simply a logical group of one or more security contexts. You can create a maximum of two failover groups on the security appliance. The admin context is always a member of failover group 1. Any unassigned security contexts are also members of failover group 1 by default.

The failover group forms the base unit for failover in Active/Active failover. Interface failure monitoring, failover, and active/standby status are all attributes of a failover group rather than the unit. When an active failover group fails, it changes to the standby state while the standby failover group becomes active. The interfaces in the failover group that becomes active assume the MAC and IP addresses of the interfaces in the failover group that failed. The interfaces in the failover group that is now in the standby state take over the standby MAC and IP addresses.

Which unit each failover group becomes active on is determined as follows:

  • When a unit boots while the peer unit is not available, both failover groups become active on the unit.
  • When a unit boots while the peer unit is active (with both failover groups in the active state), the failover groups remain in the active state on the active unit regardless of the primary or secondary preference of the failover group until one of the following:

  1. A failover occurs.
  2. You manually force the failover group to the other unit with the no failover active command.
  3. You configured the failover group with the preempt command, which causes the failover group to automatically become active on the preferred unit when the unit becomes available.

  • When both units boot at the same time, each failover group becomes active on its preferred unit after the configurations have been synchronized.

Device Initialization and Configuration Synchronization

Configuration synchronization occurs when one or both units in a failover pair boot. The configurations are synchronized as follows:

  • When a unit boots while the peer unit is active (with both failover groups active on it), the booting unit contacts the active unit to obtain the running configuration regardless of the primary or secondary designation of the booting unit.
  • When both units boot simultaneously, the secondary unit obtains the running configuration from the primary unit.

Command Replication

Shows the commands that are and are not replicated to the standby unit:


Commands Replicated to the Standby Unit
Commands Not Replicated to the Standby Unit
all configuration commands except for the modefirewall, andfailover lan unit commands
all forms of the copy command except for copy running-config startup-config
copy running-config startup-config
all forms of the write command except for write memory
delete
debug
mkdir
failover lan unit
rename
firewall
rmdir
mode
write memory
show

Failover Triggers

In Active/Active failover, failover can be triggered at the unit level if one of the following events occurs:

  • The unit has a hardware failure.
  • The unit has a power failure.
  • The unit has a software failure.
  • The no failover active or the failover active command is entered in the system execution space.
Failover is triggered at the failover group level when one of the following events occurs:

  • Too many monitored interfaces in the group fail.
  • The no failover active group group_id or failover active group group_id command is entered.

Failover Actions

In an Active/Active failover configuration, failover occurs on a failover group basis, not a system basis. For example, if you designate both failover groups as active on the primary unit, and failover group 1 fails, then failover group 2 remains active on the primary unit while failover group 1 becomes active on the secondary unit.

Failure Event
Policy
Active Group Action
Standby Group Action
Notes
A unit experiences a power or software failure
Failover
Become standby Mark as failed
Become active
Mark active as failed
When a unit in a failover pair fails, any active failover groups on that unit are marked as failed and become active on the peer unit.
Interface failure on active failover group above threshold
Failover
Mark active group as failed
Become active
None.
Interface failure on standby failover group above threshold
No failover
No action
Mark standby group as failed
When the standby failover group is marked as failed, the active failover group does not attempt to fail over, even if the interface failure threshold is surpassed.
Formerly active failover group recovers
No failover
No action
No action
Unless configured with the preempt command, the failover groups remain active on their current unit.
Failover link failed at startup
No failover
Become active
Become active
If the failover link is down at startup, both failover groups on both units become active.
Stateful Failover link failed
No failover
No action
No action
State information becomes out of date, and sessions are terminated if a failover occurs.
Failover link failed during operation
No failover
n/a
n/a
Each unit marks the failover interface as failed. You should restore the failover link as soon as possible because the unit cannot fail over to the standby unit while the failover link is down.


Determining Which Type of Failover to Use

The type of failover you choose depends upon your security appliance configuration and how you plan to use the security appliances.

If you are running the security appliance in single mode, then you can use only Active/Standby failover. Active/Active failover is only available to security appliances running in multiple context mode.

If you are running the security appliance in multiple context mode, then you can configure either Active/Active failover or Active/Standby failover.

  • To allow both members of the failover pair to share the traffic, use Active/Active failover. Do not exceed 50% load on each device.
  • If you do not want to share the traffic in this way, use Active/Standby or Active/Active failover.

Feature
Active/Active
Active/Standby
Single Context Mode
No
Yes
Multiple Context Mode
Yes
Yes
Traffic Sharing Network Configurations
Yes
No
Unit Failover
Yes
Yes
Failover of Groups of Contexts
Yes
No
Failover of Individual Contexts
No
No


----

No comments:

Post a Comment