I have an ipsec l2l vpn between a 5520 and a 5505 running 804. The tunnel drops everytime ISAKMP rekeys. The configs are correct, and I have already gotten TAC and several engineers to review the config.
Basically what happens is on the far-end 5505 ISAKMP tears down the tunnel about 300 seconds before the actual timer expires. Timer is set to 3600s for isakmp and ipsec.
When this happens, the ISAKMP SA on the 5505 shows this:
IKE Peer: x.x.x.x
Type : user Role : initiator
Rekey : no State : MM_WAIT_MSG2?
Encrypt : aes-256 ? Hash : SHA
Auth : preshared Lifetime: 0 ?
5505# "show cry ipsec sa"
There are no ipsec sas
The 5520 at the head end shows this:
1 IKE Peer: x.x.x.x
Type : L2L Role : initiator
Rekey : no State : MM_ACTIVE
Encrypt : 3des Hash : SHA
Auth : preshared Lifetime: 3600
Lifetime Remaining: 339
So the headend is still counting down and the far-end has already tore down the tunnel.
ALso I am running captures on UDP:500 on the outside interface with the peers specified in the ACL on both firewalls. The 5505 sends and sends but the 5520 does not reply.
On the 5505 you can see the ISAKMP packets going out and the 5520 not replying (2.2.2.2 would be the headend):
61: 12:46:58.337827 1.1.1.1.500 > 2.2.2.2.500: udp 108
62: 12:47:12.422265 1.1.1.1.500 > 2.2.2.2.500: udp 68
63: 12:47:12.426094 1.1.1.1.500 > 2.2.2.2.500: udp 84
This goes on for about 5 minutes OR untill I clear the crypto isakmp sa on the headend. When I clear the crytpo or if I wait 5-6 minutes then I will see bidirectional packets coming and going.
It may also be worth nothing that we just upgraded to 804 and the problem started to occur around the same time as the upgrade, but nobody has confirmed that this is a code issue.
WHen I run debugs on the 5505 I see that ISAKMP tries to start a rekey but does not get a reply from the 5520.
<167>Oct 03 2008 14:49:40: %ASA-7-713906: IP = 2.2.2.2, Starting phase 1 rekey
<165>Oct 03 2008 14:49:40: %ASA-5-713041: IP = 2.2.2.2, IKE Initiator: Rekeying Phase 1, Intf outside, IKE Peer 2.2.2.2 local Proxy Address N/A, remote Proxy Address N/A, Crypto map (N/A)
<167>Oct 03 2008 14:49:40: %ASA-7-715046: IP = 2.2.2.2, constructing ISAKMP SA payload
<167>Oct 03 2008 14:49:40: %ASA-7-715046: IP = 2.2.2.2, constructing Fragmentation VID + extended capabilities payload
<167>Oct 03 2008 14:49:40: %ASA-7-713236: IP = 2.2.2.2, IKE_DECODE SENDING Message (msgid=0) with payloads : HDR + SA (1) + VENDOR (13) + NONE (0) total length : 108
<167>Oct 03 2008 14:49:48: %ASA-7-713236: IP = 2.2.2.2, IKE_DECODE RESENDING Message (msgid=0) with payloads : HDR + SA (1) + VENDOR (13) + NONE (0) total length : 108
<167>Oct 03 2008 14:49:56: %ASA-7-713236: IP = 2.2.2.2, IKE_DECODE RESENDING Message (msgid=0) with payloads : HDR + SA (1) + VENDOR (13) + NONE (0) total length : 108
<167>Oct 03 2008 14:50:04: %ASA-7-713236: IP = 2.2.2.2, IKE_DECODE RESENDING Message (msgid=0) with payloads : HDR + SA (1) + VENDOR (13) + NONE (0) total length : 108
<167>Oct 03 2008 14:50:12: %ASA-7-715065: IP = 2.2.2.2, IKE MM Initiator FSM error history (struct &0xd791052[IMG]https://us.v-cdn.net/6030959/uploads/images/smilies/icon_cool.gif[/IMG] <state>, <event>: MM_DONE, EV_ERROR-->MM_WAIT_MSG2, EV_RETRY-->MM_WAIT_MSG2, EV_TIMEOUT-->MM_WAIT_MSG2, NullEvent-->MM_SND_MSG1, EV_SND_
MSG-->MM_SND_MSG1, EV_START_TMR-->MM_SND_MSG1, EV_RESEND_MSG-->MM_WAIT_MSG2, EV_RETRY
<167>Oct 03 2008 14:50:12: %ASA-7-713906: IP = 2.2.2.2, IKE SA MM:b3fdfbb2 terminating: flags 0x01000422, refcnt 0, tuncnt 0
<167>Oct 03 2008 14:50:12: %ASA-7-713906: IP = 2.2.2.2, sending delete/delete with reason message
<163>Oct 03 2008 14:50:12: %ASA-3-713902: IP = 2.2.2.2, Removing peer from peer table failed, no match!
<164>Oct 03 2008 14:50:12: %ASA-4-713903: IP = 2.2.2.2, Error: Unable to remove PeerTblEntry
<167>Oct 03 2008 14:50:17: %ASA-7-713906: Group = 2.2.2.2, IP = 2.2.2.2, Expired IKE SA with 1 phase 2 centries still associated
<167>Oct 03 2008 14:50:17: %ASA-7-713906: Group = 2.2.2.2, IP = 2.2.2.2, sending delete/delete with reason message
<167>Oct 03 2008 14:50:17: %ASA-7-715046: Group = 2.2.2.2, IP = 2.2.2.2, constructing blank hash payload
<167>Oct 03 2008 14:50:17: %ASA-7-715046: Group = 2.2.2.2, IP = 2.2.2.2, constructing IPSec delete payload
<167>Oct 03 2008 14:50:17: %ASA-7-715046: Group = 2.2.2.2, IP = 2.2.2.2, constructing qm hash payload
<167>Oct 03 2008 14:50:17: %ASA-7-713236: IP = 2.2.2.2, IKE_DECODE SENDING Message (msgid=170945d) with payloads : HDR + HASH ([IMG]https://us.v-cdn.net/6030959/uploads/images/smilies/icon_cool.gif[/IMG] + DELETE (12) + NONE (0) total length : 68
<167>Oct 03 2008 14:50:17: %ASA-7-713906: Group = 2.2.2.2, IP = 2.2.2.2, Active unit receives a delete event for remote peer 2.2.2.2.
<167>Oct 03 2008 14:50:17: %ASA-7-715009: Group = 2.2.2.2, IP = 2.2.2.2, IKE Deleting SA: Remote Proxy 0.0.0.0, Local Proxy 10.10.0.0
<167>Oct 03 2008 14:50:17: %ASA-7-713906: Group = 2.2.2.2, IP = 2.2.2.2, IKE SA MM:63bba120 terminating: flags 0x0120c002, refcnt 0, tuncnt 0
<167>Oct 03 2008 14:50:17: %ASA-7-713906: Group = 2.2.2.2, IP = 2.2.2.2, sending delete/delete with reason message
<166>Oct 03 2008 14:50:17: %ASA-6-602304: IPSEC: An inbound LAN-to-LAN SA (SPI= 0x78B07B12) between 1.1.1.1 and 2.2.2.2(user= 2.2.2.2) has been deleted.
<166>Oct 03 2008 14:50:17: %ASA-6-602304: IPSEC: An outbound LAN-to-LAN SA (SPI= 0xB4FA3DE6) between 1.1.1.1 and 2,2,2,2 (user= 2.2.2.2) has been deleted.
<167>Oct 03 2008 14:50:17: %ASA-7-715046: Group = 2.2.2.2, IP = 2.2.2.2, constructing blank hash payload
<167>Oct 03 2008 14:50:17: %ASA-7-715046: Group = 2.2.2.2, IP = 2.2.2.2, constructing IKE delete payload
<167>Oct 03 2008 14:50:17: %ASA-7-715046: Group = 2.2.2.2, IP = 2.2.2.2, constructing qm hash payload
<167>Oct 03 2008 14:50:17: %ASA-7-713236: IP = 2.2.2.2, IKE_DECODE SENDING Message (msgid=1a400590) with payloads : HDR + HASH ([IMG]https://us.v-cdn.net/6030959/uploads/images/smilies/icon_cool.gif[/IMG] + DELETE (12) + NONE (0) total length : 80
<167>Oct 03 2008 14:50:17: %ASA-7-715077: Pitcher: received key delete msg, spi 0x78b07b12
<167>Oct 03 2008 14:50:17: %ASA-7-715077: Pitcher: received key delete msg, spi 0x78b07b12
<167>Oct 03 2008 14:50:17: %ASA-7-715077: Pitcher: received key delete msg, spi 0xb4fa3de6
<163>Oct 03 2008 14:50:17: %ASA-3-713902: Group = 2.2.2.2, IP = 2.2.2.2, Removing peer from peer table failed, no match!
<164>Oct 03 2008 14:50:17: %ASA-4-713903: Group = 2.2.2.2, IP = 2.2.2.2, Error: Unable to remove PeerTblEntry
<164>Oct 03 2008 14:50:17: %ASA-4-113019: Group = 2.2.2.2 Username = 2.2.2.2, IP = 2.2.2.2, Session disconnected. Session Type: IPsec, Duration: 0h:51m:37s, Bytes xmt: 84531039, Bytes rcv: 255159181, Reason: User Requested
<167>Oct 03 2008 14:50:17: %ASA-7-713906: Ignoring msg to mark SA with dsID 507904 dead because SA deleted
<167>Oct 03 2008 14:50:17: %ASA-7-715077: Pitcher: received a key acquire message, spi 0x0
<165>Oct 03 2008 14:50:17: %ASA-5-713041: IP = 2.2.2.2, IKE Initiator: New Phase 1, Intf inside, IKE Peer 2.2.2.2 local Proxy Address 10.10.0.0, remote Proxy Address 0.0.0.0, Crypto map (outside_map)
<167>Oct 03 2008 14:50:17: %ASA-7-715046: IP = 2.2.2.2, constructing ISAKMP SA payload
<167>Oct 03 2008 14:50:17: %ASA-7-715046: IP = 2.2.2.2, constructing Fragmentation VID + extended capabilities payload
<167>Oct 03 2008 14:50:17: %ASA-7-713236: IP = 2.2.2.2, IKE_DECODE SENDING Message (msgid=0) with payloads : HDR + SA (1) + VENDOR (13) + NONE (0) total length : 108
<167>Oct 03 2008 14:50:17: %ASA-7-715077: Pitcher: received a key acquire message, spi 0x0
<166>Oct 03 2008 14:50:17: %ASA-6-713219: IP = 2.2.2.2, Queuing KEY-ACQUIRE messages to be processed when P1 SA is complete.
<167>Oct 03 2008 14:50:18: %ASA-7-715077: Pitcher: received a key acquire message, spi 0x0
<166>Oct 03 2008 14:50:18: %ASA-6-713219: IP = 2.2.2.2, Queuing KEY-ACQUIRE messages to be processed when P1 SA is complete.
<167>Oct 03 2008 14:50:19: %ASA-7-715077: Pitcher: received a key acquire message, spi 0x0
<166>Oct 03 2008 14:50:19: %ASA-6-713219: IP = 2.2.2.2, Queuing KEY-ACQUIRE messages to be processed when P1 SA is complete.
<167>Oct 03 2008 14:50:19: %ASA-7-715077: Pitcher: received a key acquire message, spi 0x0
<166>Oct 03 2008 14:50:19: %ASA-6-713219: IP = 2.2.2.2, Queuing KEY-ACQUIRE messages to be processed when P1 SA is complete.
Here is a snippet of debug. The KEY_ACUIRE messages continue while the 5505 sends a ISAKMP rekey payload but the 5520 does not reply.
Again the tunnel runs fine untill a rekey. And the tunnel will finally come back up if I let it sit there long enough. Also the routing is fine, its routing over the internet.
So has anyone encountered this type of behavior?