Version negotiation
Also called: protocol version negotiation
Version negotiation lets peers determine a mutually supported set of protocol rules. A version number is useful only when the protocol also defines how peers advertise support, select a version, and handle an unsupported choice. Negotiating a protocol version differs from selecting an optional feature within one version.
In a hypothetical service, a client supports versions 2 and 3 while a server supports 1 and 2, so version 2 is their shared choice. With no overlap, the connection should fail in a defined way. Security-sensitive negotiation also needs protection against an attacker forcing an obsolete or weaker choice.
- Read first
- Protocol