2

What is the minimum packet size for TCP over IPv4 ?

Hi guys, i am quite stuck on this very question.

Assume i wanna transmit a data of 12KB

and through IPv4 TCP

I did the following calculation

 20 Bytes for TCP Headers
 4 Bytes for Source Address
 4 Bytes for Destination Address
 4 Bytes on Zeros, Protocol and TCP Length
 2 Bytes on Checksum
 12 Bytes on Data

But i try check my friend result with mine, we get the different one..

I use the example on wikipedia on TCP, and i just assume

TCP header is 20Bytes and the calculation above ( i use all the TCP Pseudo Header that is pink ) .

What did i do wrong in my calculation. as 2 of my friends answer is 6 bytes more than me

My TCP header is 20 bytes IPV4 is 14 bytes Data is 12 Bytes

The only difference between us is my fren IPv4 is 20 bytes. which field did i do wrongly on my ipv4 calculation?

Thanks

user207421
  • 305,947
  • 44
  • 307
  • 483
user1916580
  • 23
  • 1
  • 1
  • 6

2 Answers2

2

The minimum TCP header size is 20 bytes and the minimum IPv4 header size is 20 bytes. So a TCP/IPv4 packet containing 0 byte of data would be at the minimum 40 bytes assuming you can actually send 0 byte over TCP, which you can't. So, the minimum would be 41 bytes.

Coincoin
  • 27,880
  • 7
  • 55
  • 76
2

A quick Google search yields this diagram of the TCP header.

It looks like you're missing the following fields.

  • 2 Bytes congestion window
  • 4 bytes sequence
  • 2 Bytes Urgent Pointer

Not sure which you are classifying as "Protocol", etc, but the main one missing looks like sequence number. Minimum should be 20 bytes for the TCP header.

neirbowj
  • 635
  • 5
  • 17
jeremy
  • 4,294
  • 3
  • 22
  • 36