In this section, we will survey the TCP header in packets. As you know TCP is a layer 4 protocol and its header is also have parameters about layer 4. Before TCP header, packet has layer 3 header, it is IP in our example. And before IP header, packet has layer two header, and this is ethernet II in the example below.

You can also check the below capture, for understanding the tcp header fields.

Source & Destination Port Number
As you can see below, the source and the destnation port number field is shown with repeated red lines. Each port field is 16 bits long
When a host need to send data, it need the ip address and the port number of the remote node. The ip address is a layer 3 parameter, so it is mentined in ip header. But the port fields are layer 4 parameters and they are mentined in TCP header.
IP header has the destination ip address that make the destination unique in the network. And provide reaching the node. But destination port number defines the target service in the destination node. This can be ftp, http or any layer 4 service what else.

Let’s explain this parameters with a real world example.
You can reach the TCP Header article series below…
TCP Header Part – 1
TCP Header Part – 2
TCP Header Part – 3
TCP Header Part – 4
TCP Header Part – 5
Table of Contents
gokhankosem
Gokhan Kosem is a Network Engineer, Instructor and the Founder of IPCisco.com with 15+ years of experience in Cisco, Nokia, Huawei, Juniper, Linux, Service Provider Networks, Routing and Switching technologies.
He has worked on the backbone networks of major service providers and network vendors including Nortel, Alcatel-Lucent (Nokia) and has extensive hands-on experience with Cisco, Huawei, Juniper and Nokia networking technologies.
He has trained thousands of networking students worldwide through IPCisco.com, Udemy, books, labs, quizzes, and educational content across multiple social media platforms.
IPCisco.com | Best Route to Your Dreams











Hi,
Excellent info.
I got a clear pic of tcp header.
Thanks for your effort.