<div dir="ltr"><div>Hi Tobias,</div><div><br></div><div>Thank you very much for your reply. I verified DPD with IKEV1 connection and Dead peer is detected within 135 to 140 seconds. So, it's working fine</div><div><br></div><div>One more point, is DPD sent periodically to enquire if peer is dead or only when there is no inbound traffic for 'dpddelay' seconds ?</div><div><br></div><div>I am a beginner in IPSecurity, not much idea abut strongswan. Is there any Doc/guide to better understand strongswan code.</div><div><br></div><div>Thanks,</div><div>Bhashkar</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 17, 2015 at 8:27 PM, Tobias Brunner <span dir="ltr"><<a href="mailto:tobias@strongswan.org" target="_blank">tobias@strongswan.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Bhashkar,<br>
<br>
> In my Software, when Dead peer is detected, an alarm is thrown.<br>
> 'dpdtimeout = 120s and depdelay=10s' is set in IPSec.conf file.<br>
><br>
> Initially IPSec tunnel between my device and gateway is established<br>
> properly and packets can<br>
> flow between them. Then After some time I disable the physical interface<br>
> on my device, so after dpdtimeout = 120s, Dead peer<br>
> should be detected and alarm should be thrown. But I observe Dead peer<br>
> detection is taking more than 180 seconds. Around after<br>
> 190 seconds, Dead peer is detected and alarm is thrown. Can someone<br>
> help, why is it taking more then 120 seconds to detect Dead peer.<br>
<br>
As is documented in the ipsec.conf(5) man page and on the wiki [1], the<br>
`dpdtimeout` option has no effect on IKEv2 connections. For IKEv2 the<br>
default retransmission timeouts apply [2]. With the default settings it<br>
should take 165s until the other peer is considered dead after a DPD (or<br>
any other packet) has been sent while the interface is disabled (it<br>
might take more than `dpddelay` seconds until a DPD is initially sent if<br>
there was still inbound traffic since the last check `dpddelay` seconds<br>
ago).<br>
<br>
Regards,<br>
Tobias<br>
<br>
[1] <a href="https://wiki.strongswan.org/projects/strongswan/wiki/ConnSection" target="_blank">https://wiki.strongswan.org/projects/strongswan/wiki/ConnSection</a><br>
[2] <a href="https://wiki.strongswan.org/projects/strongswan/wiki/Retransmission" target="_blank">https://wiki.strongswan.org/projects/strongswan/wiki/Retransmission</a><br>
<br>
</blockquote></div><br></div>