Understanding Protocol / State Machine
Jason A. Donenfeld
Jason at zx2c4.com
Wed Jan 2 19:20:28 CET 2019
On Wed, Jan 2, 2019 at 7:03 PM Iain Douglas <wireguard at 1n6.org.uk> wrote:
> 1. Handshake < 119 seconds ago the link takes ~ 15 seconds to recover
> 2. Handshake between 120 and 179 seconds ago - 1st packet is lost then
> link recovers
> 3. Handshake >=180 second ago - link just works as normal.
For 1, it's hitting the timeout of detecting the dead peer before
reestablishing the handshake, since it still believes it has a valid
For 2, it's the same as 1, except that when sending packets when your
current session is older than two minutes, it will start trying to
create a new one. The way to think of this that sessions live
optimally for only 2 minutes and maximally for 3.
For 3, the current session is unusable and already cleared from
memory, since it expired after 3 minutes, and so a new session is
established before the packet is sent.
More information about the WireGuard