Open In App

TCP Analysis using Wireshark

TCP or Transmission Control Protocol is one of the most important protocols or standards for enabling communication possible amongst devices present over a particular network. It has algorithms that solve complex errors arising in packet communications, i.e. corrupted packets, invalid packets, duplicates, etc. Since it is used with IP(Internet Protocol), many times it is also referred to as TCP/IP. In order to start a communication, the TCP first establishes a connection using the three-way-handshake. TCP’s efficiency over other protocols lies in its error detecting and correction attribute. Not only this, it organizes packets and segments larger data into a number of packets without disrupting the integrity of the data.

So now we are a bit familiar with TCP, let’s look at how we can analyze TCP using Wireshark, which is the most widely used protocol analyzer in the world. In order to analyze TCP, you first need to launch Wireshark and follow the steps given below:



 

Now we have the captured packets and you will be having the captured packet list on the screen. Since we are concerned here with only TCP packets as we are doing TCP analysis, we shall be filtering out TCP packets from the packet pool. You can apply a filter in any of the following ways:

 

 

Here you will have the list of TCP packets. The first three packets of this list are part of the three-way handshake mechanism of TCP to establish a connection. Let’s get a basic knowledge of this mechanism which happens in the following 3 steps:



 

You can observe these three steps in the first three packets of the TCP list where each of the packet types i.e. ACK, SYN, SYN-ACK is listed on their respective side.  Now to examine a packet closely we shall select a packet and in the expert view in the packet detail section just below the packet list we shall be having the TCP parameters as you can see in the below diagram. Let’s look at each one of them and their significance:

A major section of this TCP packet analysis is the flag section of a packet which gives further in-depth information about the packet. The flag section has the following parameters which are enlisted with their respective significance.  

 

Further, in the subsections we have:

Finally, after we have done the analysis it’s time to understand how the TCP connection is closed. It is commonly known as a TCP termination handshake. It further happens in the following steps:

Article Tags :