SIZE : 20-60 Bytes ( 20 min + 40 options )
USE : In services which require accuracy and error-checking.
ADVANTAGE : requests retransmission of lost packets, rearranges out-of-order packets, and even helps minimize network congestion, accurate delivery of data , reliable because of acknowledgements.
DISADVANTAGE : Slower, not real-time. Cannot be used for VoIP , streaming ,etc.
PACKET STRUCTURE :
|
Field |
Size( bits ) | Significance | |
|
|
|
|
|
| Source Port |
16 |
Identifies the sending port |
|
| Destinaton Port |
16 |
identifies the receiving port |
|
| Sequence number |
32 |
|
|
| Ack number |
32 |
if the ACK flag is set then the value of this field is the next expected sequence number that the receiver is expecting |
|
| Data offest |
4 |
specifies the size of the TCP header in 32-bit words. The minimum size header is 5 words and the maximum is 15 words thus giving the minimum size of 20 bytes and maximum of 60 bytes, allowing for up to 40 bytes of options in the header. This field gets its name from the fact that it is also the offset from the start of the TCP segment to the actual data. |
|
| Reserved |
4 |
for future use and should be set to zero |
|
| Flags |
|
|
|
|
|
CWR |
1 |
Congestion Window Reduced (CWR) flag is set by the sending host to indicate that it received a TCP segment with the ECE flag set and had responded in congestion control mechansim (added to header by RFC 3168). |
|
|
ECE |
1 |
indicates |
|
|
URG |
1 |
indicates that the URGent pointer field is significant |
|
|
ACK |
1 |
indicates that the ACKnowledgment field is significant. All packets after the initial SYN packet sent by the client should have this flag set |
|
|
PSH |
1 |
Push function |
|
|
RST |
1 |
Reset the connection |
|
|
SYN |
1 |
Synchronize sequence numbers |
|
|
FIN |
1 |
No more data from sender |
| Window Size |
16 |
the size of the receive window, which specifies the number of bytes (beyond the sequence number in the acknowledgment field) that the receiver is currently willing to receive |
|
| Checksum |
16 |
The 16-bit checksum field is used for error-checking of the header and data |
|
| Urgent Pointer |
16 |
if the URG flag is set, then this 16-bit field is an offset from the sequence number indicating the last urgent data byte |
|
| Options |
0-320 |
The length of this field is determined by the data offset field. Options 0 and 1 are a single byte (8 bits) in length. The remaining options indicate the total length of the option (expressed in bytes) in the second byte. |
|
I’ve mooched everything of Wikipedia.. This would’ve been a personal document, but i thought sharing it would be a better idea.
Tomorrow -> UDP.
