TCP Header

TCP segment structure
Seq. numbers:
– byte stream “number” of first byte in segment’s data
– seq numbers of next byte expected from other side
– cumulative ACK
Q: how receiver handles out-of-order segments
– A: TCP spec doesn’t say, - up to implementor
Every segment of TCP has a sequence number so it is easy to reassemble and also take
care of the loss of packet and retransmission is done
The segment details are shown below
The SYN bit used for connection setup and the FIN bit for the release
Urgent data means it has to be delivered faster which indicate by the pointer

The Checksum uses CRC