Summary

  • RTP's sample receiver put every unseen synchronization source on probation: one plausible packet bought nothing, and only a short consecutive run earned the right to be treated as a stream.
  • The same state machine refused to believe a huge sequence jump, banked the number that followed, and re-synchronised only when it arrived — protecting loss accounting without ever authenticating the sender or proving that anyone heard a thing.

A header can pass long before a source does

Picture a conference bridge that has never met SSRC 0x4A17. A datagram arrives carrying sequence number 41,900. Version 2: correct. Payload type: one this session understands. Padding and length: internally consistent. Every box on the checklist is ticked, and not one of those ticks proves the packet belongs in this conversation. It could be misaddressed traffic, a payload decrypted under the wrong context, a random collision, or the opening line of a genuine source whose history simply has not happened yet.

The original RTP specification, RFC 1889, walked straight into that evidentiary poverty. Its successor, RFC 3550, kept the design and sharpened the reasoning. For a source never heard before, all a receiver has is header plausibility — version, payload type, padding, extension, length. Those checks eliminate impossible readings. They cannot turn a single packet into a past.

So the receiver makes time part of the test. A newly observed SSRC goes on probation, and the sample algorithm waits for a short run of consecutive sequence numbers before granting it validity. At the typical MIN_SEQUENTIAL of two, packet 41,900 is still only a candidate. Packet 41,901 supplies the first fact that lives in neither packet alone: a relationship.

The relationship is modest on purpose. Two consecutive integers identify no human, authenticate no device, and promise no decodable audio. They simply make one hypothesis more useful than it was a packet ago — this looks like a source keeping a sequence.

Probation is a bill paid in latency

RTP let an application throw probationary packets away or hold them until validation, whichever delay it could stomach. That choice is where the real price of stronger admission shows up. Demand more consecutive packets and you shrink the odds that coincidental headers and numbers slip through — while withholding more of the opening media. On a lossy path, a long required run can stop a perfectly genuine source from ever becoming valid at all.

The standard never pretended one constant serves every application. It offered an algorithm and typical parameters in an appendix, and left the tuning to the people who knew the traffic. A receiver that has already accepted a valid RTCP packet starts with stronger context. A payload format whose timestamps climb predictably supplies another check. A telephone call, a stored stream and a high-delay multicast session need not buy the same balance between false admission and delayed sound.

Which is why “probation” is the better word than “authentication.” It is a local admission policy under uncertainty, and the receiver decides how much temporal consistency is worth the startup cost.

The number lived in a circular space

Once admitted, the source still could not be read like an ordinary integer. RTP carries a 16-bit sequence number: after 65,535 comes zero. A small number following a large one can mean a perfectly healthy wrap rather than a journey backwards.

The sample state keeps the highest observed number plus a count of completed 16-bit cycles. Together they form an extended sequence number for accounting, letting an RTCP report say how many packets were expected across wraps without ever widening the wire field.

Networks, meanwhile, reorder. A number slightly behind the maximum may be a late arrival or a duplicate; a number moderately ahead may reveal a gap. The receiver needs an acceptable neighbourhood around its current maximum, not a single equality test.

RFC 3550's example uses MAX_MISORDER 100 and MAX_DROPOUT 3,000, and the assumptions behind them matter: fifty packets per second, two seconds of maximum misordering, one minute of maximum dropout. These are not timeless natural constants. They describe the operational world in which the example draws its boundary.

An impossible jump got no instant biography

Now let the running source reach sequence 12,000 and then deliver 50,000. Count the difference as loss and you publish a confident disaster report. Accept 50,000 on sight as a restart and you invent a history out of one anomaly. It could be a damaged packet, stray traffic, a discontinuity, a source restart, or a very long stretch the receiver simply did not observe.

The sample algorithm takes neither shortcut. It rejects the large jump and stores the rejected number plus one as bad_seq. If the next packet received is 50,001, that pair supplies a consecutive beginning, and the receiver reinitialises sequence state as though 50,001 were the first accepted packet of a new epoch.

One suspicious number was not enough to redefine the past. Its successor made the restart hypothesis actionable.

This two-packet inference looks like initial probation but answers a different question. Probation asks whether an unseen SSRC deserves long-lived source state. Restart confirmation asks whether a known SSRC's old sequence history has stopped describing the packets now arriving. Both lean on continuity because no explicit restart message can be assumed to exist.

Resetting the counter was an admission of ignorance

When the receiver re-synchronises after a large jump, it resets packet-loss statistics. That looks like throwing evidence away. In truth, keeping the old baseline would manufacture evidence the receiver never had.

Several complete 16-bit cycles may have passed during an extended dropout. The source may have restarted at a random sequence number. Without an observed bridge, nobody knows how many packets belonged between the old epoch and the new one. A continuous cumulative-loss figure would convert that unknown interval into a precise-looking count.

RTP loss accounting is subtler than any dashboard percentage admits. RFC 3550 defines cumulative loss as expected packets minus packets actually received, and “received” includes late packets and duplicates — so the result can go negative when duplicates outnumber missing packets. RFC 3611 later added traces for loss and duplication, and advised reporters to preserve observed events rather than rush into interpretation.

The epoch boundary decides what the denominator means. A reset does not claim the earlier loss did not matter. It says one defensible piece of sequence arithmetic cannot cross an unobserved rebirth.

RFC 3550 repaired the example, not the idea

The mechanism appeared in RFC 1889 in 1996. When RFC 3550 replaced it in 2003, the change record documented small but consequential repairs. base_seq initialisation became the received sequence number rather than one less. The prose was corrected to say that the bad sequence number plus one is stored. Initialisation steps were separated so an implementer would not mistake one function call for the whole setup, and words lost while RFC 1889 was processed into publication were restored.

This history matters because examples become infrastructure. A pseudocode appendix gets copied more widely than the paragraph explaining its limits. An off-by-one in the starting point shifts expected-packet arithmetic, and ambiguous prose around bad_seq changes which second packet confirms a new epoch.

The correction also reveals where the design actually lives. The clever part is not the literal 2, the 100 or the 3,000. It is the placement of uncertainty into explicit state: candidate, valid sequence, acceptable reorder, suspicious discontinuity, confirmed new beginning.

Continuity was never cryptographic authority

A forged sender able to emit consecutive numbers passes a sequence-continuity test. A genuine sender fails it under loss. A misconfigured endpoint can produce beautifully ordered nonsense. RTP's header checks and probation are filters against accidental misdelivery and implausible state — not proofs of origin.

RFC 3711 later defined SRTP to provide confidentiality, message authentication and replay protection with proper key management. That is a different evidence layer entirely. Even SRTP does not prove a person listened, that the media was intelligible, or that a business conversation took place. It protects packets inside a cryptographic context.

The durable lesson is narrower and harder to shake. A field becomes evidence only through the state that interprets it. The first sequence number is a claim with no past. The second can establish continuity. A huge jump suspends the old account. The number after it can open a new epoch. At every step the receiver owns the decision — and owns the obligation to say only what that decision can actually support.

Sources