L2TP with IPSEC terminating connection exactly every 30 minutes

Hi

I have an L2TP with IPSEC from HAP Ac2 to Ubiqiti USG L2TP server. The connection drops exactly every 30 minutes and i can’t find the reason why. There is also another client from different IP adress to this server using completly the same setup (HAP Ac2, L2TP with IPSEC) and he has no problems with disconnections at all. Settings in both HAP Ac’s look’s identical (L2TP client, Ipsec/profiles). Any ideas?

The connection dropped at 13:09:07 in this log

13:03:22 ipsec,debug 89.*.*.* notify: R_U_THERE_ACK 
13:03:22 ipsec,debug 89.*.*.* DPD R-U-There-Ack received 
13:03:22 ipsec,debug received an R-U-THERE-ACK 
13:03:28 l2tp,debug,packet sent control message to 89.*.*.*:1701 from 176.*.*.*:1701 
13:03:28 l2tp,debug,packet     tunnel-id=16133, session-id=0, ns=760, nr=736 
13:03:28 l2tp,debug,packet     (M) Message-Type=HELLO 
13:03:28 l2tp,debug,packet rcvd control message (ack) from 89.*.*.*:1701 to 176.*.*.*:1701 
13:03:28 l2tp,debug,packet     tunnel-id=126, session-id=0, ns=736, nr=761 
13:03:28 l2tp,debug,packet rcvd control message from 89.*.*.*:1701 to 176.*.*.*:1701 
13:03:28 l2tp,debug,packet     tunnel-id=126, session-id=0, ns=736, nr=761 
13:03:28 l2tp,debug,packet     (M) Message-Type=HELLO 
13:03:28 l2tp,debug,packet sent control message (ack) to 89.*.*.*:1701 from 176.*.*.*:1701 
13:03:28 l2tp,debug,packet     tunnel-id=16133, session-id=0, ns=761, nr=737 
13:03:43 ipsec,debug ===== received 92 bytes from 89.*.*.*[500] to 176.*.*.*[500] 
13:03:43 ipsec,debug receive Information. 
13:03:43 ipsec,debug hash(sha1) 
13:03:43 ipsec,debug hash validated. 
13:03:43 ipsec,debug begin. 
13:03:43 ipsec,debug seen nptype=8(hash) len=24 
13:03:43 ipsec,debug seen nptype=11(notify) len=32 
13:03:43 ipsec,debug succeed. 
13:03:43 ipsec,debug 89.*.*.* notify: R_U_THERE 
13:03:43 ipsec,debug 89.*.*.* DPD R-U-There received 
13:03:43 ipsec,debug hash(sha1) 
13:03:43 ipsec,debug 92 bytes from 176.*.*.*[500] to 89.*.*.*[500] 
13:03:43 ipsec,debug 1 times of 92 bytes message will be sent to 89.*.*.*[500] 
13:03:43 ipsec,debug sendto Information notify. 
13:03:43 ipsec,debug received a valid R-U-THERE, ACK sent 
13:03:58 ipsec,debug ===== received 92 bytes from 89.*.*.*[500] to 176.*.*.*[500] 
13:03:58 ipsec,debug receive Information. 
13:03:58 ipsec,debug hash(sha1) 
13:03:58 ipsec,debug hash validated. 
13:03:58 ipsec,debug begin. 
13:03:58 ipsec,debug seen nptype=8(hash) len=24 
13:03:58 ipsec,debug seen nptype=11(notify) len=32 
13:03:58 ipsec,debug succeed. 
13:03:58 ipsec,debug 89.*.*.* notify: R_U_THERE 
13:03:58 ipsec,debug 89.*.*.* DPD R-U-There received 
13:03:58 ipsec,debug hash(sha1) 
13:03:58 ipsec,debug 92 bytes from 176.*.*.*[500] to 89.*.*.*[500] 
13:03:58 ipsec,debug 1 times of 92 bytes message will be sent to 89.*.*.*[500] 
13:03:58 ipsec,debug sendto Information notify. 
13:03:58 ipsec,debug received a valid R-U-THERE, ACK sent 
13:04:06 l2tp,ppp,debug,packet  Tadej: sent LCP EchoReq id=0x18 
13:04:06 l2tp,ppp,debug,packet     <magic 0x19c46e43> 
13:04:06 l2tp,ppp,debug,packet  Tadej: rcvd LCP EchoRep id=0x18 
13:04:06 l2tp,ppp,debug,packet     <magic 0x178de113> 
13:04:21 ipsec,debug ===== received 92 bytes from 89.*.*.*[500] to 176.*.*.*[500] 
13:04:21 ipsec,debug receive Information. 
13:04:21 ipsec,debug hash(sha1) 
13:04:21 ipsec,debug hash validated. 
13:04:21 ipsec,debug begin. 
13:04:21 ipsec,debug seen nptype=8(hash) len=24 
13:04:21 ipsec,debug seen nptype=11(notify) len=32 
13:04:21 ipsec,debug succeed. 
13:04:21 ipsec,debug 89.*.*.* notify: R_U_THERE 
13:04:21 ipsec,debug 89.*.*.* DPD R-U-There received 
13:04:21 ipsec,debug hash(sha1) 
13:04:21 ipsec,debug 92 bytes from 176.*.*.*[500] to 89.*.*.*[500] 
13:04:21 ipsec,debug 1 times of 92 bytes message will be sent to 89.*.*.*[500] 
13:04:21 ipsec,debug sendto Information notify. 
13:04:21 ipsec,debug received a valid R-U-THERE, ACK sent 
13:04:28 l2tp,debug,packet sent control message to 89.*.*.*:1701 from 176.*.*.*:1701 
13:04:28 l2tp,debug,packet     tunnel-id=16133, session-id=0, ns=761, nr=737 
13:04:28 l2tp,debug,packet     (M) Message-Type=HELLO 
13:04:28 l2tp,debug,packet rcvd control message (ack) from 89.*.*.*:1701 to 176.*.*.*:1701 
13:04:28 l2tp,debug,packet     tunnel-id=126, session-id=0, ns=737, nr=762 
13:04:28 l2tp,debug,packet rcvd control message from 89.*.*.*:1701 to 176.*.*.*:1701 
13:04:28 l2tp,debug,packet     tunnel-id=126, session-id=0, ns=737, nr=762 
13:04:28 l2tp,debug,packet     (M) Message-Type=HELLO 
13:04:28 l2tp,debug,packet sent control message (ack) to 89.*.*.*:1701 from 176.*.*.*:1701 
13:04:28 l2tp,debug,packet     tunnel-id=16133, session-id=0, ns=762, nr=738 
13:04:43 ipsec,debug ===== received 92 bytes from 89.*.*.*[500] to 176.*.*.*[500] 
13:04:43 ipsec,debug receive Information. 
13:04:43 ipsec,debug hash(sha1) 
13:04:43 ipsec,debug hash validated. 
13:04:43 ipsec,debug begin. 
13:04:43 ipsec,debug seen nptype=8(hash) len=24 
13:04:43 ipsec,debug seen nptype=11(notify) len=32 
13:04:43 ipsec,debug succeed. 
13:04:43 ipsec,debug 89.*.*.* notify: R_U_THERE 
13:04:43 ipsec,debug 89.*.*.* DPD R-U-There received 
13:04:43 ipsec,debug hash(sha1) 
13:04:43 ipsec,debug 92 bytes from 176.*.*.*[500] to 89.*.*.*[500] 
13:04:43 ipsec,debug 1 times of 92 bytes message will be sent to 89.*.*.*[500] 
13:04:43 ipsec,debug sendto Information notify. 
13:04:43 ipsec,debug received a valid R-U-THERE, ACK sent 
13:04:58 ipsec,debug ===== received 92 bytes from 89.*.*.*[500] to 176.*.*.*[500] 
13:04:58 ipsec,debug receive Information. 
13:04:58 ipsec,debug hash(sha1) 
13:04:58 ipsec,debug hash validated. 
13:04:58 ipsec,debug begin. 
13:04:58 ipsec,debug seen nptype=8(hash) len=24 
13:04:58 ipsec,debug seen nptype=11(notify) len=32 
13:04:58 ipsec,debug succeed. 
13:04:58 ipsec,debug 89.*.*.* notify: R_U_THERE 
13:04:58 ipsec,debug 89.*.*.* DPD R-U-There received 
13:04:58 ipsec,debug hash(sha1) 
13:04:58 ipsec,debug 92 bytes from 176.*.*.*[500] to 89.*.*.*[500] 
13:04:58 ipsec,debug 1 times of 92 bytes message will be sent to 89.*.*.*[500] 
13:04:58 ipsec,debug sendto Information notify. 
13:04:58 ipsec,debug received a valid R-U-THERE, ACK sent 
13:05:06 l2tp,ppp,debug,packet  Tadej: sent LCP EchoReq id=0x19 
13:05:06 l2tp,ppp,debug,packet     <magic 0x19c46e43> 
13:05:06 l2tp,ppp,debug,packet  Tadej: rcvd LCP EchoRep id=0x19 
13:05:06 l2tp,ppp,debug,packet     <magic 0x178de113> 
13:05:21 ipsec,debug ===== received 92 bytes from 89.*.*.*[500] to 176.*.*.*[500] 
13:05:21 ipsec,debug receive Information. 
13:05:21 ipsec,debug hash(sha1) 
13:05:21 ipsec,debug hash validated. 
13:05:21 ipsec,debug begin. 
13:05:21 ipsec,debug seen nptype=8(hash) len=24 
13:05:21 ipsec,debug seen nptype=11(notify) len=32 
13:05:21 ipsec,debug succeed. 
13:05:21 ipsec,debug 89.*.*.* notify: R_U_THERE 
13:05:21 ipsec,debug 89.*.*.* DPD R-U-There received 
13:05:21 ipsec,debug hash(sha1) 
13:05:21 ipsec,debug 92 bytes from 176.*.*.*[500] to 89.*.*.*[500] 
13:05:21 ipsec,debug 1 times of 92 bytes message will be sent to 89.*.*.*[500] 
13:05:21 ipsec,debug sendto Information notify. 
13:05:21 ipsec,debug received a valid R-U-THERE, ACK sent 
13:05:22 ipsec,debug 89.*.*.* DPD monitoring.... 
13:05:22 ipsec,debug hash(sha1) 
13:05:22 ipsec,debug 92 bytes from 176.*.*.*[500] to 89.*.*.*[500] 
13:05:22 ipsec,debug 1 times of 92 bytes message will be sent to 89.*.*.*[500] 
13:05:22 ipsec,debug sendto Information notify. 
13:05:22 ipsec,debug 89.*.*.* DPD R-U-There sent (0) 
13:05:22 ipsec,debug 89.*.*.* rescheduling send_r_u (5). 
13:05:22 ipsec,debug ===== received 92 bytes from 89.*.*.*[500] to 176.*.*.*[500] 
13:05:22 ipsec,debug receive Information. 
13:05:22 ipsec,debug hash(sha1) 
13:05:22 ipsec,debug hash validated. 
13:05:22 ipsec,debug begin. 
13:05:22 ipsec,debug seen nptype=8(hash) len=24 
13:05:22 ipsec,debug seen nptype=11(notify) len=32 
13:05:22 ipsec,debug succeed. 
13:05:22 ipsec,debug 89.*.*.* notify: R_U_THERE_ACK 
13:05:22 ipsec,debug 89.*.*.* DPD R-U-There-Ack received 
13:05:22 ipsec,debug received an R-U-THERE-ACK 
13:05:28 l2tp,debug,packet sent control message to 89.*.*.*:1701 from 176.*.*.*:1701 
13:05:28 l2tp,debug,packet     tunnel-id=16133, session-id=0, ns=762, nr=738 
13:05:28 l2tp,debug,packet     (M) Message-Type=HELLO 
13:05:28 l2tp,debug,packet rcvd control message (ack) from 89.*.*.*:1701 to 176.*.*.*:1701 
13:05:28 l2tp,debug,packet     tunnel-id=126, session-id=0, ns=738, nr=763 
13:05:28 l2tp,debug,packet rcvd control message from 89.*.*.*:1701 to 176.*.*.*:1701 
13:05:28 l2tp,debug,packet     tunnel-id=126, session-id=0, ns=738, nr=763 
13:05:28 l2tp,debug,packet     (M) Message-Type=HELLO 
13:05:28 l2tp,debug,packet sent control message (ack) to 89.*.*.*:1701 from 176.*.*.*:1701 
13:05:28 l2tp,debug,packet     tunnel-id=16133, session-id=0, ns=763, nr=739 
13:05:43 ipsec,debug ===== received 92 bytes from 89.*.*.*[500] to 176.*.*.*[500] 
13:05:43 ipsec,debug receive Information. 
13:05:43 ipsec,debug hash(sha1) 
13:05:43 ipsec,debug hash validated. 
13:05:43 ipsec,debug begin. 
13:05:43 ipsec,debug seen nptype=8(hash) len=24 
13:05:43 ipsec,debug seen nptype=11(notify) len=32 
13:05:43 ipsec,debug succeed. 
13:05:43 ipsec,debug 89.*.*.* notify: R_U_THERE 
13:05:43 ipsec,debug 89.*.*.* DPD R-U-There received 
13:05:43 ipsec,debug hash(sha1) 
13:05:43 ipsec,debug 92 bytes from 176.*.*.*[500] to 89.*.*.*[500] 
13:05:43 ipsec,debug 1 times of 92 bytes message will be sent to 89.*.*.*[500] 
13:05:43 ipsec,debug sendto Information notify. 
13:05:43 ipsec,debug received a valid R-U-THERE, ACK sent 
13:05:58 ipsec,debug ===== received 92 bytes from 89.*.*.*[500] to 176.*.*.*[500] 
13:05:58 ipsec,debug receive Information. 
13:05:58 ipsec,debug hash(sha1) 
13:05:58 ipsec,debug hash validated. 
13:05:58 ipsec,debug begin. 
13:05:58 ipsec,debug seen nptype=8(hash) len=24 
13:05:58 ipsec,debug seen nptype=11(notify) len=32 
13:05:58 ipsec,debug succeed. 
13:05:58 ipsec,debug 89.*.*.* notify: R_U_THERE 
13:05:58 ipsec,debug 89.*.*.* DPD R-U-There received 
13:05:58 ipsec,debug hash(sha1) 
13:05:58 ipsec,debug 92 bytes from 176.*.*.*[500] to 89.*.*.*[500] 
13:05:58 ipsec,debug 1 times of 92 bytes message will be sent to 89.*.*.*[500] 
13:05:58 ipsec,debug sendto Information notify. 
13:05:58 ipsec,debug received a valid R-U-THERE, ACK sent 
13:06:06 l2tp,ppp,debug,packet  Tadej: sent LCP EchoReq id=0x1a 
13:06:06 l2tp,ppp,debug,packet     <magic 0x19c46e43> 
13:06:06 l2tp,ppp,debug,packet  Tadej: rcvd LCP EchoRep id=0x1a 
13:06:06 l2tp,ppp,debug,packet     <magic 0x178de113> 
13:06:21 ipsec,debug ===== received 92 bytes from 89.*.*.*[500] to 176.*.*.*[500] 
13:06:21 ipsec,debug receive Information. 
13:06:21 ipsec,debug hash(sha1) 
13:06:21 ipsec,debug hash validated. 
13:06:21 ipsec,debug begin. 
13:06:21 ipsec,debug seen nptype=8(hash) len=24 
13:06:21 ipsec,debug seen nptype=11(notify) len=32 
13:06:21 ipsec,debug succeed. 
13:06:21 ipsec,debug 89.*.*.* notify: R_U_THERE 
13:06:21 ipsec,debug 89.*.*.* DPD R-U-There received 
13:06:21 ipsec,debug hash(sha1) 
13:06:21 ipsec,debug 92 bytes from 176.*.*.*[500] to 89.*.*.*[500] 
13:06:21 ipsec,debug 1 times of 92 bytes message will be sent to 89.*.*.*[500] 
13:06:21 ipsec,debug sendto Information notify. 
13:06:21 ipsec,debug received a valid R-U-THERE, ACK sent 
13:06:28 l2tp,debug,packet sent control message to 89.*.*.*:1701 from 176.*.*.*:1701 
13:06:28 l2tp,debug,packet     tunnel-id=16133, session-id=0, ns=763, nr=739 
13:06:28 l2tp,debug,packet     (M) Message-Type=HELLO 
13:06:28 l2tp,debug,packet rcvd control message (ack) from 89.*.*.*:1701 to 176.*.*.*:1701 
13:06:28 l2tp,debug,packet     tunnel-id=126, session-id=0, ns=739, nr=764 
13:06:28 l2tp,debug,packet rcvd control message from 89.*.*.*:1701 to 176.*.*.*:1701 
13:06:28 l2tp,debug,packet     tunnel-id=126, session-id=0, ns=739, nr=764 
13:06:28 l2tp,debug,packet     (M) Message-Type=HELLO 
13:06:28 l2tp,debug,packet sent control message (ack) to 89.*.*.*:1701 from 176.*.*.*:1701 
13:06:28 l2tp,debug,packet     tunnel-id=16133, session-id=0, ns=764, nr=740 
13:06:43 ipsec,debug ===== received 92 bytes from 89.*.*.*[500] to 176.*.*.*[500] 
13:06:43 ipsec,debug receive Information. 
13:06:43 ipsec,debug hash(sha1) 
13:06:43 ipsec,debug hash validated. 
13:06:43 ipsec,debug begin. 
13:06:43 ipsec,debug seen nptype=8(hash) len=24 
13:06:43 ipsec,debug seen nptype=11(notify) len=32 
13:06:43 ipsec,debug succeed. 
13:06:43 ipsec,debug 89.*.*.* notify: R_U_THERE 
13:06:43 ipsec,debug 89.*.*.* DPD R-U-There received 
13:06:43 ipsec,debug hash(sha1) 
13:06:43 ipsec,debug 92 bytes from 176.*.*.*[500] to 89.*.*.*[500] 
13:06:43 ipsec,debug 1 times of 92 bytes message will be sent to 89.*.*.*[500] 
13:06:43 ipsec,debug sendto Information notify. 
13:06:43 ipsec,debug received a valid R-U-THERE, ACK sent 
13:06:58 ipsec,debug ===== received 92 bytes from 89.*.*.*[500] to 176.*.*.*[500] 
13:06:58 ipsec,debug receive Information. 
13:06:58 ipsec,debug hash(sha1) 
13:06:58 ipsec,debug hash validated. 
13:06:58 ipsec,debug begin. 
13:06:58 ipsec,debug seen nptype=8(hash) len=24 
13:06:58 ipsec,debug seen nptype=11(notify) len=32 
13:06:58 ipsec,debug succeed. 
13:06:58 ipsec,debug 89.*.*.* notify: R_U_THERE 
13:06:58 ipsec,debug 89.*.*.* DPD R-U-There received 
13:06:58 ipsec,debug hash(sha1) 
13:06:58 ipsec,debug 92 bytes from 176.*.*.*[500] to 89.*.*.*[500] 
13:06:58 ipsec,debug 1 times of 92 bytes message will be sent to 89.*.*.*[500] 
13:06:58 ipsec,debug sendto Information notify. 
13:06:58 ipsec,debug received a valid R-U-THERE, ACK sent 
13:07:06 l2tp,ppp,debug,packet  Tadej: sent LCP EchoReq id=0x1b 
13:07:06 l2tp,ppp,debug,packet     <magic 0x19c46e43> 
13:07:06 l2tp,ppp,debug,packet  Tadej: rcvd LCP EchoRep id=0x1b 
13:07:06 l2tp,ppp,debug,packet     <magic 0x178de113> 
13:07:21 ipsec,debug ===== received 92 bytes from 89.*.*.*[500] to 176.*.*.*[500] 
13:07:21 ipsec,debug receive Information. 
13:07:21 ipsec,debug hash(sha1) 
13:07:21 ipsec,debug hash validated. 
13:07:21 ipsec,debug begin. 
13:07:21 ipsec,debug seen nptype=8(hash) len=24 
13:07:21 ipsec,debug seen nptype=11(notify) len=32 
13:07:21 ipsec,debug succeed. 
13:07:21 ipsec,debug 89.*.*.* notify: R_U_THERE 
13:07:21 ipsec,debug 89.*.*.* DPD R-U-There received 
13:07:21 ipsec,debug hash(sha1) 
13:07:21 ipsec,debug 92 bytes from 176.*.*.*[500] to 89.*.*.*[500] 
13:07:21 ipsec,debug 1 times of 92 bytes message will be sent to 89.*.*.*[500] 
13:07:21 ipsec,debug sendto Information notify. 
13:07:21 ipsec,debug received a valid R-U-THERE, ACK sent 
13:07:22 ipsec,debug 89.*.*.* DPD monitoring.... 
13:07:22 ipsec,debug hash(sha1) 
13:07:22 ipsec,debug 92 bytes from 176.*.*.*[500] to 89.*.*.*[500] 
13:07:22 ipsec,debug 1 times of 92 bytes message will be sent to 89.*.*.*[500] 
13:07:22 ipsec,debug sendto Information notify. 
13:07:22 ipsec,debug 89.*.*.* DPD R-U-There sent (0) 
13:07:22 ipsec,debug 89.*.*.* rescheduling send_r_u (5). 
13:07:22 ipsec,debug ===== received 92 bytes from 89.*.*.*[500] to 176.*.*.*[500] 
13:07:22 ipsec,debug receive Information. 
13:07:22 ipsec,debug hash(sha1) 
13:07:22 ipsec,debug hash validated. 
13:07:22 ipsec,debug begin. 
13:07:22 ipsec,debug seen nptype=8(hash) len=24 
13:07:22 ipsec,debug seen nptype=11(notify) len=32 
13:07:22 ipsec,debug succeed. 
13:07:22 ipsec,debug 89.*.*.* notify: R_U_THERE_ACK 
13:07:22 ipsec,debug 89.*.*.* DPD R-U-There-Ack received 
13:07:22 ipsec,debug received an R-U-THERE-ACK 
13:07:28 l2tp,debug,packet sent control message to 89.*.*.*:1701 from 176.*.*.*:1701 
13:07:28 l2tp,debug,packet     tunnel-id=16133, session-id=0, ns=764, nr=740 
13:07:28 l2tp,debug,packet     (M) Message-Type=HELLO 
13:07:28 l2tp,debug,packet rcvd control message (ack) from 89.*.*.*:1701 to 176.*.*.*:1701 
13:07:28 l2tp,debug,packet     tunnel-id=126, session-id=0, ns=740, nr=765 
13:07:28 l2tp,debug,packet rcvd control message from 89.*.*.*:1701 to 176.*.*.*:1701 
13:07:28 l2tp,debug,packet     tunnel-id=126, session-id=0, ns=740, nr=765 
13:07:28 l2tp,debug,packet     (M) Message-Type=HELLO 
13:07:28 l2tp,debug,packet sent control message (ack) to 89.*.*.*:1701 from 176.*.*.*:1701 
13:07:28 l2tp,debug,packet     tunnel-id=16133, session-id=0, ns=765, nr=741 
13:07:43 ipsec,debug ===== received 92 bytes from 89.*.*.*[500] to 176.*.*.*[500] 
13:07:43 ipsec,debug receive Information. 
13:07:43 ipsec,debug hash(sha1) 
13:07:43 ipsec,debug hash validated. 
13:07:43 ipsec,debug begin. 
13:07:43 ipsec,debug seen nptype=8(hash) len=24 
13:07:43 ipsec,debug seen nptype=11(notify) len=32 
13:07:43 ipsec,debug succeed. 
13:07:43 ipsec,debug 89.*.*.* notify: R_U_THERE 
13:07:43 ipsec,debug 89.*.*.* DPD R-U-There received 
13:07:43 ipsec,debug hash(sha1) 
13:07:43 ipsec,debug 92 bytes from 176.*.*.*[500] to 89.*.*.*[500] 
13:07:43 ipsec,debug 1 times of 92 bytes message will be sent to 89.*.*.*[500] 
13:07:43 ipsec,debug sendto Information notify. 
13:07:43 ipsec,debug received a valid R-U-THERE, ACK sent 
13:07:58 ipsec,debug ===== received 92 bytes from 89.*.*.*[500] to 176.*.*.*[500] 
13:07:58 ipsec,debug receive Information. 
13:07:58 ipsec,debug hash(sha1) 
13:07:58 ipsec,debug hash validated. 
13:07:58 ipsec,debug begin. 
13:07:58 ipsec,debug seen nptype=8(hash) len=24 
13:07:58 ipsec,debug seen nptype=11(notify) len=32 
13:07:58 ipsec,debug succeed. 
13:07:58 ipsec,debug 89.*.*.* notify: R_U_THERE 
13:07:58 ipsec,debug 89.*.*.* DPD R-U-There received 
13:07:58 ipsec,debug hash(sha1) 
13:07:58 ipsec,debug 92 bytes from 176.*.*.*[500] to 89.*.*.*[500] 
13:07:58 ipsec,debug 1 times of 92 bytes message will be sent to 89.*.*.*[500] 
13:07:58 ipsec,debug sendto Information notify. 
13:07:58 ipsec,debug received a valid R-U-THERE, ACK sent 
13:08:06 l2tp,ppp,debug,packet  Tadej: sent LCP EchoReq id=0x1c 
13:08:06 l2tp,ppp,debug,packet     <magic 0x19c46e43> 
13:08:06 l2tp,ppp,debug,packet  Tadej: rcvd LCP EchoRep id=0x1c 
13:08:06 l2tp,ppp,debug,packet     <magic 0x178de113> 
13:08:21 ipsec,debug ===== received 92 bytes from 89.*.*.*[500] to 176.*.*.*[500] 
13:08:21 ipsec,debug receive Information. 
13:08:21 ipsec,debug hash(sha1) 
13:08:21 ipsec,debug hash validated. 
13:08:21 ipsec,debug begin. 
13:08:21 ipsec,debug seen nptype=8(hash) len=24 
13:08:21 ipsec,debug seen nptype=11(notify) len=32 
13:08:21 ipsec,debug succeed. 
13:08:21 ipsec,debug 89.*.*.* notify: R_U_THERE 
13:08:21 ipsec,debug 89.*.*.* DPD R-U-There received 
13:08:21 ipsec,debug hash(sha1) 
13:08:21 ipsec,debug 92 bytes from 176.*.*.*[500] to 89.*.*.*[500] 
13:08:21 ipsec,debug 1 times of 92 bytes message will be sent to 89.*.*.*[500] 
13:08:21 ipsec,debug sendto Information notify. 
13:08:21 ipsec,debug received a valid R-U-THERE, ACK sent 
13:08:28 l2tp,debug,packet sent control message to 89.*.*.*:1701 from 176.*.*.*:1701 
13:08:28 l2tp,debug,packet     tunnel-id=16133, session-id=0, ns=765, nr=741 
13:08:28 l2tp,debug,packet     (M) Message-Type=HELLO 
13:08:28 l2tp,debug,packet rcvd control message (ack) from 89.*.*.*:1701 to 176.*.*.*:1701 
13:08:28 l2tp,debug,packet     tunnel-id=126, session-id=0, ns=741, nr=766 
13:08:28 l2tp,debug,packet rcvd control message from 89.*.*.*:1701 to 176.*.*.*:1701 
13:08:28 l2tp,debug,packet     tunnel-id=126, session-id=0, ns=741, nr=766 
13:08:28 l2tp,debug,packet     (M) Message-Type=HELLO 
13:08:28 l2tp,debug,packet sent control message (ack) to 89.*.*.*:1701 from 176.*.*.*:1701 
13:08:28 l2tp,debug,packet     tunnel-id=16133, session-id=0, ns=766, nr=742 
13:08:43 ipsec,debug ===== received 92 bytes from 89.*.*.*[500] to 176.*.*.*[500] 
13:08:43 ipsec,debug receive Information. 
13:08:43 ipsec,debug hash(sha1) 
13:08:43 ipsec,debug hash validated. 
13:08:43 ipsec,debug begin. 
13:08:43 ipsec,debug seen nptype=8(hash) len=24 
13:08:43 ipsec,debug seen nptype=11(notify) len=32 
13:08:43 ipsec,debug succeed. 
13:08:43 ipsec,debug 89.*.*.* notify: R_U_THERE 
13:08:43 ipsec,debug 89.*.*.* DPD R-U-There received 
13:08:43 ipsec,debug hash(sha1) 
13:08:43 ipsec,debug 92 bytes from 176.*.*.*[500] to 89.*.*.*[500] 
13:08:43 ipsec,debug 1 times of 92 bytes message will be sent to 89.*.*.*[500] 
13:08:43 ipsec,debug sendto Information notify. 
13:08:43 ipsec,debug received a valid R-U-THERE, ACK sent 
13:08:58 ipsec,debug ===== received 92 bytes from 89.*.*.*[500] to 176.*.*.*[500] 
13:08:58 ipsec,debug receive Information. 
13:08:58 ipsec,debug hash(sha1) 
13:08:58 ipsec,debug hash validated. 
13:08:58 ipsec,debug begin. 
13:08:58 ipsec,debug seen nptype=8(hash) len=24 
13:08:58 ipsec,debug seen nptype=11(notify) len=32 
13:08:58 ipsec,debug succeed. 
13:08:58 ipsec,debug 89.*.*.* notify: R_U_THERE 
13:08:58 ipsec,debug 89.*.*.* DPD R-U-There received 
13:08:58 ipsec,debug hash(sha1) 
13:08:58 ipsec,debug 92 bytes from 176.*.*.*[500] to 89.*.*.*[500] 
13:08:58 ipsec,debug 1 times of 92 bytes message will be sent to 89.*.*.*[500] 
13:08:58 ipsec,debug sendto Information notify. 
13:08:58 ipsec,debug received a valid R-U-THERE, ACK sent 
13:09:06 l2tp,ppp,debug,packet  Tadej: sent LCP EchoReq id=0x1d 
13:09:06 l2tp,ppp,debug,packet     <magic 0x19c46e43> 
13:09:06 l2tp,ppp,debug,packet  Tadej: rcvd LCP EchoRep id=0x1d 
13:09:06 l2tp,ppp,debug,packet     <magic 0x178de113> 
13:09:07 l2tp,ppp,debug,packet  Tadej: rcvd LCP TermReq id=0x4 
13:09:07 l2tp,ppp,debug,packet     Link inactive 
13:09:07 l2tp,ppp,debug Tadej: LCP closed 
13:09:07 l2tp,ppp,debug Tadej: CCP lowerdown 
13:09:07 l2tp,ppp,debug Tadej: BCP lowerdown 
13:09:07 l2tp,ppp,debug Tadej: BCP down event in starting state 
13:09:07 l2tp,ppp,debug Tadej: IPCP lowerdown 
13:09:07 l2tp,ppp,debug Tadej: IPCP closed 
13:09:07 l2tp,ppp,debug Tadej: IPV6CP lowerdown 
13:09:07 l2tp,ppp,debug Tadej: IPV6CP down event in starting state 
13:09:07 l2tp,ppp,debug Tadej: MPLSCP lowerdown 
13:09:07 l2tp,ppp,debug,packet  Tadej: sent LCP TermAck id=0x4 
13:09:07 l2tp,ppp,debug Tadej: LCP lowerdown 
13:09:07 l2tp,ppp,debug Tadej: CCP close 
13:09:07 l2tp,ppp,debug Tadej: BCP close 
13:09:07 l2tp,ppp,debug Tadej: IPCP close 
13:09:07 l2tp,ppp,debug Tadej: IPV6CP close 
13:09:07 l2tp,ppp,debug Tadej: MPLSCP close 
13:09:07 l2tp,ppp,info Tadej: terminating... 
13:09:07 l2tp,debug,packet sent control message to 89.*.*.*:1701 from 176.*.*.*:1701 
13:09:07 l2tp,debug,packet     tunnel-id=16133, session-id=6495, ns=766, nr=742 
13:09:07 l2tp,debug,packet     (M) Message-Type=CDN 
13:09:07 l2tp,debug,packet     (M) Result-Code=1 
13:09:07 l2tp,debug,packet     (M) Assigned-Session-ID=23 
13:09:07 l2tp,debug session 23 entering state: stopping 
13:09:07 l2tp,ppp,debug Tadej: LCP lowerdown 
13:09:07 l2tp,ppp,debug Tadej: LCP down event in starting state 
13:09:07 l2tp,ppp,info Tadej: disconnected 
13:09:07 l2tp,ppp,info Tadej: initializing... 
13:09:07 l2tp,ppp,info Tadej: connecting... 
13:09:07 l2tp,debug session 24 entering state: wait-reply 
13:09:07 l2tp,debug,packet rcvd control message (ack) from 89.*.*.*:1701 to 176.*.*.*:1701 
13:09:07 l2tp,debug,packet     tunnel-id=126, session-id=23, ns=742, nr=767 
13:09:07 l2tp,debug,packet sent control message to 89.*.*.*:1701 from 176.*.*.*:1701 
13:09:07 l2tp,debug,packet     tunnel-id=16133, session-id=0, ns=767, nr=742 
13:09:07 l2tp,debug,packet     (M) Message-Type=ICRQ 
13:09:07 l2tp,debug,packet     (M) Assigned-Session-ID=24 
13:09:07 l2tp,debug,packet     (M) Call-Serial-Number=109 
13:09:07 l2tp,debug,packet     (M) Bearer-Type=0x0 
13:09:07 l2tp,debug,packet rcvd control message from 89.*.*.*:1701 to 176.*.*.*:1701 
13:09:07 l2tp,debug,packet     tunnel-id=126, session-id=23, ns=742, nr=767 
13:09:07 l2tp,debug,packet     (M) Message-Type=CDN 
13:09:07 l2tp,debug,packet     (M) Result-Code=2 
13:09:07 l2tp,debug,packet         Error-Code=2 
13:09:07 l2tp,debug,packet         Error-Message="Result Code: expected at least 10, got 8" 
13:09:07 l2tp,debug,packet     (M) Assigned-Session-ID=6495 
13:09:07 l2tp,debug,packet sent control message (ack) to 89.*.*.*:1701 from 176.*.*.*:1701 
13:09:07 l2tp,debug,packet     tunnel-id=16133, session-id=0, ns=768, nr=743 
13:09:07 l2tp,debug session 23 entering state: stopping 
13:09:07 l2tp,debug session 23 entering state: dead 
13:09:07 l2tp,debug,packet rcvd control message from 89.*.*.*:1701 to 176.*.*.*:1701 
13:09:07 l2tp,debug,packet     tunnel-id=126, session-id=24, ns=743, nr=768 
13:09:07 l2tp,debug,packet     (M) Message-Type=ICRP 
13:09:07 l2tp,debug,packet     (M) Assigned-Session-ID=34679 
13:09:07 l2tp,debug session 24 entering state: established 
13:09:07 l2tp,debug,packet sent control message to 89.*.*.*:1701 from 176.*.*.*:1701 
13:09:07 l2tp,debug,packet     tunnel-id=16133, session-id=34679, ns=768, nr=744 
13:09:07 l2tp,debug,packet     (M) Message-Type=ICCN 
13:09:07 l2tp,debug,packet     (M) Framing-Type=0x1 
13:09:07 l2tp,debug,packet     (M) Tx-Connect-Speed-BPS=100000000 
13:09:07 l2tp,debug,packet rcvd control message (ack) from 89.*.*.*:1701 to 176.*.*.*:1701 
13:09:07 l2tp,debug,packet     tunnel-id=126, session-id=0, ns=744, nr=768 
13:09:07 l2tp,debug,packet rcvd control message (ack) from 89.*.*.*:1701 to 176.*.*.*:1701 
13:09:07 l2tp,debug,packet     tunnel-id=126, session-id=24, ns=744, nr=769 
13:09:07 l2tp,ppp,debug Tadej: LCP lowerup 
13:09:07 l2tp,ppp,debug,packet  Tadej: sent LCP ConfReq id=0x78 
13:09:07 l2tp,ppp,debug,packet    <mru 1450> 
13:09:07 l2tp,ppp,debug,packet    <magic 0x16bedb29> 
13:09:07 l2tp,ppp,debug Tadej: LCP open 
13:09:08 l2tp,ppp,debug,packet  Tadej: rcvd LCP ConfReq id=0x1 
13:09:08 l2tp,ppp,debug,packet    <asyncmap 0x0> 
13:09:08 l2tp,ppp,debug,packet    <magic 0x517fd1a7> 
13:09:08 l2tp,ppp,debug,packet    <auth  mschap2> 
13:09:08 l2tp,ppp,debug,packet  Tadej: sent LCP ConfRej id=0x1 
13:09:08 l2tp,ppp,debug,packet    <asyncmap 0x0> 
13:09:08 l2tp,ppp,debug,packet  Tadej: rcvd LCP ConfReq id=0x2 
13:09:08 l2tp,ppp,debug,packet    <magic 0x517fd1a7> 
13:09:08 l2tp,ppp,debug,packet    <auth  mschap2> 
13:09:08 l2tp,ppp,debug,packet  Tadej: sent LCP ConfAck id=0x2 
13:09:08 l2tp,ppp,debug,packet    <magic 0x517fd1a7> 
13:09:08 l2tp,ppp,debug,packet    <auth  mschap2> 
13:09:08 l2tp,ppp,debug Tadej: LCP timer 
13:09:08 l2tp,ppp,debug,packet  Tadej: sent LCP ConfReq id=0x79 
13:09:08 l2tp,ppp,debug,packet    <mru 1450> 
13:09:08 l2tp,ppp,debug,packet    <magic 0x16bedb29> 
13:09:08 l2tp,ppp,debug,packet  Tadej: rcvd LCP ConfAck id=0x79 
13:09:08 l2tp,ppp,debug,packet    <mru 1450> 
13:09:08 l2tp,ppp,debug,packet    <magic 0x16bedb29> 
13:09:08 l2tp,ppp,debug Tadej: LCP opened 
13:09:08 l2tp,ppp,debug,packet  Tadej: rcvd CHAP Challenge id=0x92 
13:09:08 l2tp,ppp,debug,packet     <challenge len=16> 
13:09:08 l2tp,ppp,debug,packet     <name xl2tpd> 
13:09:08 l2tp,ppp,debug,packet  Tadej: sent CHAP Response id=0x92 
13:09:08 l2tp,ppp,debug,packet     <response len=49> 
13:09:08 l2tp,ppp,debug,packet     <name Tadej> 
13:09:08 l2tp,ppp,debug,packet  Tadej: rcvd CHAP Success id=0x92 
13:09:08 l2tp,ppp,debug,packet     S=609CF33324A496A918A15BAE0075D3D5D4BF8AA0 
13:09:08 l2tp,ppp,info Tadej: authenticated 
13:09:08 l2tp,ppp,debug Tadej: IPCP lowerup 
13:09:08 l2tp,ppp,debug Tadej: IPCP open 
13:09:08 l2tp,ppp,debug,packet  Tadej: sent IPCP ConfReq id=0x72 
13:09:08 l2tp,ppp,debug,packet     <addr 0.0.0.0> 
13:09:08 l2tp,ppp,debug Tadej: IPV6CP open 
13:09:08 l2tp,ppp,debug Tadej: MPLSCP lowerup 
13:09:08 l2tp,ppp,debug Tadej: MPLSCP open 
13:09:08 l2tp,ppp,debug,packet  Tadej: sent MPLSCP ConfReq id=0x37 
13:09:08 l2tp,ppp,debug Tadej: BCP open 
13:09:08 l2tp,ppp,debug Tadej: CCP lowerup 
13:09:08 l2tp,ppp,debug Tadej: CCP open 
13:09:08 l2tp,ppp,debug,packet  Tadej: rcvd IPCP ConfReq id=0x1 
13:09:08 l2tp,ppp,debug,packet     <addr 10.255.255.0> 
13:09:08 l2tp,ppp,debug,packet  Tadej: sent IPCP ConfAck id=0x1 
13:09:08 l2tp,ppp,debug,packet     <addr 10.255.255.0> 
13:09:08 l2tp,ppp,debug,packet  Tadej: rcvd IPCP ConfNak id=0x72 
13:09:08 l2tp,ppp,debug,packet     <addr 192.168.3.25> 
13:09:08 l2tp,ppp,debug,packet  Tadej: sent IPCP ConfReq id=0x73 
13:09:08 l2tp,ppp,debug,packet     <addr 192.168.3.25> 
13:09:08 l2tp,ppp,debug,packet  Tadej: rcvd LCP ProtRej id=0x3 
13:09:08 l2tp,ppp,debug,packet      82 81 01 37 00 04 
13:09:08 l2tp,ppp,debug,packet  Tadej: rcvd IPCP ConfAck id=0x73 
13:09:08 l2tp,ppp,debug,packet     <addr 192.168.3.25> 
13:09:08 l2tp,ppp,debug Tadej: IPCP opened 
13:09:08 l2tp,ppp,info Tadej: connected 
13:09:22 system,info log rule changed by admin 
13:09:24 system,info log rule changed by admin 
13:13:33 system,info,account user admin logged in from 192.168.3.130 via telnet

The server is telling the client to disconnect
13:09:07 l2tp,ppp,debug,packet Tadej: rcvd LCP TermReq id=0x4
which is is complying with
13:09:07 l2tp,ppp,debug,packet Tadej: sent LCP TermAck id=0x4
so some setting at the server end, maybe an idle timeout.

Thank you for the answer.

Apparently there is an idle timeout option in USG, that cannot be changed. Interesting thing is, that even keepalive packets don’t help in maintaining the connection and that the other Hap Ac² has no problems with disconnections.

Perhaps the other connection is transferring some real traffic and USG is ignoring protocol keepalive traffic when looking for idle conditions.

Probably. Is there any option to generate some traffic in Mikrotik and send it through L2TP every 25 minutes?

The user of the other Hap Ac² is saying that he didn’t use the tunnel for 10 hours, because we only use it to authenticate one web page with the correct ip adress through mangle rules, but you never know.

You could leave a ping running to confirm if the tunnel does then stay up on the problematic link.

If this does turn out to be the case then abusing Tools > Netwatch would do - e.g. interval 25m, no up-script or down-script.

Try adding usg tunnel ip in tools/ watchdog

I tried that, first with ping and tunnel survived the 30 minutes disconnection. After that i added L2TP server IP in Netwatch as suggested and it works perfectly. I already have 13 hours uptime without disconnection. Thank you for advice and all the help.