This document provides a summary of the transport layer of computer networks. It discusses key topics like UDP, TCP, connection management, flow control, congestion control, and quality of service. UDP provides a connectionless, unreliable service while TCP provides connection-oriented, reliable byte streaming. TCP uses three-way handshaking for connection establishment and termination. It implements flow control using sliding windows and employs congestion control algorithms like additive increase/multiplicative decrease. The document also covers transport layer concepts like ports, checksums, and retransmission methods in TCP.
Overview of TransportLayer
• This layer is responsible for process to process delivery of entire message.
• The system runs several process. Transport
layer is responsible for delivering the
message to the correct process.
• This can be achieved by a special type of
address called as “service point address”
Checksum Calculation
• TheUDP check sum has 3 different
sections.
• Pseudo header
• UDP header
• Data from application Layer
12.
Functions of UDP
•Connection less services
• Flow control and error control
• Encapsulation and de capsulation
• Queuing
13.
Uses of UDP
•They are suitable for simple communications where error control and
flow control are little concern
• They are suitable for multicasting
• They are well suited for updating the router information.
Reliable Byte Stream
•In contrast to the unreliable transmission protocol we have a reliable byte
stream .
• Protocol used here is “Transmission Control Protocol” (TCP)
16.
TCP Services
• Processto process communication
• Stream delivery service
• Full duplex communication
• Connection oriented service
• Reliable service
17.
1. Process toprocess communication
• There are few well
known ports for the
process identification.
18.
2. Stream deliveryservice
• The data are sent as a stream of bytes.
• This creates an virtual connection between the source and the destination.
19.
• Full duplexcommunication:
• TCP allows full duplex communication in which the data flow in both the directions at the same time.
• Connection Oriented Services:
• Data transmission occurs in 3 stages,
• Connection is established between the source & destination
• Data are exchanged between the source and destination
• Connection is terminated.
• Reliable Services:
• TCP is an reliable protocol.
• It uses an acknowledgement mechanism to check the safe and sound arrival of data
20.
Features of TCP
•Numbering system:
• They have 2 types of numbering system
• Sequence number - to identify the order of the segment
• Acknowledgement number – used to conform the reception of segment and the next segment to be sent.
• Flow control:
• Controls the amount of data sent by the sender to the receiver. To avoid the loss of packets
• Error control:
• TCP implements the error control mechanism to ensure the correct delivery of data.
• Congestion control:
• TCP implements certain strategies to ensure there is no congestion on the network.
Connection Management inTCP
• There are 3 phases in connection management.
Connection Establishment
Data transfer
Connection termination
23.
1. Connection Establishment
•Connection is established by a 3
way handshaking process.
• Consider the scenario shown in the
figure, where client need to
establish a connection with the
server.
24.
2. Data transfer
•After the connection is established , data
can flow in bi direction.
• The client and server can send data and
ACK
• The figure shows the timing diagram for
the data transfer phase.
25.
3. Connection Termination
•Connection termination also happens in
3 way handshaking process.
• The client ends the termination by
sending FIN signal and the same is
acknowledged from the server.
• TCP usessliding window to handle the flow control
• The major difference between the sliding window flow control in data link layer
and the Transport layer is as follows
• Byte oriented in TCP, Frame oriented in DLL
• Window size is variable in TCP, Fixed in DLL
• A window can be opened, Closed or Shrink.
29.
• Opening awindow:
• Moving the right wall to the right. This allows new bits to be added for sending.
• Closing a window:
• Moving left wall to the right. Represents that the bytes are acknowledged.
• Shrinking a window:
• Moving right wall to the left. Revoking the eligibility of bytes for sending. Problem occurs when the bytes are
already sent.
30.
• Size ofthe window is determined by 2 parameters.
• Receiver window (rwnd) – No of bytes that the receiver can accept.
• Congestion window (cwnd) – No of bytes that the network can carry without
any congestion.
• The window size should be a function of rwnd and cwnd
31.
Transmission Process
• Thereare 3 mechanisms in transmission process.
Deciding the “Maximum Segment Size” (MSS)
Flushing the bytes into the buffer.
Firing the Timer for retransmission purpose.
32.
Silly Window Syndrome
•Generally receiver decides the window size.
• If the available data and receiver window size is same as MSS, no problem will occur.
• In case the transmitter accumulates the data bytes and waiting for the window size from the receiver.
• Now the receiver sends the window size as MSS/2 (Half the Size of the MSS).
• Now the problem occurs at the transmitter that it has to send MSS/2 bytes of data….. Or to wait for some more period to get the
full MSS window size. So that the complete data is transmitted.
• This confusion leads to a problem called as “Silly Window Syndrome”.
Solution for this problem is : “Nagle’s Algorithm”
33.
• If senderwaits too long --> bad for interactive connections.
• If it does not wait long enough --> silly window syndrome.
• How to solve ?
34.
Nagle’sAlgorithm
• If bothavailable data and Window ≥ MSS, send full segment.
• Else, if there is un ACK ed data in flight, buffer new data until ACK
returns.
• Else, send new data now.
• Reliable datatransmission is achieved by retransmitting the
segments.
• The key factor in implementing the retransmission is deciding the
Time Out Period
• The default method for setting up the Time out period
is double the period of Round Trip Time between any 2
nodes on the network
38.
Problem with RTT
•Unfortunately the RTT between any 2 nodes on the network gets varied
because of several factors
39.
Solution
• To eliminatethis problem, TCP uses an “Adaptive
Retransmission Technique”.
• Where the Time out Period is adjusted according to the
situations.
• Several algorithms were proposed on calculating the time out period
• Original Algorithm
• Karn / Parteidge Algorithm
• Jacobson / Karels Algorithm
40.
1. Original Algorithm
•This is an simple algorithm, in which the sample time is computed for every segment sent.
• This sample time is related with the previously computed values and the final time out period
is computed as shown below
41.
Drawbacks of OriginalAlgorithm
• RTT cannot be simply calculated only based on the received ACK.
• We cannot identify the received ACK is for the original Transmission or the
Retransmitted Segment
• Consider the given scenarios.
• Case 1: ACK Sent by the Receiver is lost – segment retransmitted – received
ACK is assumed for the original transmission – Sample RTT is too long.
• Case 2: ACK is delayed by the Received – Segment Retransmitted – received
ACK is assumed for the retransmitted segment – Sample RTT is too short.
42.
2. Karn /Parteidge Algorithm
• This algorithm overcomes the drawback of the original algorithm.
• This algorithm proposes that the RTT is computed only for the segments that
are sent for the first time. (Not for the Retransmitted Segments)
• The Final time out is computed based only on the sample RTT’s of first time
sent segments
43.
3. Jacobson /Karels Algorithm
• This algorithm serves better than the predecessor method.
• This algorithm considers the variance of sample RTT’s in to account.
• Variance -- ?
Congestion Control
• Itis very important factor to control the congestion on the network.
• Congestion occurs when the network is overloaded.
• Thus to control the congestion the flow of packets should be controlled according to the
network capacity.
• There are several techniques available. Out of which few techniques are discussed here.
• Adaptive Increase and Multiplicative Decrease.
• Slow Start
• Fast Retransmit and Fast Recovery
50.
Adaptive Increase andMultiplicative Decrease. (AIDM)
• TCP maintains the congestion window size which
decides the amount of data to be transmitted.
• The size of this window can be increased or
decreased according to the occurrence of
congestion on the network.
51.
Operation of AIDM
•AIDM performs slow increase in the congestion
window size when the congestion is less.
• AIDM performs sudden drop in the congestion
window size when there is a congestion on the
network
52.
2. Slow StartMethod
• The draw back with the previous method is that, the system take too long time to reach the
optimum flow level.
• This methods initially sets the window size to 1 and when the ACK is received, then it
doubles the window size.
• This method is well suited in 2 conditions
• Initial stage of the transmission when the system do not know anything about the capacity of the
network.
• When the line is down for a while and again back on to service.
53.
Fast retransmit andFast Recovery
• Fast Retransmit:
• The convention system waits for the time out period to
retransmit the lost frame.
• Instead to speed up the process Fast retransmit is used.
• In this method the receivers send the previous copy of ACK
to the sender to intimate the loss of packets.
• When the receiver keeps on receiving the Duplicate ACK
then the frame is Retransmitted.
Packet 1
Packet 2
Packet 3
Packet 4
Packet 5
Packet 6
Retransmit
packet 3
ACK 1
ACK 2
ACK 2
ACK 2
ACK 6
ACK 2
Sender Receiver
54.
• Fast Recovery:
•This methods modifies the operation of slow start method.
• This methods reduces the size of the congestion window to half, Instead of starting form
the beginning.
• This method helps in fast recovery of the system when there is any occurrence of
congestion in the network.
Introduction
• The previouslydiscussed control mechanisms
measures the amount of congestion occurred in the
network and take steps to control.
• But it is always better to avoid congestion than
controlling.
58.
Congestion avoidance Mechanisms
•There are several congestion avoidance mechanisms proposed. Few of
them are discussed here.
• Destination experiencing Congestion Bit (DEC Bit)
• Random Early Detection (RED).
• Source Based Congestion Avoidance.
59.
DEC Bit
• Thissystem introduces an congestion bit to the packets transmitted by the sender.
• This bit can either set or reset according to the congestion level.
• This bit is set when the queue length if more than 50%.
• When the receiver detects the congestion bit is set then the window size is reduced by 0.875
times the original value.
• When the queue length is less than 50% then the congestion window size is incremented by 1
byte.
60.
Random Early Detection
•This bit avoids congestion by dropping the
packets.
• This method measures the queue length and
fixes minimum threshold and maximum
threshold values.
61.
• When thequeue length is below the minimum threshold value then no packets
are dropped.
• When the queue length lies between the minimum and maximum threshold
values then the packets are dropped according to the predefined configuration.
• When the queue length is above the maximum threshold level then all the packets
are dropped.
QoS - Introduction
•Qos deals with the regular flow of data throughout the network.
• There are several mechanisms incorporated to improve the QoS.
• Scheduling
• Traffic shaping
• Admission control
• Resource reservation.
66.
1. Scheduling
• Schedulingis nothing but prioritizing the various flow of packets.
• There are 3 methods.
• First In First Out Queuing (FIFO)
• Priority Queuing
• Weighted Priority Queuing
2. Traffic Shaping
•This method regulates the flow of data from various rates of flow of
packets.
• This can be implemented by 2 techniques.
• Leaky Bucket Mechanism
• Token Bucket Mechanism
Token Bucket Mechanism
•Packets will be sent based on the token system
• Each packet consumes one token.
• The ideal time of the node are effectively utilised in this mechanism
3. Admission Control
•Packets will be accepted or rejected based on the pre defined configuration.
• If the packet passes the test then the packet is accepted. Else rejected.
76.
4. Resource Reservation
•Network resources like bandwidth, queue memory can be reserved before hand for priority
applications .
Application Requirements
• Itis first important to classify the types of application for choosing the
requirements.
• Real Time Applications
• Non – Real Time Applicaations
80.
Real Time Applications
•The best examples of real time applications are Audio transmission.
• In this applications the minimum delay are most important requirement
than any other parameters.
81.
Non Real timeapplications
• Such kind of applications do not require minimum delay as the important requirement.
• The parameters like security, correct delivery can be important requirements based on the applications
• Email, FTP and HTTP are few examples of Non Real time Applications.
82.
Approaches for Decidingthe QoS
• There are 2 main approaches in providing the QoS.
• Fine Grained Approach
• Provides QoS for individual Applications
• Coarse Grained Approach
• Provides QoS for large class of data or Aggregate Traffic.