Cisco IOS Classic Firewall Stateful Failover High Availability Solution
PDF(134.5 KB) View with Adobe Reader on a variety of devices
Updated:May 7, 2008
Stateful Failover for the Cisco IOS
® Firewall allows a router to continue processing and forwarding firewall session packets after a planned or unplanned outage occurs. A backup (secondary) router automatically takes over the tasks of the active (primary) router if the active router loses connectivity for any reason. This process is transparent and requires neither adjustment nor reconfiguration of any remote peer.
Cisco IOS Classic Firewall
Cisco IOS Classic Firewall creates temporary openings in access lists at firewall interfaces. These openings are created when specified traffic exits your internal network through the firewall. The openings allow returning traffic (that would normally be blocked) and additional data channels to enter your internal network back through the firewall. The traffic is allowed back through the firewall only if it is part of the same session as the original traffic that triggered Cisco IOS Classic Firewall when exiting through the firewall.
Stateful Failover for the Cisco IOS Firewall
Stateful Failover for the Cisco IOS Firewall is designed to work in conjunction with Stateful Switchover (SSO) and Hot Standby Router Protocol (HSRP).
HSRP provides network redundancy for IP networks, helping ensure that user traffic immediately and transparently recovers from failures in network edge devices or access circuits. That is, HSRP monitors both the inside and outside interfaces so that if either interface goes down, the whole router is deemed to be down and ownership of firewall sessions is passed to the standby router (which transitions to the HSRP active state).
SSO allows the active and standby routers to share firewall session state information so that each router has enough information to become the active router at any time. To configure Stateful Failover for the Cisco IOS Firewall, a network administrator should enable HSRP, assign a virtual IP (VIP) address, and enable the SSO protocol.
Note: High Availability Stateful Failover supports only Cisco IOS Classic Firewall and does not support Cisco IOS Zone-Based Firewall.
Enabling HSRP: IP Redundancy and a Virtual IP Address
HSRP provides two services-IP redundancy and a VIP address. Each HSRP group can provide either or both of these services. Cisco IOS Firewall Stateful Failover uses the IP redundancy services from only one HSRP standby group. It can use the VIP address from one or more HSRP groups. Use the following guidelines to configure HSRP on the outside and inside interfaces of the router.
• Both the inside (private) and outside (public) interfaces must belong to separate HSRP groups, but the HSRP group number can be the same.
• The state of the inside and outside interfaces must be the same -- both interfaces must be in the active state or standby state; otherwise, the packets will not have a route out of the private network.
• Standby priorities should be equal on both active and standby routers. If the priorities are not equal, the higher-priority router will unnecessarily take over as the active router, negatively affecting uptime.
• The interface access control list (ACL) should allow HSRP traffic to flow through.
Each time an active device relinquishes control to become the standby device, the active device reloads. This function helps ensure that the state of the new standby device synchronizes correctly with the new active device.
SSO: Interacting Between the Cisco IOS Firewall Session
SSO is a method of providing redundancy and synchronization for many Cisco IOS Software applications and features. It is necessary for the Cisco IOS Firewall to learn about the redundancy state of the network and to synchronize its internal application state with its redundant peers.
Prerequisites: The HSRP should be configured before enabling SSO.
Prerequisites and Restrictions for Stateful Failover
• This document assumes that you have a complete Cisco IOS Firewall configuration on both active and standby routers.
• The Cisco IOS Firewall configuration that is set up on the active device must be duplicated on the standby device, including firewall protocols inspected, the interface ACLs, the global firewall settings, and the interface firewall configuration.
• Both the active and standby devices must run the identical version of the Cisco IOS Software, and both the active and standby devices must be connected through a hub or switch.
• HSRP requires the inside interface to be connected through LANs.
• The active and standby Cisco IOS Software routers must be running the same Cisco IOS Software release: Release 12.4(6) T or later.
• Stateful Failover for the Cisco IOS Firewall requires that your network contains two identical routers that are available to be either the primary or secondary device. Both routers should be the same type of device, and they should have the same CPU and memory.
Supported Deployment Scenarios: Stateful Failover for the Cisco IOS Firewall
It is recommended that you implement Stateful Failover in one of the following deployment scenarios:
• Dual-LAN interface
• LAN-WAN interface
In a dual-LAN-interface scenario, the active and standby routers running the firewall are connected to each other through a LAN interface on both the inside and outside (Figure 1).
HSRP is configured on both the inside and outside interfaces. The next-hop routers in this scenario talk to the High Availability pair through the virtual IP address. In this scenario there are two virtual IP addresses, one on the inside and the other on the outside.
Virtual IP addresses cannot be advertised using routing protocols. You need to create static routes on the next hops to get to the virtual IP address.
Figure 1. Dual-Interface Network Topology
In a LAN-WAN scenario, the inside interface of the active standby pair running the firewall is connected through a LAN interface on the inside and a WAN interface on the outside (Figure 2). HSRP is configured on the inside interface. The inside network communicates with the High Availability pair using the inside virtual IP address.
You should configure HSRP tracking on the inside LAN interfaces to track the state of the outside WAN interface. If the outside WAN interface goes down on the active router, the LAN interface that is tracking it reduces the HSRP priority and initiates a failover to the standby router. Traffic from the outside flowing into the HSRP pair should now be directed to the new active device.
In the scenario where the LAN interfaces track the WAN interfaces, the failover to the standby router happens immediately. However, for traffic to start flowing on the new active router, routing convergence needs to happen. The net failover time is dictated by the routing protocol.
Figure 2. LAN WAN Network Topology
How to Configure Stateful Failover for Cisco IOS Firewalls
Configuration tasks for Stateful Failover include:
• Enabling HSRP: IP Redundancy and a Virtual IP Address
• Enabling SSO
• Enabling Stateful Failover for a Cisco IOS Firewall
• Configuring the Cisco IOS Classic Firewall High Availability Update Interval
Enabling HSRP: IP Redundancy and a Virtual IP Address
Use the following commands to enable HSRP on both interfaces of each router (Table 1):
2. configure terminal
3. interface type number
4. standby standby-group-number name standby-group-name
Configures an interface type for the router and enters interface configuration mode
standby standby-group-number name standby-group-name
Router(config-if)# standby 1 name HA-out
Assigns a user-defined group name to the HSRP redundancy group
Note: The standby-group-number argument should be the same for both routers that are on directly connected interfaces. However, the standby-group-name argument should be different between two (or more) groups on the same router.
The standby-group-number argument can be the same on the other pair of interfaces as well.
standby standby-group-numberip ip-address
Router(config-if)# standby 1 ip 126.96.36.199
Assigns an IP address that is to be "shared" among the members of the HSRP group and owned by the primary IP address
Note: The virtual IP address must be configured identically on both routers (active and standby) that are on directly connected interfaces.
standby standby-group-numbertrack interface-name
Router(config-if)# standby 1 track Ethernet1/0
Configures HSRP to monitor the second interface so that if either of the two interfaces goes down, HSRP causes failover to the standby device
Note: Although this command is not required, it is recommended for dual-interface configurations.
standby [group-number] preempt
Router(config-if)# standby 1 preempt
Enables the active device to relinquish control because of an interface tracking event
Defines at least one local IP address that is used to communicate with the redundant peer
The local IP addresses must match the remote IP addresses on the peer router. There can be either one or two IP addresses, which must be in the global Virtual Route Forwarding (VRF) process. A virtual IP address cannot be used.