NicholasMag
here is the configuration:
# dec/25/2012 11:44:25 by RouterOS 6.0rc5
# software id = 74EE-08TE
#
/ip ipsec proposal
set [ find default=yes ] auth-algorithms=md5 enc-algorithms=aes-128 lifetime=\
1d pfs-group=none
/ip ipsec peer
add address=x.x.x.x/32 dpd-interval=10s dpd-maximum-failures=2 \
enc-algorithm=aes-128 secret="#####"
/ip ipsec policy
add dst-address=192.168.0.0/16 level=unique sa-dst-address=x.x.x.x \
sa-src-address=x.x.x.x src-address=192.168.254.2/32 tunnel=yes
Problem is in DPD (dead peer detection), when internet goes off, remote peer (cisco site) removes the connection and deletes installed SA s, but on Mikrotik side doesn't delete connection and SA's, they still exsist. So when internet connection is restored Mikrotik is trying to use old SA s, which already does not exists on remote site.
I turned off keepalives on Cisco, so tunnel stays in up state, even when there is no internet connection, but it's not a solution.