{
:if ([/ping interface=ether1 10.165.1.97 count=4]<3) do={
/ip ipsec remote-peers kill;
/ip ipsec installed-sa flush;
/ping interface=ether1 10.165.1.97 count=5;
:log info «Tunel IPsec down. S’ha reiniciat»
} else={
:log info «Tunel IPsec OK»
}
}