Thursday, July 6, 2017

Configuration Sync Failure Between a Cisco ASA Active and Standby Firewall

I had an issue wherein a Standby firewall was unable to sync its configuration with the Active firewall. But when I further checked, the Active firewall's running config got replicated to the Standby firewall even with the error displayed. There's no IOS bug when I consulted with Cisco TAC. A quick fix to this problem is just to reboot the firewall pair in order to restart the synchronization process starting with the Standby and then the Active.


ciscoasa/pri/stby# show version

Cisco Adaptive Security Appliance Software Version 9.1(3)
Device Manager Version 7.1(3)

ciscoasa/pri/stby#
    Unable to sync configuration from Active
.

    Detected an Active mate


ciscoasa/pri/stby# show failover
Failover On
Failover unit Primary
Failover LAN Interface: folink GigabitEthernet0/7 (up)
Unit Poll frequency 1 seconds, holdtime 15 seconds
Interface Poll frequency 5 seconds, holdtime 25 seconds
Interface Policy 1
Monitored Interfaces 6 of 216 maximum
Version: Ours 9.1(3), Mate 9.1(3)
Last Failover at: 14:39:20 UTC May 15 2017
    This host: Primary - Sync Config
        Active time: 0 (sec)
        slot 0: ASA5525 hw/sw rev (1.0/9.1(3)) status (Up Sys)

<SNIP>

    Other host: Secondary - Active
        Active time: 36400816 (sec)
        slot 0: ASA5525 hw/sw rev (1.0/9.1(3)) status (Up Sys)


ciscoasa/pri/stby# show failover state

               State          Last Failure Reason      Date/Time
This host  -   Primary
               Sync Config    None
Other host -   Secondary
               Active         None

====Configuration State===
====Communication State===


ciscoasa/pri/stby# show failover history
==========================================================================
From State                 To State                   Reason
==========================================================================
02:50:54 UTC May 19 2017
Negotiation                Cold Standby               Detected an Active mate

02:50:56 UTC May 19 2017
Cold Standby               Sync Config                Detected an Active mate

02:52:58 UTC May 19 2017
Sync Config                Negotiation                HA state progression failed

02:53:00 UTC May 19 2017
Negotiation                Cold Standby               Detected an Active mate

02:53:02 UTC May 19 2017
Cold Standby               Sync Config                Detected an Active mate

02:55:04 UTC May 19 2017
Sync Config                Negotiation                HA state progression failed


The firewall sub-interface status were also down.

ciscoasa/pri/stby# show interface ip br ief
Interface                  IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0         unassigned      YES unset  up                    up 
GigabitEthernet0/0.6      10.4.0.5      YES CONFIG down                  down


Below were the troubleshooting done on the Secondary ASA device which is currently acting as the Active firewall.


ciscoasa/sec/act# show version

Cisco Adaptive Security Appliance Software Version 9.1(3)
Device Manager Version 7.1(3)


ciscoasa/sec/act# write standby
Building configuration...

Config replication in progress.... Please try later
[FAILED]

ssh: Write standby failure Case 1

ciscoasa/sec/act# show failover state

               State          Last Failure Reason      Date/Time
This host  -   Secondary
               Active         None
Other host -   Primary
               Sync Config    Comm Failure             02:41:03 UTC May 15 2017

====Configuration State===
        Config Syncing
        Sync Done - STANDBY
====Communication State===


I reload the Standby unit first but it was still unable to sync with the Active unit.


ciscoasa/pri/stby# reload
System config has been modified. Save? [Y]es/[N]o: 
Cryptochecksum: 3cf4b55b c90b56ed 2ef4ec53 2a982127

46859 bytes copied in 0.660 secs
Proceed with reload? [confirm] 


***
*** --- START GRACEFUL SHUTDOWN ---
Shutting down isakmp
Shutting down webvpn
Shutting down sw-module
Shutting down License Controller
Shutting down File system


***
*** --- SHUTDOWN NOW ---
Process shutdown finished
Rebooting.....
Cisco BIOS Version:9B2C109A
Build Date:05/15/2013 16:34:44

<SNIP>

ciscoasa/pri/stby# show failover
Failover On
Failover unit Primary
Failover LAN Interface: folink GigabitEthernet0/7 (up)
Unit Poll frequency 1 seconds, holdtime 15 seconds
Interface Poll frequency 5 seconds, holdtime 25 seconds
Interface Policy 1
Monitored Interfaces 6 of 216 maximum
Version: Ours 9.1(3), Mate 9.1(3)
Last Failover at: 03:04:11 UTC May 23 2017
    This host: Primary - Sync Config
        Active time: 0 (sec)
        slot 0: ASA5525 hw/sw rev (1.0/9.1(3)) status (Up Sys)
    
<OUTPUT TRUNCATED>

    Other host: Secondary - Active
        Active time: 36746504 (sec)
        slot 0: ASA5525 hw/sw rev (1.0/9.1(3)) status (Up Sys)

<OUTPUT TRUNCATED>

    Unable to sync configuration from Active
.

    Detected an Active mate


I've reload the Active unit remotely but got stuck with the GRACEFUL SHUTDOWN output. I tried to do a force reload but got stuck with the SHUTDOWN NOW output.


ciscoasa/sec/act# reload
Proceed with reload? [confirm]

***
*** --- START GRACEFUL SHUTDOWN ---          

ciscoasa/sec/act# show reload
No reload is scheduled.

ciscoasa/sec/act# reload noconfirm
ciscoasa/sec/act# show reload
No reload is scheduled.

ciscoasa/sec/act# reload ?

  at             Reload at a specific time/date
  cancel         Cancel a scheduled reload
  in             Reload after a time interval
  max-hold-time  Maximum hold time for orderly reload
  noconfirm      Reload without asking for confirmation
  quick          Quick reload without properly shutting down each subsystem
  reason         Reason for reload
  save-config    Save configuration before reload
  <cr>

ciscoasa/sec/act# reload quick ?

  at             Reload at a specific time/date
  in             Reload after a time interval
  max-hold-time  Maximum hold time for orderly reload
  noconfirm      Reload without asking for confirmation
  reason         Reason for reload
  save-config    Save configuration before reload
  <cr>

ciscoasa/sec/act# reload quick noconfirm

***
*** --- SHUTDOWN NOW ---

My remote out-of-band (OOB) console session got stuck on this output so I did a 'hard' reload on the Active firewall. After the 'hard' reload on the Secondary Active firewall, the network traffic failover to the Primary firewall. The Primary firewall also took over the Active role. I was also able to issue a write standby on the Active firewall and the configuration was automatically sync'd to the Standby firewall. I ran some debugs to capture synchronization and replication messages.

ciscoasa/pri/stby# debug fover cable
ciscoasa/pri/stby# debug fover sync
fover event trace on
ciscoasapri/stby# fover_health_monitoring_thread: fover_lan_check() Failover LAN Check

    Unable to sync configuration from Active
.

    No Active mate detected

    Switching to Active
Failover LAN Failed


ciscoasa/pri/act#
Failover LAN became OK
Switchover enabled

Beginning configuration replication: Sending to mate.
fover_rep: frep_write_one_cmd: Cmd: :
fover_rep: frep_write_one_cmd: Cmd:  Written by enable_1 at
fover_rep: frep_write_one_cmd: Cmd: 03:28:34.147 UTC Tue May 23 2017
fover_rep: frep_write_one_cmd: Cmd: !
fover_rep: frep_write_one_cmd: Cmd: ASA Version 9.1(3)
fover_rep: frep_write_one_cmd: Cmd: ASA Version 9.1(3)
fover_rep: frep_write_one_cmd: Cmd: !


<OUTPUT TRUNCATED>


ciscoasa/pri/act# show failover
Failover On
Failover unit Primary
Failover LAN Interface: folink GigabitEthernet0/7 (up)
Unit Poll frequency 1 seconds, holdtime 15 seconds
Interface Poll frequency 5 seconds, holdtime 25 seconds
Interface Policy 1
Monitored Interfaces 6 of 216 maximum
Version: Ours 9.1(3), Mate 9.1(3)
Last Failover at: 03:23:56 UTC May 23 2017
    This host: Primary - Active
        Active time: 575 (sec)
       
<OUTPUT TRUNCATED>

    Other host: Secondary - Standby Ready
        Active time: 0 (sec)
        slot 0: ASA5525 hw/sw rev (1.0/9.1(3)) status (Up Sys)


ciscoasa/pri/act# show failover state

               State          Last Failure Reason      Date/Time
This host  -   Primary
               Active         None
Other host -   Secondary
               Standby Ready  Comm Failure             03:24:11 UTC May 23 2017

====Configuration State===
    Sync Done
====Communication State===
    Mac set


ciscoasa/pri/act# write standby
Building configuration...
[OK]
ciscoasa/pri/act# Beginning configuration replication: Sending to mate.
End Configuration Replication to mate


ciscoasa/sec/stby# show version

Cisco Adaptive Security Appliance Software Version 9.1(3)
Device Manager Version 7.1(3)

Compiled on Mon 16-Sep-13 16:07 PDT by builders
System image file is "disk0:/asa913-smp-k8.bin"
Config file at boot was "startup-config"

ciscoasa up 3 mins 18 secs
failover cluster up 27 mins 22 secs

<OUTPUT TRUNCATED>


ciscoasa/sec/stby# show failover
Failover On
Failover unit Secondary
Failover LAN Interface: folink GigabitEthernet0/7 (up)
Unit Poll frequency 1 seconds, holdtime 15 seconds
Interface Poll frequency 5 seconds, holdtime 25 seconds
Interface Policy 1
Monitored Interfaces 6 of 216 maximum
Version: Ours 9.1(3), Mate 9.1(3)
Last Failover at: 03:28:18 UTC May 23 2017
    This host: Secondary - Standby Ready
        Active time: 0 (sec)
        slot 0: ASA5525 hw/sw rev (1.0/9.1(3)) status (Up Sys)
 
<OUTPUT TRUNCATED>

    Other host: Primary - Active
        Active time: 462 (sec)
        slot 0: ASA5525 hw/sw rev (1.0/9.1(3)) status (Up Sys)


The sub-interface on the Standby firewall also went UP.

ciscoasa/sec/stby# show interface ip brief
Interface                  IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0         unassigned      YES unset  up                    up 
GigabitEthernet0/0.6      10.4.0.6      YES CONFIG up                    up 

Thursday, June 8, 2017

Zero Downtime Upgrade on a Cisco ASA Active-Standby Firewall Pair

Below is a summary of the steps in order to perform a zero downtime upgrade on a Cisco ASA Active/Standby firewall pair.

1) TFTP the ASA image (and ASDM) on both ASA firewalls.

2) Change the boot variable on the Active ASA (ASA1).

3) Save the config by issuing a write memory on ASA1.

4) On the Active ASA (ASA1) issue the failover reload-standby command to reboot ASA2.

5) Wait for ASA2 to reboot and sync its configuration.

6) Issue the no failover active command on the Active ASA (ASA1)

7) SSH into the new Active ASA (ASA2) and issue the failover reload-standby to reboot ASA1.

8) Wait for ASA1 to reboot and sync its configuration.

9) Issue the no failover active command on the Active ASA (ASA2)


So I've TFTP'd first the image and ASDM on both the ASA firewalls using the copy tftp flash (or copy tftp disk0) command.

ASA1/pri/act# copy tftp://asa944-2-smp-k8.bin disk0:/asa944-2-smp-k8.bin

Address or name of remote host [172.27.25.254]?

Source filename [asa944-2-smp-k8.bin]?

Destination filename [asa944-2-smp-k8.bin?

Accessing tftp://172.27.25.254/asa944-2-smp-k8.bin...!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

<OUTPUT TRUNCATED>

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
24827904 bytes copied in 9477.840 secs (2619 bytes/sec)

ASA1/pri/act# failover ?

  active          Make this system to be the active unit of the failover pair
  exec            Execute command on the designated unit
  reload-standby  Force standby unit to reboot
  reset           Force an unit or failover group to an unfailed state
ciscoasa/pri/act# failover exec ?

  active   Execute command on the active unit
  mate     Execute command on the peer unit
  standby  Execute command on the standby unit
ciscoasa1/pri/act# failover exec mate ?

  LINE  Command String

ASA1/pri/act# failover exec mate dir      // CHECK THE DIRECTORY AND FILES ON ASA2 FLASH

Directory of disk0:/

11     drwx  4096         14:59:42 Aug 28 2014  log
22     drwx  4096         15:00:10 Aug 28 2014  crypto_archive
25     drwx  4096         15:00:18 Aug 28 2014  coredumpinfo
45     -rwx  38191104     15:02:16 Aug 28 2014  asa912-smp-k8.bin
46     -rwx  18097844     15:03:48 Aug 28 2014  asdm-713.bin
47     drwx  4096         09:53:44 Jan 23 2015  tmp
48     -rwx  100          10:12:26 Jan 23 2015  upgrade_startup_errors_201501231012.log
49     -rwx  12998641     15:06:32 Aug 28 2014  csd_3.5.2008-k9.pkg
50     drwx  4096         15:06:34 Aug 28 2014  sdesktop
51     -rwx  6487517      15:06:34 Aug 28 2014  anyconnect-macosx-i386-2.5.2014-k9.pkg
52     -rwx  6689498      15:06:36 Aug 28 2014  anyconnect-linux-2.5.2014-k9.pkg
53     -rwx  4678691      15:06:36 Aug 28 2014  anyconnect-win-2.5.2014-k9.pkg
54     -rwx  100          10:22:20 Jan 23 2015  upgrade_startup_errors_201501231022.log
55     -rwx  100          10:29:06 Jan 23 2015  upgrade_startup_errors_201501231029.log
23     drwx  4096         10:56:34 Jan 23 2015  snmp
56     -rwx  100          12:05:07 Mar 15 2017  upgrade_startup_errors_201703151205.log

ASA1/pri/act# failover exec mate copy /noconfirm tftp://172.27.25.254/asa944-2-smp-k8.bin disk0:/asa944-2-smp-k8.bin
Connection closed by foreign host.       // NO TFTP TRANSFER SEEN ON 3CDAEMON EVEN WHEN ASA1 WAS DISCONNECTED


The remote access to ASA1 (Active) was disconnected and TFTP wasn't successful using the failover exec mate copy command. So I SSH directly to AS2 management IP address and used the copy tftp flash command instead.

ASA2/sec/stby# copy tftp://172.27.25.254/asa944-2-smp-k8.bin disk0:/asa944-2-smp-k8.bin

Address or name of remote host [172.27.25.254]?

Source filename [asa944-2-smp-k8.bin]?

Destination filename [asa944-2-smp-k8.bin]?

Accessing tftp://172.27.25.254/asa944-2-smp-k8.bin...!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


<OUTPUT TRUNCATED>


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
24827904 bytes copied in 9496.960 secs (2614 bytes/sec)

ASA1/pri/act# failover exec standby dir      // YOU CAN EITHER USE KEYWORD mate OR standby

Directory of disk0:/

11     drwx  4096         14:59:42 Aug 28 2014  log
22     drwx  4096         15:00:10 Aug 28 2014  crypto_archive
25     drwx  4096         15:00:18 Aug 28 2014  coredumpinfo
45     -rwx  38191104     15:02:16 Aug 28 2014  asa912-smp-k8.bin
46     -rwx  18097844     15:03:48 Aug 28 2014  asdm-713.bin
47     drwx  4096         09:53:44 Jan 23 2015  tmp
48     -rwx  100          10:12:26 Jan 23 2015  upgrade_startup_errors_201501231012.log
49     -rwx  12998641     15:06:32 Aug 28 2014  csd_3.5.2008-k9.pkg
50     drwx  4096         15:06:34 Aug 28 2014  sdesktop
51     -rwx  6487517      15:06:34 Aug 28 2014  anyconnect-macosx-i386-2.5.2014-k9.pkg
52     -rwx  6689498      15:06:36 Aug 28 2014  anyconnect-linux-2.5.2014-k9.pkg
53     -rwx  4678691      15:06:36 Aug 28 2014  anyconnect-win-2.5.2014-k9.pkg
54     -rwx  100          10:22:20 Jan 23 2015  upgrade_startup_errors_201501231022.log
55     -rwx  100          10:29:06 Jan 23 2015  upgrade_startup_errors_201501231029.log
23     drwx  4096         10:56:34 Jan 23 2015  snmp
56     -rwx  100          12:05:07 Mar 15 2017  upgrade_startup_errors_201703151205.log
125    -rwx  73635840     22:49:24 Mar 17 2017  asa944-2-smp-k8.bin
126    -rwx  26729944     03:25:37 Mar 18 2017  asdm-771-150.bin


Below are the failover and current boot variable config.

ASA1/act/pri#  show run failover
failover
failover lan unit primary
failover lan interface folink GigabitEthernet0/2
failover key cisco
failover link folink GigabitEthernet0/2
failover interface ip folink 192.168.1.1 255.255.255.252 standby 192.168.1.2

ASA1/act/pri# show run boot
boot system disk0:/asa912-smp-k8.bin

ASA1/act/pri# show run asdm
asdm image disk0:/asdm-713.bin
no asdm history enable


I needed to upgrade the ASA pair to 9.4(4) image and ASDM 7.7.1.

ASA1/act/pri# dir

Directory of disk0:/

11     drwx  4096         14:59:42 Aug 28 2014  log
22     drwx  4096         15:00:10 Aug 28 2014  crypto_archive
25     drwx  4096         15:00:18 Aug 28 2014  coredumpinfo
45     -rwx  38191104     15:02:16 Aug 28 2014  asa912-smp-k8.bin
46     -rwx  18097844     15:03:48 Aug 28 2014  asdm-713.bin
47     drwx  4096         09:53:44 Jan 23 2015  tmp
48     -rwx  100          10:12:26 Jan 23 2015  upgrade_startup_errors_201501231012.log
49     -rwx  12998641     15:06:32 Aug 28 2014  csd_3.5.2008-k9.pkg
50     drwx  4096         15:06:34 Aug 28 2014  sdesktop
51     -rwx  6487517      15:06:34 Aug 28 2014  anyconnect-macosx-i386-2.5.2014-k9.pkg
52     -rwx  6689498      15:06:36 Aug 28 2014  anyconnect-linux-2.5.2014-k9.pkg
53     -rwx  4678691      15:06:36 Aug 28 2014  anyconnect-win-2.5.2014-k9.pkg
54     -rwx  100          10:22:20 Jan 23 2015  upgrade_startup_errors_201501231022.log
55     -rwx  100          10:29:06 Jan 23 2015  upgrade_startup_errors_201501231029.log
23     drwx  4096         10:56:34 Jan 23 2015  snmp
56     -rwx  100          12:05:07 Mar 15 2017  upgrade_startup_errors_201703151205.log
125    -rwx  73635840     22:49:24 Mar 17 2017  asa944-2-smp-k8.bin
126    -rwx  26729944     03:25:37 Mar 18 2017  asdm-771-150.bin         // TFTP TRANSFER OF ASDM IMAGE WASN'T SHOWN.

8238202880 bytes total (8049881088 bytes free)


Change the boot variable using the boot system and asdm image commands.

ASA1/act/pri# configure terminal
ASA1/act/pri(config)# no boot system disk0:/asa912-smp-k8.bin
ASA1/act/pri(config)# no asdm image disk0:/asdm-713.bin
ASA1/act/pri(config)# boot system disk0:/asa944-2-smp-k8.bin
ASA1/act/pri(config)# asdm image disk0:/asdm-771-150.bin
ASA1/act/pri(config)# end
ASA1/act/pri# write memory
Building configuration...
Cryptochecksum: aeb34eaf d1e8a03e 39884930 0d00e844

7125 bytes copied in 0.720 secs
[OK]


Issue a failover reload-standby command on ASA1 (Active) to reboot the ASA2 (Standby) firewall. A log message will display that the mate (ASA2) image version is not identical with ASA1 (Active). You can verify the new image (and ASDM) on ASA2 by issuing failover exec mate show version on ASA1.

ASA1/act/pri# failover reload-standby


<OUTPUT TRUNCATED>


ASA1/act/pri#
************WARNING****WARNING****WARNING********************************
   Mate version 9.4(4)2 is not identical with ours 9.1(2)
************WARNING****WARNING****WARNING********************************
Beginning configuration replication: Sending to mate.
End Configuration Replication to mate       

ASA1/act/pri# failover exec mate show version

Cisco Adaptive Security Appliance Software Version 9.4(4)2
Device Manager Version 7.7(1)150

Compiled on Thu 16-Feb-17 09:09 PST by builders
System image file is "disk0:/asa944-2-smp-k8.bin"
Config file at boot was "startup-config"

ASA2 up 4 mins 41 secs
failover cluster up 4 days 7 hours


<OUTPUT TRUNCATED>


ASA1/act/pri# show failover
Failover On
Failover unit Primary
Failover LAN Interface: folink GigabitEthernet0/2 (up)
Unit Poll frequency 1 seconds, holdtime 15 seconds
Interface Poll frequency 5 seconds, holdtime 25 seconds
Interface Policy 1
Monitored Interfaces 1 of 216 maximum
Version: Ours 9.1(2), Mate 9.4(4)2
Last Failover at: 08:38:27 UTC Mar 16 2017
        This host: Primary - Active
                Active time: 371156 (sec)
                slot 0: ASA5525 hw/sw rev (1.0/9.1(2)) status (Up Sys)
                  Interface inside (10.108.12.50): Normal (Monitored)
        Other host: Secondary - Standby Ready
                Active time: 0 (sec)
                slot 0: ASA5525 hw/sw rev (1.0/9.4(4)2) status (Up Sys)
                  Interface inside (10.108.12.51): Normal (Monitored)

Stateful Failover Logical Update Statistics
        Link : folink GigabitEthernet0/2 (up)
        Stateful Obj    xmit       xerr       rcv        rerr
        General         74820      0          39623      0
        sys cmd         39624      0          39623      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         20978      0          0          0
        Xlate_Timeout   0          0          0          0
        IPv6 ND tbl     0          0          0          0
        VPN IKEv1 SA    0          0          0          0
        VPN IKEv1 P2    0          0          0          0
        VPN IKEv2 SA    0          0          0          0
        VPN IKEv2 P2    0          0          0          0
        VPN CTCP upd    0          0          0          0
        VPN SDI upd     0          0          0          0
        VPN DHCP upd    0          0          0          0
        SIP Session     0          0          0          0
        Route Session   14216      0          0          0
        User-Identity   2          0          0          0
        CTS SGTNAME     0          0          0          0
        CTS PAC         0          0          0          0
        TrustSec-SXP    0          0          0          0
        IPv6 Route      0          0          0          0

        Logical Update Queue Information
                        Cur     Max     Total
        Recv Q:         0       15      39625
        Xmit Q:         0       30      217324


ASA1/act/pri# no failover active     // FORCE ASA2 (STANDBY) TO BECOME ACTIVE


<SSH ASA1 AND ASA2 WERE DISCONNECTED>

ASA2/stby/sec#
ASA2/stby/sec# Connection closed by foreign host.


ASA2/stby/pri# show failover
Failover On
Failover unit Primary
Failover LAN Interface: folink GigabitEthernet0/2 (up)
Unit Poll frequency 1 seconds, holdtime 15 seconds
Interface Poll frequency 5 seconds, holdtime 25 seconds
Interface Policy 1
Monitored Interfaces 1 of 216 maximum
Version: Ours 9.1(2), Mate 9.4(4)2
Last Failover at: 02:37:14 UTC Mar 20 2017
        This host: Primary - Standby Ready
                Active time: 371276 (sec)
                slot 0: ASA5525 hw/sw rev (1.0/9.1(2)) status (Up Sys)
                  Interface inside (10.108.12.51): Normal (Monitored)
        Other host: Secondary - Active
                Active time: 80 (sec)
                slot 0: ASA5525 hw/sw rev (1.0/9.4(4)2) status (Up Sys)
                  Interface inside (10.108.12.50): Normal (Monitored)


<OUTPUT TRUNCATED>


ASA2/act/sec# failover reload-standby      // FORCE ASA1 (FORMER ACTIVE) TO REBOOT


ASA2/stby/pri#
************WARNING****WARNING****WARNING********************************
   Mate version 9.4(4)2 is not identical with ours 9.1(2)
************WARNING****WARNING****WARNING********************************

***
*** --- SHUTDOWN NOW ---
***
*** Message to all terminals:
***
***   requested by active unit


ASA2/act/sec#
Beginning configuration replication: Sending to mate.
End Configuration Replication to mate

ASA2/act/sec# failover exec mate show version        // VERIFY ASA1 HAS THE SAME 9.4 AND 7.7 ASDM IMAGE

Cisco Adaptive Security Appliance Software Version 9.4(4)2
Device Manager Version 7.7(1)150

Compiled on Thu 16-Feb-17 09:09 PST by builders
System image file is "disk0:/asa944-2-smp-k8.bin"
Config file at boot was "startup-config"

ASA2 up 2 mins 20 secs
failover cluster up 4 days 7 hours



<OUTPUT TRUNCATED>


ASA2/act/sec# show failover
Failover On
Failover unit Secondary
Failover LAN Interface: folink GigabitEthernet0/2 (up)
Reconnect timeout 0:00:00
Unit Poll frequency 1 seconds, holdtime 15 seconds
Interface Poll frequency 5 seconds, holdtime 25 seconds
Interface Policy 1
Monitored Interfaces 1 of 216 maximum
MAC Address Move Notification Interval not set
Version: Ours 9.4(4)2, Mate 9.4(4)2          // ASA1 AND ASA2 HAVE THE SAME IMAGE
Last Failover at: 02:37:14 UTC Mar 20 2017
        This host: Secondary - Active
                Active time: 1178 (sec)
                slot 0: ASA5525 hw/sw rev (1.0/9.4(4)2) status (Up Sys)
                  Interface inside (10.108.12.50): Normal (Monitored)
        Other host: Primary - Standby Ready
                Active time: 0 (sec)
                slot 0: ASA5525 hw/sw rev (1.0/9.4(4)2) status (Up Sys)
                  Interface inside (10.108.12.51): Normal (Monitored)


<OUTPUT TRUNCATED>


ASA2/act/sec# no failover active        // FORCE ASA1 TO BECOME ACTIVE AGAIN
Connection closed by foreign host

ASA1/act/pri# show version

Cisco Adaptive Security Appliance Software Version 9.4(4)2
Device Manager Version 7.7(1)150

Compiled on Thu 16-Feb-17 09:09 PST by builders
System image file is "disk0:/asa944-2-smp-k8.bin"
Config file at boot was "startup-config"

ASA1 up 10 mins 39 secs
failover cluster up 4 days 7 hours


<OUTPUT TRUNCATED>


ASA1/act/pri# show failover
Failover On
Failover unit Primary
Failover LAN Interface: folink GigabitEthernet0/2 (up)
Reconnect timeout 0:00:00
Unit Poll frequency 1 seconds, holdtime 15 seconds
Interface Poll frequency 5 seconds, holdtime 25 seconds
Interface Policy 1
Monitored Interfaces 1 of 216 maximum
MAC Address Move Notification Interval not set
Version: Ours 9.4(4)2, Mate 9.4(4)2
Last Failover at: 02:57:32 UTC Mar 20 2017
        This host: Primary - Active
                Active time: 48 (sec)
                slot 0: ASA5525 hw/sw rev (1.0/9.4(4)2) status (Up Sys)
                  Interface inside (10.108.12.50): Normal (Monitored)
        Other host: Secondary - Standby Ready
                Active time: 1219 (sec)
                slot 0: ASA5525 hw/sw rev (1.0/9.4(4)2) status (Up Sys)
                  Interface inside (10.108.12.51): Normal (Monitored)


<OUTPUT TRUNCATED>


ASA1/act/pri# failover exec mate show version

Cisco Adaptive Security Appliance Software Version 9.4(4)2
Device Manager Version 7.7(1)150

Compiled on Thu 16-Feb-17 09:09 PST by builders
System image file is "disk0:/asa944-2-smp-k8.bin"
Config file at boot was "startup-config"

ASA2 up 29 mins 18 secs
failover cluster up 4 days 7 hours


<OUTPUT TRUNCATED>


I've performed a zero downtime upgrade on a Cisco ASA 5520 Active/Standby pair and only used write memory. The Standby firewall kept rebooting in a loop since it didn't find the image configured using the boot system disk0:/ and I should've specified a fallback boot image. You also need to use the write standby in order to replicate the config to the Standby firewall. I also didn't see this log message on the Active firewall.

Beginning configuration replication: Sending to mate.
End Configuration Replication to mate



ASA5520/pri/act# show failover
Failover On
Failover unit Primary
Failover LAN Interface: failover GigabitEthernet0/2 (up)
Unit Poll frequency 1 seconds, holdtime 15 seconds
Interface Poll frequency 5 seconds, holdtime 25 seconds
Interface Policy 1
Monitored Interfaces 2 of 160 maximum
Version: Ours 8.4(3), Mate 8.4(6)
Last Failover at: 12:32:40 UTC Aug 20 2015
        This host: Primary - Active
                Active time: 52035347 (sec)
                slot 0: ASA5520 hw/sw rev (2.0/8.4(3)) status (Up Sys)
                  Interface outside (1.1.1.1): Normal (Waiting)
                  Interface inside (192.168.1.1): Normal (Waiting)
                slot 1: empty
        Other host: Secondary - Cold Standby
                Active time: 0 (sec)
                slot 0: ASA5520 hw/sw rev (2.0/8.4(6)) status (Up Sys)
                  Interface outside (1.1.1.2): Unknown (Monitored)
                  Interface inside (192.168.1.2): Unknown (Monitored)
                slot 1: empty

ASA5520/pri/act# show failover state

               State          Last Failure Reason      Date/Time
This host  -   Primary
               Active         Ifc Failure              15:16:36 UTC Jun 4 2015
                              inside: No Link
Other host -   Secondary
               Cold Standby   Comm Failure             16:27:27 UTC Mar 23 2017

====Configuration State===
        Sync Done         // YOU SHOULD ALSO SEE Sync Done - STANDBY
====Communication State===
                                  // YOU SHOULD SEE Mac set


ASA5520/pri/act# write ?  

  erase     Clear flash memory configuration
  memory    Save active configuration to the flash
  net       Save the active configuration to the tftp server
  standby   Save the active configuration on the active unit to the flash on
            the standby unit

  terminal  Display the current active configuration
  <cr>


ASA5520/pri/act# write memory
Building configuration...
Cryptochecksum: aac8cc62 f0d002b1 20122d02 0499661b

36859 bytes copied in 3.290 secs (12286 bytes/sec)
[OK]

ASA5520/pri/act# write standby      // DIDN'T USE THIS ON A CISCO 5500-X
Building configuration...
[OK]
ciscoasa5520/pri/act#
Beginning configuration replication: Sending to mate.
End Configuration Replication to mate

Wednesday, May 3, 2017

Troubleshooing Proxy Phone on a Cisco ASA Firewall

You can use show version to check if the ASA has the proper UC Proxy Phone license installed and show phone-proxy secure-phones for troubleshooting active proxy phone database. The license is additive in an Active-Standby (or Active-Active) firewall pair. In this case ASA1 (Active) has 50 UC Proxy Phone license and ASA2 (Standby) has 2 UC Proxy Phone license (50 + 2 = 52).


ciscoasa/pri/act# show version

Cisco Adaptive Security Appliance Software Version 9.1(6)8
Device Manager Version 7.5(1)

Compiled on Tue 04-Aug-15 16:13 by builders
System image file is "disk0:/asa916-8-k8.bin"
Config file at boot was "startup-config"

ciscoasa up 3 days 4 hours
failover cluster up 1 year 111 days

Hardware:   ASA5510, 1024 MB RAM, CPU Pentium 4 Celeron 1599 MHz,
Internal ATA Compact Flash, 256MB
BIOS Flash M50FW016 @ 0xfff00000, 2048KB

Encryption hardware device : Cisco ASA-55xx on-board accelerator (revision 0x0)
                             Boot microcode        : CN1000-MC-BOOT-2.00
                             SSL/IKE microcode     : CNlite-MC-SSLm-PLUS-2.08
                             IPSec microcode       : CNlite-MC-IPSECm-MAIN-2.09
                             Number of accelerators: 1

 0: Ext: Ethernet0/0         : address is c47d.4f85.0f56, irq 9
 1: Ext: Ethernet0/1         : address is c47d.4f85.0f57, irq 9
 2: Ext: Ethernet0/2         : address is c47d.4f85.0f58, irq 9
 3: Ext: Ethernet0/3         : address is c47d.4f85.0f59, irq 9
 4: Ext: Management0/0       : address is c47d.4f85.0f55, irq 1             
 5: Int: Not used            : irq 11
 6: Int: Not used            : irq 5

Licensed features for this platform:
Maximum Physical Interfaces       : Unlimited      perpetual
Maximum VLANs                     : 100            perpetual
Inside Hosts                      : Unlimited      perpetual
Failover                          : Active/Active  perpetual
Encryption-DES                    : Enabled        perpetual
Encryption-3DES-AES               : Enabled        perpetual
Security Contexts                 : 2              perpetual
GTP/GPRS                          : Disabled       perpetual
AnyConnect Premium Peers          : 2              perpetual
AnyConnect Essentials             : Disabled       perpetual
Other VPN Peers                   : 250            perpetual
Total VPN Peers                   : 250            perpetual
Shared License                    : Disabled       perpetual
AnyConnect for Mobile             : Disabled       perpetual
AnyConnect for Cisco VPN Phone    : Disabled       perpetual
Advanced Endpoint Assessment      : Disabled       perpetual
UC Phone Proxy Sessions           : 50             perpetual        // ACTIVE (ASA1) UC PHONE PROXY LICENSE
Total UC Proxy Sessions           : 50             perpetual

Botnet Traffic Filter             : Disabled       perpetual
Intercompany Media Engine         : Disabled       perpetual
Cluster                           : Disabled       perpetual

This platform has an ASA 5510 Security Plus license.

Failover cluster licensed features for this platform:
Maximum Physical Interfaces       : Unlimited      perpetual
Maximum VLANs                     : 100            perpetual
Inside Hosts                      : Unlimited      perpetual
Failover                          : Active/Active  perpetual
Encryption-DES                    : Enabled        perpetual
Encryption-3DES-AES               : Enabled        perpetual
Security Contexts                 : 4              perpetual
GTP/GPRS                          : Disabled       perpetual
AnyConnect Premium Peers          : 4              perpetual
AnyConnect Essentials             : Disabled       perpetual
Other VPN Peers                   : 250            perpetual
Total VPN Peers                   : 250            perpetual
Shared License                    : Disabled       perpetual
AnyConnect for Mobile             : Disabled       perpetual
AnyConnect for Cisco VPN Phone    : Disabled       perpetual
Advanced Endpoint Assessment      : Disabled       perpetual
UC Phone Proxy Sessions           : 52             perpetual       // +2 UC PHONE PROXY LICENSE FROM STANDBY ASA2
Total UC Proxy Sessions           : 52             perpetual

Botnet Traffic Filter             : Disabled       perpetual
Intercompany Media Engine         : Disabled       perpetual
Cluster                           : Disabled       perpetual

This platform has an ASA 5510 Security Plus license.

Serial Number: JMX1416ABCD
Running Permanent Activation Key: 0x2c1bee62 0x6cbe1d1d 0xe8331d68 0xa19c48a8 0x43391234
Configuration register is 0x1

ciscoasa/pri/act# show phone-proxy ?

  media-sessions      Show phone-proxy media session information
  secure-phones       Show the phone-proxy secure-phone database
  signaling-sessions  Show phone-proxy signaling session information
  |                   Output modifiers
  <cr>

ciscoasa/pri/act# show phone-proxy secure-phones
ASA-phone-proxy: 10 in use, 13 most used

           Interface      IP Address  Port      MAC                 Timeout Idle
             outside   86.25.1.27    5161     0008.308a.a4ab   0:05:00 0:00:02
             outside   18.92.36.29  17409   20bb.c092.38cd   0:05:00 0:00:29
             outside   14.11.26.15  35174   04c5.a44c.75ef    0:05:00 0:00:11
             outside   98.96.24.16  51317   0cd9.9690.0c12   0:05:00 0:00:24
             outside   74.80.1.9      44768   0024.c40c.5c34   0:05:00 0:00:29
             outside   66.5.32.4      56107   7cad.7442.9d56   0:05:00 0:00:04
             outside   98.21.27.9    49278   b862.1f6d.a378   0:05:00 0:00:27
             outside   17.92.54.68   15574   0025.84a2.f29a  0:05:00 0:00:21
             outside   208.11.16.26  0          9410.3eea.dabc  0:05:00 0:01:25     // PORT 0 MEANS THE PROXY PHONE DIDN'T SUCCESSFULLY REGISTERED TO CUCM
             outside   179.34.5.21 32945 381c.1abb.3ade 0:05:00 0:00:00


From the output above, you can search the IP phone's MAC address in the Call Manager (or CUCM) for more info (proxy phone is supported on legacy CUCM7).

Friday, April 7, 2017

Center for Internet Security (CIS) Free Cisco Benchmark PDF

I was searching over the Internet for a best practice guide to be used for my network audit. I'll then perform device hardening afterwards. I came across the Center for Internet Security (CIS) website which provides free Network device benchmark PDF documents. The CIS document includes the guideline for best practice configuration and explains the logic behind it.



Just fill up the required information.



Open the email (check your Junk Email) and click on the link provided. It will redirect you to CIS Benchmark PDF download area.


CIS also provides benchmark PDFs for OS, web browsers and mobile devices.



I'm more interested on the items under Network Devices.


Click Download PDF on a specific category (Cisco IOS 15 in this case).




Below is a snippet of a CIS PDF document for a Cisco ASA Firewall.