SlideShare a Scribd company logo
RMK College of Engineering and Technology
CS 6551
Computer Networks
Department
of
Electronics and Communication Engineering
Unit 4
Transport Layer
Prepared by
Jai Ganesh S
Asst.Professor - ECE
Syllabus
• Overview of transport layer
• UDP – User Datagram Protocol
• Reliable Byte Stream – TCP
• Connection management
• Flow control
• Retransmission
• TCP Congestion Control
• Congestion Avoidance
• Quality of Service
• Application Requirements.
Transport Layer
Overview of Transport Layer
• 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”
IP address vs Port Address
Concept of PORT Addressing
TCP protocols
• There are 2 main protocols used in this layer.
• Connection Less – UDP
• Connection Oriented - TCP
User Datagram Protocol
• This is an connection less un reliable transport layer protocol.
• They have very low error checking features.
UDP packet header
Checksum Calculation
• The UDP check sum has 3 different
sections.
• Pseudo header
• UDP header
• Data from application Layer
Functions of UDP
• Connection less services
• Flow control and error control
• Encapsulation and de capsulation
• Queuing
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.
End
of
UDP
Reliable Byte Stream
• In contrast to the unreliable transmission protocol we have a reliable byte
stream .
• Protocol used here is “Transmission Control Protocol” (TCP)
TCP Services
• Process to process communication
• Stream delivery service
• Full duplex communication
• Connection oriented service
• Reliable service
1. Process to process communication
• There are few well
known ports for the
process identification.
2. Stream delivery service
• The data are sent as a stream of bytes.
• This creates an virtual connection between the source and the destination.
• Full duplex communication:
• 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
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.
TCP Header Format
Connection Management in TCP
• There are 3 phases in connection management.
Connection Establishment
Data transfer
Connection termination
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.
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.
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.
End of
Connection Management
Flow Control in TCP
• TCP uses sliding 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.
• Opening a window:
• 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.
• Size of the 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
Transmission Process
• There are 3 mechanisms in transmission process.
Deciding the “Maximum Segment Size” (MSS)
Flushing the bytes into the buffer.
Firing the Timer for retransmission purpose.
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”
• If sender waits too long --> bad for interactive connections.
• If it does not wait long enough --> silly window syndrome.
• How to solve ?
Nagle’sAlgorithm
• If both available 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.
End
of
Flow Control
Retransmission
• Reliable data transmission 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
Problem with RTT
• Unfortunately the RTT between any 2 nodes on the network gets varied
because of several factors
Solution
• To eliminate this 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
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
Drawbacks of Original Algorithm
• 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.
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
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 -- ?
What’s Mean
What’s Variance
Computer networks    unit iv
End
of
Retransmission
TCP Congestion Control
Congestion Control
• It is 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
Adaptive Increase and Multiplicative 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.
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
2. Slow Start Method
• 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.
Fast retransmit and Fast 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
• 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.
End
of
Congestion Control
Congestion Avoidance
Introduction
• The previously discussed 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.
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.
DEC Bit
• This system 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.
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.
• When the queue 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.
Computer networks    unit iv
End
of
Congestion Avoidance
Quality of service (QoS)
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.
1. Scheduling
• Scheduling is nothing but prioritizing the various flow of packets.
• There are 3 methods.
• First In First Out Queuing (FIFO)
• Priority Queuing
• Weighted Priority Queuing
FIFO Queuing
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
Leaky Bucket Mechanism
Leaky Bucket Implementation
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
Token Bucket 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.
4. Resource Reservation
• Network resources like bandwidth, queue memory can be reserved before hand for priority
applications .
End
of
QoS
Application Requirements
Application Requirements
• It is first important to classify the types of application for choosing the
requirements.
• Real Time Applications
• Non – Real Time Applicaations
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.
Non Real time applications
• 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.
Approaches for Deciding the 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.
End
of
Application Requirements
&
Unit - 4

More Related Content

PPT
Chapter 4 data link layer
PPTX
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
PPT
SMTP – Simple Mail Transfer Protocol | Explained for Beginners
PPTX
Ethernet Computer network
PPTX
Address resolution protocol (ARP)
PPT
Network layer tanenbaum
PPSX
Physical layer ppt
PPSX
Token ring
Chapter 4 data link layer
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
SMTP – Simple Mail Transfer Protocol | Explained for Beginners
Ethernet Computer network
Address resolution protocol (ARP)
Network layer tanenbaum
Physical layer ppt
Token ring

What's hot (20)

PPTX
computer network OSI layer
PPTX
Ethernet
PPT
Layered Architecture
PPTX
The medium access sublayer
PPT
Introduction to switching & circuit switching
PPTX
Frame relay
PPTX
Unicast multicast & broadcast
PPTX
Switches on Networking
PPTX
PPTX
Iso layers
PPT
Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
PPT
data-link layer protocols
PPTX
Circuit Switching
PPTX
Presentation on data communication
PPTX
Multiple access protocol
PPTX
Osi reference model
PPTX
Transport layer
PPTX
IP Address
PPTX
Token bus
PPTX
Computer networks protocols
computer network OSI layer
Ethernet
Layered Architecture
The medium access sublayer
Introduction to switching & circuit switching
Frame relay
Unicast multicast & broadcast
Switches on Networking
Iso layers
Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
data-link layer protocols
Circuit Switching
Presentation on data communication
Multiple access protocol
Osi reference model
Transport layer
IP Address
Token bus
Computer networks protocols
Ad

Similar to Computer networks unit iv (20)

PPT
the TCP transmission control protocol
PPTX
New framing-protocols
PDF
Introduction to TCP
PPTX
Dcn ppt by roma
PPTX
Computer network transport layer MODUL 2.pptx
PPTX
TCP protocol flow control
PPTX
Transport layer
PPTX
Dcn ppt on data link layer
PPTX
Transmission control protocol
PPTX
Computer networks transport layer
PPTX
Module 2.pptx.............sdvsdcdssdfsdf
PPTX
Computer network coe351- part4- final
PPT
Flow control
PPT
Data link layer
PPTX
Lecture 2 data link layer 1 v1
PPTX
Unit-4 (1).pptx
PPTX
Tcp(no ip) review part1
PPTX
CN Unit 2 - cs8591.pptx
PPTX
DLC_23 (3).pptx
PPTX
Unit 4-Transport Layer Protocols-3.pptx
the TCP transmission control protocol
New framing-protocols
Introduction to TCP
Dcn ppt by roma
Computer network transport layer MODUL 2.pptx
TCP protocol flow control
Transport layer
Dcn ppt on data link layer
Transmission control protocol
Computer networks transport layer
Module 2.pptx.............sdvsdcdssdfsdf
Computer network coe351- part4- final
Flow control
Data link layer
Lecture 2 data link layer 1 v1
Unit-4 (1).pptx
Tcp(no ip) review part1
CN Unit 2 - cs8591.pptx
DLC_23 (3).pptx
Unit 4-Transport Layer Protocols-3.pptx
Ad

More from JAIGANESH SEKAR (20)

PDF
Ec8551 communication networks mcq question bank
PDF
2.3b access control random access methods - part 3 - csma ca
PDF
2.10b network layer services i pv4 - variable length subnetting
PDF
2.10a network layer services i pv4 - fixed length subnetting
PDF
2.10 network layer services i pv4
PDF
2.9 network layer services packet switching
PDF
2.8 bluetooth ieee 802.15
PDF
2.7 wlan ieee 802.11
PDF
2.6 ethernet ieee 802.3
PDF
2.5 access control channelization methods
PDF
2.4 access control controlled access methods
PDF
2.3a access control random access methods - part 2 - csma cd
PDF
2.3 access control random access methods - part 1
PDF
2.2 flow control
PDF
2.1 framing
PDF
9. data link layer error correction codes - hamming code
PDF
8. data link layer error detection and correction codes - crc
PDF
7. data link layer error detection and correction codes - parity and checksum
PDF
6. data link layer physical addressing
PDF
5. protocol layering
Ec8551 communication networks mcq question bank
2.3b access control random access methods - part 3 - csma ca
2.10b network layer services i pv4 - variable length subnetting
2.10a network layer services i pv4 - fixed length subnetting
2.10 network layer services i pv4
2.9 network layer services packet switching
2.8 bluetooth ieee 802.15
2.7 wlan ieee 802.11
2.6 ethernet ieee 802.3
2.5 access control channelization methods
2.4 access control controlled access methods
2.3a access control random access methods - part 2 - csma cd
2.3 access control random access methods - part 1
2.2 flow control
2.1 framing
9. data link layer error correction codes - hamming code
8. data link layer error detection and correction codes - crc
7. data link layer error detection and correction codes - parity and checksum
6. data link layer physical addressing
5. protocol layering

Recently uploaded (20)

PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
Construction Project Organization Group 2.pptx
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
UNIT 4 Total Quality Management .pptx
DOCX
573137875-Attendance-Management-System-original
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
Well-logging-methods_new................
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Internet of Things (IOT) - A guide to understanding
Construction Project Organization Group 2.pptx
CYBER-CRIMES AND SECURITY A guide to understanding
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
UNIT 4 Total Quality Management .pptx
573137875-Attendance-Management-System-original
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Foundation to blockchain - A guide to Blockchain Tech
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Lecture Notes Electrical Wiring System Components
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
R24 SURVEYING LAB MANUAL for civil enggi
Well-logging-methods_new................

Computer networks unit iv

  • 1. RMK College of Engineering and Technology CS 6551 Computer Networks Department of Electronics and Communication Engineering
  • 2. Unit 4 Transport Layer Prepared by Jai Ganesh S Asst.Professor - ECE
  • 3. Syllabus • Overview of transport layer • UDP – User Datagram Protocol • Reliable Byte Stream – TCP • Connection management • Flow control • Retransmission • TCP Congestion Control • Congestion Avoidance • Quality of Service • Application Requirements.
  • 5. Overview of Transport Layer • 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”
  • 6. IP address vs Port Address
  • 7. Concept of PORT Addressing
  • 8. TCP protocols • There are 2 main protocols used in this layer. • Connection Less – UDP • Connection Oriented - TCP
  • 9. User Datagram Protocol • This is an connection less un reliable transport layer protocol. • They have very low error checking features.
  • 11. Checksum Calculation • The UDP 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.
  • 15. 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 • Process to process communication • Stream delivery service • Full duplex communication • Connection oriented service • Reliable service
  • 17. 1. Process to process communication • There are few well known ports for the process identification.
  • 18. 2. Stream delivery service • The data are sent as a stream of bytes. • This creates an virtual connection between the source and the destination.
  • 19. • Full duplex communication: • 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.
  • 22. Connection Management in TCP • 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.
  • 28. • TCP uses sliding 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 a window: • 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 of the 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 • There are 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 sender waits too long --> bad for interactive connections. • If it does not wait long enough --> silly window syndrome. • How to solve ?
  • 34. Nagle’sAlgorithm • If both available 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.
  • 37. • Reliable data transmission 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 eliminate this 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 Original Algorithm • 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 -- ?
  • 49. Congestion Control • It is 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 and Multiplicative 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 Start Method • 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 and Fast 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.
  • 57. Introduction • The previously discussed 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 • This system 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 the queue 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.
  • 65. 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 • Scheduling is nothing but prioritizing the various flow of packets. • There are 3 methods. • First In First Out Queuing (FIFO) • Priority Queuing • Weighted Priority Queuing
  • 70. 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
  • 73. 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
  • 75. 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 .
  • 79. Application Requirements • It is 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 time applications • 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 Deciding the 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.