Why does QUIC packets require a sequence number?

Viewed 46

This question was closed on the Networking SE because "questions about protocols above OSI layer-4 are off-topic here" so I'm trying here.

This may be a silly question, but if in QUIC we maintain separate sliding windows for each stream, why is there a need for sequencing even below the stream level?

It seems to me that an application will not receive the same data twice because we already sequence streams by themselves, and we also can acknowledge each stream separately without sequencing the packets themselves.

1 Answers

I presume you mean packet number, as there isn't a sequence number as such in QUIC.

If so, then the packet number used in QUIC performs a number of roles, such as being used within the ACK process, sequencing at the packet level, and also is used as part of the nonce input into the AEAD encryption process.

From https://datatracker.ietf.org/doc/html/rfc9001 5.3 AEAD

The nonce, N, is formed by combining the packet protection IV with the packet number.

From https://datatracker.ietf.org/doc/html/rfc9000 13.2.3. Managing ACK Ranges

A receiver SHOULD include an ACK Range containing the largest received packet number in every ACK frame.

Related