Horje
How To Calculate TCP Header?

Answer: The TCP header can be calculated with the help of data offset field value, where TCP Header can range from 20 bytes to 60 bytes.

Data Offset

Data offset is also known as header length field. Data offset is a 4-bit field that describes the length of TCP header. This field holds the value between 5 and 15, where 5 is the minimum value whereas 15 is the maximum value. If the value of data offset is 5, it means the length of header is 20 bytes.

Calculate TCP Header

Total TCP Header Length = 4* Data Offset Value

Example 1:

Data Offset value: 10

Total TCP Header Length = 4* 10

Total TCP Header Length = 40 Bytes

Example 2:

Data Offset value: 5

Total TCP Header Length = 4* 5

Total TCP Header Length = 20 Bytes

Conclusion

Data offset value can be used for calculating the TCP header. Minimum length of TCP header can be 20 bytes whereas maximum length of TCP header can be 60 bytes.




Reffered: https://www.geeksforgeeks.org


Computer Networks

Related
How to identify unicast ip address? How to identify unicast ip address?
How domain name is transferred in IP address? How domain name is transferred in IP address?
What Does /128, /64, /48 Mean in IP Addresses? What Does /128, /64, /48 Mean in IP Addresses?
Cyber Kill Chain Cyber Kill Chain
What is Cyber Vandalism and How to Avoid It? What is Cyber Vandalism and How to Avoid It?

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
15