Retransmission¶
Retransmission timeouts in the IKEv2 daemon charon can be configured globally using strongswan.conf options. Three keys are used to configure retransmission behavior:
| key | Type | Default | Description |
| charon.retransmit_tries | Integer | 5 | Number of retransmissions to send before giving up |
| charon.retransmit_timeout | Double | 4.0 | Timeout in seconds |
| charon.retransmit_base | Double | 1.8 | Base of exponential backoff |
The following algorithm is used to calculate the timeout:
relative timeout = retransmit_timeout * retransmit_base ^ (n-1)
Where n is the current retransmission count.
Using the default values, packets are retransmitted in:
| Retransmission | Formula | Relative timeout | Absolute timeout |
| 1 | 4 * 1.8 ^ 0 | 4s | 4s |
| 2 | 4 * 1.8 ^ 1 | 7s | 11s |
| 3 | 4 * 1.8 ^ 2 | 13s | 24s |
| 4 | 4 * 1.8 ^ 3 | 23s | 47s |
| 5 | 4 * 1.8 ^ 4 | 42s | 89s |
| giving up | 4 * 1.8 ^ 5 | 76s | 165s |