Abhi CS
Abhi CS
Abhi CS
Transport Layer
Submitted in partial fulfilment of Request for the award of degree in
2023-2024
A Case Study on
Transport Layer
Submitted in partial fulfilment of Request for the award of degree in
2023-2024
ACKNOWLEDGEMENT
Life enhances better opportunity with better blessings with adequate space and
time. It was a great blessing for doing this Case study on “Transport Layer”
where we have put all our efforts and dedication towards it resulting ingetting
undiscovered knowledge, better experiences, and ideas behind. To give brighter
and broader measures there has been a few concerns supportive to make this
project to be real time application, without which our project would have been
meaningless.
First, my heartfelt gratitude and respect to Dr. Gurunath Rao Vaidya, Principal
of AIGS and to Prof. Ramakrishna C.N, HOD , Dept. of Computer
Applications. With utmost thanks and dedication, I would like to thank our
guide Prof. Mrs. Yamuna , where she was aside in every step of work that I
have done and with some important advises and corrective measures.
ABHISHEK SINGH
BCA 2nd Year (Section – C)
TABLE OF CONTENT
3. TCP SERVICES 3
4. TCP FEATURES 4
5. TCP SEGMENTS 5
6. TCP CONNECTIONS 6
o Each of the applications in the application layer has the ability to send a message by using
TCP or UDP. The application communicates by using either of these two protocols. Both
TCP and UDP will then communicate with the internet protocol in the internet layer. The
applications can read and write to the transport layer. Therefore, we can say that
communication is a two-way process
TRANSPORT LAYER PROTOCOL
The Transport Layer is the fourth layer in the OSI (Open Systems Interconnection) model and the
TCP/IP (Transmission Control Protocol/Internet Protocol) model. Its primary function is to
provide end-to-end communication and data transfer between applications on different devices.
Two of the most commonly used transport layer protocols are:
TCP is a connection-oriented protocol, which means that it. Stablishes a reliable and error-
checked connection before data exchange begins.
It ensures the reliable delivery of data by using acknowledgments and retransmission of lost or
corrupted packets.
TCP also implements flow control to prevent a fast sender from overwhelming a slow receiver
and congestion control to manage network congestion.
User Datagram Protocol (UDP):
TCP SERVICES
TCP is often used for applications that require a reliable and error-checked connection, such as file
transfer, email, and web browsing. Here are some common TCP services:
HTTPS (Hypertext Transfer Protocol Secure): Similar to HTTP, but with an additional layer
of security provided by SSL/TLS encryption. It is commonly used for secure communication over
the internet, such as online banking, shopping, and accessing sensitive information.
FTP (File Transfer Protocol): FTP is used for transferring files between a client and a server on
a computer network. It uses separate control and data connections, and it can operate in either
active or passive mode.
SMTP (Simple Mail Transfer Protocol): SMTP is used for sending email messages between
servers. It works in conjunction with other email protocols, such as POP3 (Post Office Protocol)
and IMAP (Internet Message Access Protocol), which are used for retrieving emails from a
server.
POP3 (Post Office Protocol version 3): POP3 is an email retrieval protocol that allows a client
to download email messages from a mail server. It is one of the methods used by email clients
to retrieve messages from a mail server.
IMAP (Internet Message Access Protocol): IMAP is another email protocol used for retrieving
messages from a mail server. Unlike POP3, IMAP allows users to view and manipulate
messages on the server without downloading them to the local device.
DNS (Domain Name System): DNS uses both UDP (User Datagram Protocol) and TCP. While
UDP is used for most DNS queries, TCP is used for zone transfers and larger data transfers.
o Full duplex :- It is a full-duplex means that the data can transfer in both directions at the
same time.
TCP SEGMENTS
TCP (Transmission Control Protocol) divides data into smaller units known as segments for
transmission over a network. These segments are the basic units of data transfer in TCP
communication. Each segment contains a header and, optionally, data. Here is an overview of the
components of a TCP segment:
TCP Header:
Source Port Number (16 bits): Indicates the source port of the sender.
Destination Port Number (16 bits): Specifies the destination port on the receiver's side.
Sequence Number (32 bits): Represents the sequence number of the first data byte in the current
segment. This is used for ordering and reassembly of segments at the receiver.
Acknowledgment Number (32 bits): If the ACK flag is set, this field contains the value of the
next sequence number that the sender is expecting to receive. It acknowledges receipt of all prior
bytes.
Data Offset (4 bits): Specifies the length of the TCP header in 32-bit words. It indicates where the
data begins.
Flags (6 bits): Various control flags indicating the purpose and characteristics of the TCP segment.
Flags include URG, ACK, PSH, RST, SYN, and FIN.
Window Size (16 bits): Specifies the size of the receive window, indicating how much data the
sender can send before waiting for an acknowledgment.
Checksum (16 bits): Used for error-checking of the header and data.
Urgent Pointer (16 bits): If the URG flag is set, this field indicates the offset from the sequence
number indicating the last urgent data byte.
Options: Variable-length field providing additional information. Options may include Maximum
Segment Size (MSS), Window Scale Factor, Timestamps, and more.
Data: The actual payload or data being transmitted. The length of the data is determined by the total
length of the TCP segment minus the length of the TCP header
TCP CONNECTION
Connection Establishment –
Sequence number (Seq=521): contains the random initial sequence number generated at the
sender side.
Syn flag (Syn=1): request the receiver to synchronize its sequence number with the above-
provided sequence number.
Maximum segment size (MSS=1460 B): sender tells its maximum segment size, so that receiver
sends datagram which won’t require any fragmentation. MSS field is present inside Option field in
TCP header.
Window size (window=14600 B): sender tells about his buffer capacity in which he has to store
messages from the receiver.
2. TCP is a full-duplex protocol so both sender and receiver require a window for
receiving messages from one another.
Sequence number (Seq=2000): contains the random initial sequence number generated at the
receiver side.
Syn flag (Syn=1): request the sender to synchronize its sequence number with the above-provided
sequence number.
Maximum segment size (MSS=500 B): receiver tells its maximum segment size, so that sender
sends datagram which won’t require any fragmentation. MSS field is present inside Option field in
TCP header.
Since MSSreceiver < MSSsender, both parties agree for minimum MSS i.e., 500 B to avoid
fragmentation of packets at both ends.
Acknowledgement Number (Ack no.=522): Since sequence number 521 is received by the
receiver so, it makes a request for the next sequence number with Ack no.=522 which is the next
packet expected by the receiver since Syn flag consumes 1 sequence no.
ACK flag (ACk=1): tells that the acknowledgement number field contains the next sequence
expected by the receiver.
Linear Growth: Once the sender's congestion window reaches a certain threshold (often set by
the network's capacity), it switches to a linear growth mode.
Additive Increase: The congestion window increases by one for each round-trip time, helping to
avoid overwhelming the network with too much data.
Fast Retransmit and Fast Recovery:
Duplicate ACKs: If the sender receives duplicate acknowledgments for the same data, it assumes
that a segment has been lost.
Fast Retransmit: Instead of waiting for a timeout, the sender quickly retransmits the missing
segment, avoiding unnecessary delays.
Fast Recovery: Upon detecting segment loss, the sender reduces its congestion window and
enters a "fast recovery" state. It then continues sending new data while waiting for further
acknowledgments.
Timeouts and Retransmission:
Timeouts: If an acknowledgment is not received within a certain time (indicating possible loss),
the sender may retransmit the unacknowledged data.
Exponential Backoff: After a timeout, the sender reduces its congestion window size and restarts
with a slow start, preventing excessive retransmission attempts.
TCP Reno and TCP Tahoe:
TCP Reno: Builds on TCP Tahoe and includes fast retransmit and fast recovery mechanisms to
improve efficiency in handling segment loss.
TCP Tahoe: Implements basic congestion control mechanisms, including slow start and
congestion avoidance.
Explicit Congestion Notification (ECN):
ECN Capable: TCP can be configured to support ECN, allowing routers to notify endpoints of
impending congestion without dropping packets.
ECN-Echo and Congestion Window Reduction: When ECN is enabled, the sender reduces its
congestion window upon receiving ECN-Echo signals from the network
.
TCP congestion control algorithms are continuously evolving, with various improvements and
enhancements introduced over time. Examples of modern congestion control algorithms include
TCP Cubic, TCP Vegas, and TCP BBR (Bottleneck Bandwidth and Round-trip propagation time).
These algorithms aim to provide efficient and fair utilization of network resources while
minimizing the impact of congestion on performance. The choice of congestion control algorithm
can have significant implications for the responsiveness and throughput of TCP connections in
different network conditions.