educative.io

Explanantion For TCP Header

Hi Guys,

Can You please explain the calculation here. I am getting the header length confused for the value of the header length.

I don’t understand your answer?

Can you kindly explain


Type your question above this line.

Course: https://www.educative.io/collection/10370001/6105520698032128
Lesson: https://www.educative.io/collection/page/10370001/6105520698032128/5652844986236928

Hi, the TCP header length can vary from 20-60 bytes. The section in TCP header that stores the length has the storage space of 4 bits only, which means the maximum number it can store is 1111 = 15. We compute the header in such a way that the value is multiplied by 4 to find out the length of the tcp header. If the length is 20, then 5(0101) will be stored in this section and if it is 60 then 15(1111) will be stored in this section. The values in this section of the header can only range from 5(54 = 20) to 15(154 = 60).

Hope this helped.