Usage Guidelines
You can use the failover exec command to send commands to a specific unit in a failover pair.
Because configuration commands are replicated from the active unit or context to the standby unit or context, you can use
the failover exec command to enter configuration commands on the correct unit, no matter which unit you are logged in to. For example, if you
are logged in to the standby unit, you can use the failover exec active command to send configuration changes to the active unit. Those changes are then replicated to the standby unit. Do not use
the failover exec command to send configuration commands to the standby unit or context; those configuration changes are not replicated to
the active unit and the two configurations will no longer be synchronized.
Output from configuration, exec, and show commands is displayed in the current terminal session, so you can use the failover exec command to issue show commands on a peer unit and view the results in the current terminal.
You must have sufficient privileges to execute a command on the local unit to execute the command on the peer unit.
Command Modes
The failover exec command maintains a command mode state that is separate from the command mode of your terminal session. By default, the failover exec command mode is global configuration mode for the specified device. You can change that command mode by sending the appropriate
command (such as the interface command) using the failover exec command.
Changing failover exec command modes for the specified device does not change the command mode for the session that you are using to access the
device. For example, if you are logged in to the active unit of a failover pair, and you issue the following command in global
configuration mode, you will remain in global configuration mode, but any commands sent using the failover exec command will be executed in interface configuration mode:
ciscoasa(config)# failover exec interface GigabitEthernet0/1
ciscoasa(config)#
Changing commands modes for your current session to the device does not affect the command mode used by the failover exec command. For example, if you are in interface configuration mode on the active unit, and you have not changed the failover exec command mode, the following command would be executed in global configuration mode:
ciscoasa(config-if)# failover exec active router ospf 100
ciscoasa(config-if)#
Use the show failover exec command to display the command mode on the specified device in which commands sent with the failover exec command are executed.
Security Considerations
The failover exec command uses the failover link to send commands to and receive the output of the command execution from the peer unit. You
should use the failover key command to encrypt the failover link to prevent eavesdropping or man-in-the-middle attacks.
Limitations
-
If you upgrade one unit using the zero-downtime upgrade procedure and not the other, both units must be running software that
supports the failover exec command for the command to work.
-
Command completion and context help are not available for the commands in the cmd_string argument.
-
In multiple context mode, you can only send commands to the peer context on the peer unit. To send commands to a different
context, you must first change to that context on the unit you are logged in to.
-
You cannot use the following commands with the
failover
exec command:
-
changeto
-
debug
(undebug )
-
If the standby unit is in the failed state, it can still receive commands from the failover exe c command if the failure is due to a service card failure; otherwise, the remote command execution will fail.
-
You cannot use the failover exec command to switch from privileged EXEC mode to global configuration mode on the failover peer. For example, if the current
unit is in privileged EXEC mode, and you enter the failover exec mate configure terminal command, the show failover exec mate command output will show that the failover exec session is in global configuration mode. However, entering configuration
commands for the peer unit using the failover exec command will fail until you enter global configuration mode on the current unit.
-
You cannot enter recursive failover exec commands, such as the failover exec mate failover exec mate command.
-
Commands that require user input or confirmation must use the /nonconfirm option.
Examples
The following example shows how to use the failover exec command to display failover information on the active unit. The unit on which the command is executed is the active unit,
so the command is executed locally.
ciscoasa(config)# failover exec active show failover
Failover On
Failover unit Primary
Failover LAN Interface: failover GigabitEthernet0/3 (up)
Unit Poll frequency 1 seconds, holdtime 3 seconds
Interface Poll frequency 3 seconds, holdtime 15 seconds
Interface Policy 1
Monitored Interfaces 2 of 250 maximum
Version: Ours 8.0(2), Mate 8.0(2)
Last Failover at: 09:31:50 jst May 2 2004
This host: Primary - Active
Active time: 2483 (sec)
slot 0: ASA5520 hw/sw rev (1.0/8.0(2)) status (Up Sys)
admin Interface outside (192.168.5.101): Normal
admin Interface inside (192.168.0.1): Normal
slot 1: ASA-SSM-20 hw/sw rev (1.0/) status (Up/Up)
Other host: Secondary - Standby Ready
Active time: 0 (sec)
slot 0: ASA5520 hw/sw rev (1.0/8.0(2)) status (Up Sys)
admin Interface outside (192.168.5.111): Normal
admin Interface inside (192.168.0.11): Normal
slot 1: ASA-SSM-20 hw/sw rev (1.0/) status (Up/Up)
Stateful Failover Logical Update Statistics
Link : failover GigabitEthernet0/3 (up)
Stateful Obj xmit xerr rcv rerr
General 328 0 328 0
sys cmd 329 0 329 0
up time 0 0 0 0
RPC services 0 0 0 0
TCP conn 0 0 0 0
UDP conn 0 0 0 0
ARP tbl 0 0 0 0
Xlate_Timeout 0 0 0 0
Logical Update Queue Information
Cur Max Total
Recv Q: 0 1 329
Xmit Q: 0 1 329
ciscoasa(config)#
The following example uses the failover exec command to display the failover status of the peer unit. The command is executed on the the primary unit, which is the active
unit, so the information displayed is from the secondary, standby unit.
ciscoasa(config)# failover exec mate show failover
Failover On
Failover unit Secondary
Failover LAN Interface: failover GigabitEthernet0/3 (up)
Unit Poll frequency 1 seconds, holdtime 3 seconds
Interface Poll frequency 3 seconds, holdtime 15 seconds
Interface Policy 1
Monitored Interfaces 2 of 250 maximum
Version: Ours 8.0(2), Mate 8.0(2)
Last Failover at: 09:19:59 jst May 2 2004
This host: Secondary - Standby Ready
Active time: 0 (sec)
slot 0: ASA5520 hw/sw rev (1.0/8.0(2)) status (Up Sys)
admin Interface outside (192.168.5.111): Normal
admin Interface inside (192.168.0.11): Normal
slot 1: ASA-SSM-20 hw/sw rev (1.0/) status (Up/Up)
Other host: Primary - Active
Active time: 2604 (sec)
slot 0: ASA5520 hw/sw rev (1.0/8.0(2)) status (Up Sys)
admin Interface outside (192.168.5.101): Normal
admin Interface inside (192.168.0.1): Normal
slot 1: ASA-SSM-20 hw/sw rev (1.0/) status (Up/Up)
Stateful Failover Logical Update Statistics
Link : failover GigabitEthernet0/3 (up)
Stateful Obj xmit xerr rcv rerr
General 344 0 344 0
sys cmd 344 0 344 0
up time 0 0 0 0
RPC services 0 0 0 0
TCP conn 0 0 0 0
UDP conn 0 0 0 0
ARP tbl 0 0 0 0
Xlate_Timeout 0 0 0 0
Logical Update Queue Information
Cur Max Total
Recv Q: 0 1 344
Xmit Q: 0 1 344
The following example uses the failover exec command to display the failover configuration of the failover peer. The command is executed on the primary unit, which is
the active unit, so the information displayed is from the secondary, standby unit.
ciscoasa(config)# failover exec mate show running-config failover
failover
failover lan interface failover GigabitEthernet0/3
failover polltime unit 1 holdtime 3
failover polltime interface 3 holdtime 15
failover link failover GigabitEthernet0/3
failover interface ip failover 10.0.5.1 255.255.255.0 standby 10.0.5.2
ciscoasa(config)#
The following example uses the failover exec command to create a context on the active unit from the standby unit. The command is replicated from the active unit back
to the standby unit. Note the two “Creating context...” messages. One is from the failover exec command output from the peer unit when the context is created, and the other is from the local unit when the replicated command
creates the context locally.
ciscoasa(config)# show context
Context Name Class Interfaces URL
*admin default GigabitEthernet0/0, disk0:/admin.cfg
GigabitEthernet0/1
Total active Security Contexts: 1
! The following is executed in the system execution space on the standby unit.
ciscoasa(config)# failover exec active context text
Creating context 'text'... Done. (2)
Creating context 'text'... Done. (3)
ciscoasa(config)# show context
Context Name Class Interfaces URL
*admin default GigabitEthernet0/0, disk0:/admin.cfg
GigabitEthernet0/1
text default (not entered)
Total active Security Contexts: 2
The following example shows the warning that is returned when you use the failover exec command to send configuration commands to a failover peer in the standby state:
ciscoasa# failover exec mate static (inside,outside) 192.168.5.241 192.168.0.241
**** WARNING ****
Configuration Replication is NOT performed from Standby unit to Active unit.
Configurations are no longer synchronized.
ciscoasa(config)#
The following example uses the failover exec command to send the show interface command to the standby unit:
ciscoasa(config)# failover exec standby show interface
Interface GigabitEthernet0/0 "outside", is up, line protocol is up
Hardware is i82546GB rev03, BW 1000 Mbps
Auto-Duplex(Half-duplex), Auto-Speed(100 Mbps)
MAC address 000b.fcf8.c290, MTU 1500
IP address 192.168.5.111, subnet mask 255.255.255.0
216 packets input, 27030 bytes, 0 no buffer
Received 2 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 L2 decode drops
284 packets output, 32124 bytes, 0 underruns
0 output errors, 0 collisions
0 late collisions, 0 deferred
input queue (curr/max blocks): hardware (0/0) software (0/0)
output queue (curr/max blocks): hardware (0/1) software (0/0)
Traffic Statistics for "outside":
215 packets input, 23096 bytes
284 packets output, 26976 bytes
0 packets dropped
1 minute input rate 0 pkts/sec, 21 bytes/sec
1 minute output rate 0 pkts/sec, 23 bytes/sec
1 minute drop rate, 0 pkts/sec
5 minute input rate 0 pkts/sec, 21 bytes/sec
5 minute output rate 0 pkts/sec, 24 bytes/sec
5 minute drop rate, 0 pkts/sec
Interface GigabitEthernet0/1 "inside", is up, line protocol is up
Hardware is i82546GB rev03, BW 1000 Mbps
Auto-Duplex(Half-duplex), Auto-Speed(10 Mbps)
MAC address 000b.fcf8.c291, MTU 1500
IP address 192.168.0.11, subnet mask 255.255.255.0
214 packets input, 26902 bytes, 0 no buffer
Received 1 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 L2 decode drops
215 packets output, 27028 bytes, 0 underruns
0 output errors, 0 collisions
0 late collisions, 0 deferred
input queue (curr/max blocks): hardware (0/0) software (0/0)
output queue (curr/max blocks): hardware (0/1) software (0/0)
Traffic Statistics for "inside":
214 packets input, 23050 bytes
215 packets output, 23140 bytes
0 packets dropped
1 minute input rate 0 pkts/sec, 21 bytes/sec
1 minute output rate 0 pkts/sec, 21 bytes/sec
1 minute drop rate, 0 pkts/sec
5 minute input rate 0 pkts/sec, 21 bytes/sec
5 minute output rate 0 pkts/sec, 21 bytes/sec
5 minute drop rate, 0 pkts/sec
Interface GigabitEthernet0/2 "failover", is up, line protocol is up
Hardware is i82546GB rev03, BW 1000 Mbps
Auto-Duplex(Full-duplex), Auto-Speed(100 Mbps)
Description: LAN/STATE Failover Interface
MAC address 000b.fcf8.c293, MTU 1500
IP address 10.0.5.2, subnet mask 255.255.255.0
1991 packets input, 408734 bytes, 0 no buffer
Received 1 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 L2 decode drops
1835 packets output, 254114 bytes, 0 underruns
0 output errors, 0 collisions
0 late collisions, 0 deferred
input queue (curr/max blocks): hardware (0/0) software (0/0)
output queue (curr/max blocks): hardware (0/2) software (0/0)
Traffic Statistics for "failover":
1913 packets input, 345310 bytes
1755 packets output, 212452 bytes
0 packets dropped
1 minute input rate 1 pkts/sec, 319 bytes/sec
1 minute output rate 1 pkts/sec, 194 bytes/sec
1 minute drop rate, 0 pkts/sec
5 minute input rate 1 pkts/sec, 318 bytes/sec
5 minute output rate 1 pkts/sec, 192 bytes/sec
5 minute drop rate, 0 pkts/sec
.
.
.
The following example shows the error message returned when issuing an illegal command to the peer unit:
ciscoasa# failover exec mate bad command
bad command
^
ERROR: % Invalid input detected at '^' marker.
The following example shows the error message that is returned when you use the failover exec command when failover is disabled:
ciscoasa(config)# failover exec mate show failover
ERROR: Cannot execute command on mate because failover is disabled