ZelluX
ZelluX

Reputation: 72605

Why does TCP header contain both ACK and SEQ fields?

Since TCP header is a relatively large overhead, why don't we compress it in the way that ACK and SEQ share the same field, and they can still be distinguished by flags in the header?

Upvotes: 3

Views: 2566

Answers (3)

anon
anon

Reputation:

Because they are not used exclusively. Below is most important: connection negotiation, i.e. the Three Way Handshake:

Three way handshake
(source: wikimedia.org)

The picture is from wikimedia commons. It presents how TCP connection is negotiated, and shows that ACK and SEQ are used together in the same header to establish a connection (I write this to be sure that the answer is helpful even if the picture would disappear someday).

Upvotes: 11

Nikolai Fetissov
Nikolai Fetissov

Reputation: 84149

Because the connection is full-duplex - one sequences packets to the peer, the other acknowledges packets from the peer.

Upvotes: 4

mikelong
mikelong

Reputation: 3844

Because they can both be present in a header at the same time. One is for tagging the data being sent, the other is what the sender is expecting in the next packet back. See wikipedia for more information.

Upvotes: 0

Related Questions