Tcp
Tcp
Tcp
structure,RTT
estimation
Understanding the backbone of reliable
data transmission in networks
prepared by:
RATHIGHA.S
2201112035
INFORMATION TECHNOLOGY
Agenda
1. introduction
2. TCP features
1.Connection management
Includes connection initialization and termination, which is done using a 3-way
handshake.
2.Flow control
Ensures that messages are delivered in the correct order. The receiving TCP process
indicates the highest sequence number it can receive.
3.Congestion control
Prevents over-congestion of traffic on routers and links between two hosts. When
segments get lost, TCP automatically reduces the transmission rate.
4.Reliability
Guarantees delivery of messages.
Need for Transport Control Protocol
In the layered architecture of a network model, the whole task is divided into
smaller tasks. Each task is assigned to a particular layer that processes the task. In
the TCP/IP model, five layers are application layer, transport layer, network layer,
data link layer, and physical layer. The transport layer has a critical role in providing
end-to-end communication to the directly application processes. It creates 65,000
ports so that the multiple applications can be accessed at the same time. It takes
the data from the upper layer, and it divides the data into smaller packets and then
transmits them to the network layer.
Working of TCP
In TCP, the
connection is established by using three-way handshaking. The client sends
the segment with its sequence number. The server, in return, sends its
segment with its own sequence number as well as the acknowledgement
sequence, which is one more than the client sequence number. When the
client receives the acknowledgment of its segment, then it sends the
acknowledgment to the server. In this way, the connection is established
between the client and the server.
TCP segment
structure overview
The TCP segment consists of header fields and a data field.
The data field contains a chunk of application data. The
MSS (Maximum Segment Size) limits the maximum size of
a segment’s data field.When TCP sends a large file, such
as an image as part of a web page, it typically breaks the
file into chunks of size MSS (except for the last chunk,
which will often be less than the MSS).
Measures of RTT
There are three ways to calculate RTT:
1.Estimated RTT
2.Deviation in RTT
3.Time-out Interval
Steps To Calculate the Expected Round Trip Time
Step 1: Select a Destination. Identify the target device or destination for which you want to calculate the
expected RTT. This can be an IP address or a domain name.
Step 2: Choose a Measurement Tool. Select a suitable measurement tool or utility that can help you measure
the Round Trip Time accurately. There are several tools available, such as ping, traceroute, or network
monitoring software.
Step 3: Open the Command Prompt (Windows) or Terminal (Mac/Linux). To access the ping command, you
need to open the command prompt on Windows or the terminal on Mac/Linux. You can do this by searching for
“Command Prompt” or “Terminal” in the respective operating system’s search bar.
Step 4: Enter the Ping Command. In the command prompt or terminal, type the following command: ping
<target> (replace <target> with the IP address or domain name of your target device).
Step 5: Initiate the Ping Test. Now, Press the Enter key to execute the ping command. The utility will start
sending ICMP (Internet Control Message Protocol) echo request packets to the target device.
Step 6: Observe the Results. As the ping utility sends packets, it records the Round Trip Time for each packet
received. The utility will display the results for each packet sent, along with the statistics at the end of the test.
Look for the “Average” or “Avg” value in the statistics, as it represents the average Round Trip Time.
Step 7: Calculate the Expected RTT. The average Round Trip Time displayed in the ping statistics is an
estimation of the expected RTT.
Step 8: Repeat the Process (Optional)
Estimated RTT
In computer communication networking, the RTTs of diff erent packets can be diff erent.
For example, the first packet takes the round trip time of 1.1ms, the second packet
takes 1.3ms, and the third packet takes 0.98ms so, each sample RTT varies. That is
why estimated RTT is used, as it is the average of recent measurements, not just the
current sample RTT.
Formula:
Estimated RTT = (1- α) * Estimated RTT + α * Sample RTT
For example, the sample RTT is 100ms, we have to compute the estimated RTT using α =
0.125, and we assume the value of the estimated RTT just before the sample RTT was
110ms. So, by using the formula, we get:
Formula:
Time-out Interval = 4 * DevRTT + Estimated RTT