Lukas' Notes

network-protocols

Definition

Transmission Control Protocol

The Transmission Control Protocol (TCP) is a connection-oriented, reliable transport protocol. It sets up a connection via a three-way handshake, detects and retransmits lost or modified data, and delivers data to the application layer in the correct order.

Transmission control block

Definition

Transmission Control Block

A transmission control block (TCB) is a data structure maintained by a host for every open TCP connection. It records the connection state and the sequence numbers used to ensure reliable delivery.

Link to original

Sequence number

Definition

Sequence Number (TCP)

The sequence number is a 32-bit field in the TCP header that identifies the position of the first data byte in the current segment within the sender’s byte stream.

At connection setup, each side picks an initial sequence number (ISN) during the three-way handshake. Subsequent segments carry sequence number = ISN + bytes already sent.

The SYN and FIN flags consume one sequence number each, so a segment that only carries a SYN has sequence number = ISN and the next data byte starts at ISN + 1.

Link to original

Acknowledgement number

Definition

Acknowledgement Number (TCP)

The acknowledgement number is a 32-bit field in the TCP header that specifies the next sequence number the sender of the segment expects to receive.

It acknowledges all data bytes with sequence numbers less than this value, meaning the receiver has successfully received every byte up to acknowledgement number − 1.

The ACK flag must be set for the acknowledgement field to be valid. Once a connection is established, every segment (except the initial SYN) typically carries an ACK.

Link to original