Protocols
Saved & recent

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
Related
Protocol extensibility, Protocol conformance, TLS, Capability negotiation
Further reading
IETF RFC 6709 — Design Considerations for Protocol Extensions
client server v2 v3 v1 v2 v2 agreed version v3 v1 ∩ defined failure no common version hypothetical version sets
Hypothetical support sets share version 2. The protocol must define both selection and the no-common-version outcome.

View in the full Protocols collection