Summary

  • RFC 5925 extends TCP's 32-bit sequence number with locally maintained SND.SNE and RCV.SNE state before calculating or checking a TCP-AO MAC.
  • The extension is not another field sent on the wire: the receiver infers the right high-order value from sequence transitions, connection context and reordering near the wrap boundary.

Imagine a durable routing session after enough data has crossed it for the TCP sequence number to wrap. A new segment can now carry the same visible 32-bit sequence value as a much older segment. Ordinary TCP still interprets that value within the current receive window, but an authenticator needs another distinction: the two moments must not produce identical authenticated input merely because the low-order number returned.

RFC 5925 supplies that distinction with a 32-bit Sequence Number Extension. Each connection starts with SND.SNE and RCV.SNE at zero. For an outgoing segment, the sender prepends the applicable SNE to the IP pseudoheader and TCP material supplied to the MAC. For an incoming segment, the receiver reconstructs the corresponding high-order value before validating the MAC. Together, the SNE and TCP sequence number emulate a 64-bit sequence space for authentication.

The important design choice is absence from the wire. TCP-AO does not add a second transmitted sequence counter that could disagree with TCP's own state. A sender may maintain an internal 64-bit sequence value and use its upper half as SND.SNE. The receiver has the harder task: it observes only the 32-bit sequence number and must infer RCV.SNE from the connection's history.

RFC 5925 illustrates one way to do that. A transition from the high half of the number space to the low half marks a wrap and increments the extension. If a high-numbered segment arrives later because it was reordered across the boundary, the receiver uses the previous extension for that segment instead of treating it as belonging to the new cycle. A flag prevents a second increment until sequence progress reaches the opposite transition region. The document presents this as one possible implementation, not the only permissible internal design.

The construction makes an old visible number belong to a new authenticated epoch. It does not turn the SNE into an operator identity, a clock or a global counter. Its meaning is local to one direction of one connection, and its correctness depends on maintaining that connection context.

Sources