SlideShare a Scribd company logo
1 of 58
Chapter 12 TCP Traffic Control
1
Chapter 12Chapter 12
TCP Traffic Control
Chapter 12 TCP Traffic Control
2
IntroductionIntroduction
TCP Flow Control
TCP Congestion Control
Performance of TCP over ATM
Chapter 12 TCP Traffic Control
3
TCP Flow ControlTCP Flow Control
Uses a form of sliding window
Differs from mechanism used in LLC,
HDLC, X.25, and others:
 Decouples acknowledgement of received data
units from granting permission to send more
TCP’s flow control is known as a credit
allocation scheme:
 Each transmitted octet is considered to have a
sequence number
Chapter 12 TCP Traffic Control
4
TCP Header Fields for Flow ControlTCP Header Fields for Flow Control
Sequence number (SN) of first octet in
data segment
Acknowledgement number (AN)
Window (W)
Acknowledgement contains AN = i, W = j:
 Octets through SN = i - 1 acknowledged
 Permission is granted to send W = j more octets,
i.e., octets i through i + j - 1
Chapter 12 TCP Traffic Control
5
Figure 12.1 TCP CreditFigure 12.1 TCP Credit
Allocation MechanismAllocation Mechanism
Chapter 12 TCP Traffic Control
6
Credit Allocation is FlexibleCredit Allocation is Flexible
Suppose last message B issued was AN = i, W = j
To increase credit to k (k > j) when no new
data, B issues AN = i, W = k
To acknowledge segment containing m octets
(m < j), B issues AN = i + m, W = j - m
Chapter 12 TCP Traffic Control
7
Figure 12.2 Flow ControlFigure 12.2 Flow Control
PerspectivesPerspectives
Chapter 12 TCP Traffic Control
8
Credit PolicyCredit Policy
Receiver needs a policy for how much
credit to give sender
Conservative approach: grant credit up to
limit of available buffer space
May limit throughput in long-delay
situations
Optimistic approach: grant credit based on
expectation of freeing space before data
arrives
Chapter 12 TCP Traffic Control
9
Effect of Window SizeEffect of Window Size
W = TCP window size (octets)
R = Data rate (bps) at TCP source
D = Propagation delay (seconds)
After TCP source begins transmitting, it
takes D seconds for first octet to arrive,
and D seconds for acknowledgement to
return
TCP source could transmit at most 2RD
bits, or RD/4 octets
Chapter 12 TCP Traffic Control
10
Normalized Throughput SNormalized Throughput S
1 W > RD / 4
S =
4W W < RD / 4
RD
Chapter 12 TCP Traffic Control
11
Figure 12.3 Window ScaleFigure 12.3 Window Scale
ParameterParameter
Chapter 12 TCP Traffic Control
12
Complicating FactorsComplicating Factors
 Multiple TCP connections are multiplexed over
same network interface, reducing R and
efficiency
 For multi-hop connections, D is the sum of
delays across each network plus delays at each
router
 If source data rate R exceeds data rate on one of
the hops, that hop will be a bottleneck
 Lost segments are retransmitted, reducing
throughput. Impact depends on retransmission
policy
Chapter 12 TCP Traffic Control
13
Retransmission StrategyRetransmission Strategy
 TCP relies exclusively on positive
acknowledgements and retransmission
on acknowledgement timeout
 There is no explicit negative
acknowledgement
 Retransmission required when:
1. Segment arrives damaged, as indicated by
checksum error, causing receiver to discard
segment
2. Segment fails to arrive
Chapter 12 TCP Traffic Control
14
TimersTimers
 A timer is associated with each segment as it is
sent
 If timer expires before segment acknowledged,
sender must retransmit
 Key Design Issue:
value of retransmission timer
 Too small: many unnecessary retransmissions,
wasting network bandwidth
 Too large: delay in handling lost segment
Chapter 12 TCP Traffic Control
15
Two StrategiesTwo Strategies
 Timer should be longer than round-trip
delay (send segment, receive ack)
 Delay is variable
Strategies:
1. Fixed timer
2. Adaptive
Chapter 12 TCP Traffic Control
16
Problems with Adaptive SchemeProblems with Adaptive Scheme
Peer TCP entity may accumulate
acknowledgements and not acknowledge
immediately
For retransmitted segments, can’t tell
whether acknowledgement is response to
original transmission or retransmission
Network conditions may change suddenly
Chapter 12 TCP Traffic Control
17
Adaptive Retransmission TimerAdaptive Retransmission Timer
Average Round-Trip Time (ARTT)
K + 1
ARTT(K + 1) = 1 ∑ RTT(i)
K + 1 i = 1
= K ART(K) + 1 RTT(K + 1)
K + 1 K + 1
Chapter 12 TCP Traffic Control
18
RFC 793 Exponential AveragingRFC 793 Exponential Averaging
Smoothed Round-Trip Time (SRTT)
SRTT(K + 1) = α × SRTT(K)
+ (1 – α) × SRTT(K + 1)
The older the observation, the less it is
counted in the average.
Chapter 12 TCP Traffic Control
19
Figure 12.4Figure 12.4
ExponentialExponential
SmoothingSmoothing
CoefficientsCoefficients
Chapter 12 TCP Traffic Control
20
Figure 12.5Figure 12.5
ExponentialExponential
AveragingAveraging
Chapter 12 TCP Traffic Control
21
RFC 793 Retransmission TimeoutRFC 793 Retransmission Timeout
RTO(K + 1) =
Min(UB, Max(LB, β × SRTT(K + 1)))
UB, LB: prechosen fixed upper and lower
bounds
Example values for α, β:
0.8 < α < 0.9 1.3 < β < 2.0
Chapter 12 TCP Traffic Control
22
Implementation Policy OptionsImplementation Policy Options
 Send
 Deliver
 Accept
 In-order
 In-window
 Retransmit
 First-only
 Batch
 individual
 Acknowledge
 immediate
 cumulative
Chapter 12 TCP Traffic Control
23
TCP Congestion ControlTCP Congestion Control
 Dynamic routing can alleviate congestion by
spreading load more evenly
 But only effective for unbalanced loads and brief
surges in traffic
 Congestion can only be controlled by limiting
total amount of data entering network
 ICMP source Quench message is crude and not
effective
 RSVP may help but not widely implemented
Chapter 12 TCP Traffic Control
24
TCP Congestion Control is DifficultTCP Congestion Control is Difficult
 IP is connectionless and stateless, with
no provision for detecting or controlling
congestion
 TCP only provides end-to-end flow
control
 No cooperative, distributed algorithm to
bind together various TCP entities
Chapter 12 TCP Traffic Control
25
TCP Flow and Congestion ControlTCP Flow and Congestion Control
 The rate at which a TCP entity can transmit is
determined by rate of incoming ACKs to
previous segments with new credit
 Rate of Ack arrival determined by round-trip
path between source and destination
 Bottleneck may be destination or internet
 Sender cannot tell which
 Only the internet bottleneck can be due to
congestion
Chapter 12 TCP Traffic Control
26
Figure 12.6 TCPFigure 12.6 TCP
Segment PacingSegment Pacing
Chapter 12 TCP Traffic Control
27
Figure 12.7 TCP Flow andFigure 12.7 TCP Flow and
Congestion ControlCongestion Control
Chapter 12 TCP Traffic Control
28
Retransmission TimerRetransmission Timer
ManagementManagement
Three Techniques to calculate retransmission
timer (RTO):
1. RTT Variance Estimation
2. Exponential RTO Backoff
3. Karn’s Algorithm
Chapter 12 TCP Traffic Control
29
RTT Variance EstimationRTT Variance Estimation
(Jacobson’s Algorithm)(Jacobson’s Algorithm)
3 sources of high variance in RTT
If data rate relative low, then transmission
delay will be relatively large, with larger
variance due to variance in packet size
Load may change abruptly due to other
sources
Peer may not acknowledge segments
immediately
Chapter 12 TCP Traffic Control
30
Jacobson’s AlgorithmJacobson’s Algorithm
SRTT(K + 1) = (1 – g) × SRTT(K) + g × RTT(K + 1)
SERR(K + 1) = RTT(K + 1) – SRTT(K)
SDEV(K + 1) = (1 – h) × SDEV(K) + h ×|SERR(K + 1)|
RTO(K + 1) = SRTT(K + 1) + f × SDEV(K + 1)
g = 0.125
h = 0.25
f = 2 or f = 4 (most current implementations use f = 4)
Chapter 12 TCP Traffic Control
31
Figure 12.8Figure 12.8
Jacobson’s RTOJacobson’s RTO
CalculationsCalculations
Chapter 12 TCP Traffic Control
32
Two Other FactorsTwo Other Factors
Jacobson’s algorithm can significantly
improve TCP performance, but:
What RTO to use for retransmitted
segments?
ANSWER: exponential RTO backoff algorithm
Which round-trip samples to use as input
to Jacobson’s algorithm?
ANSWER: Karn’s algorithm
Chapter 12 TCP Traffic Control
33
Exponential RTO BackoffExponential RTO Backoff
Increase RTO each time the same segment
retransmitted – backoff process
Multiply RTO by constant:
RTO = q × RTO
q = 2 is called binary exponential backoff
Chapter 12 TCP Traffic Control
34
Which Round-trip Samples?Which Round-trip Samples?
 If an ack is received for retransmitted
segment, there are 2 possibilities:
1. Ack is for first transmission
2. Ack is for second transmission
 TCP source cannot distinguish 2 cases
 No valid way to calculate RTT:
– From first transmission to ack, or
– From second transmission to ack?
Chapter 12 TCP Traffic Control
35
Karn’s AlgorithmKarn’s Algorithm
Do not use measured RTT to update SRTT
and SDEV
Calculate backoff RTO when a
retransmission occurs
Use backoff RTO for segments until an
ack arrives for a segment that has not been
retransmitted
Then use Jacobson’s algorithm to calculate
RTO
Chapter 12 TCP Traffic Control
36
Window ManagementWindow Management
Slow start
Dynamic window sizing on congestion
Fast retransmit
Fast recovery
Limited transmit
Chapter 12 TCP Traffic Control
37
Slow StartSlow Start
awnd = MIN[ credit, cwnd]
where
awnd = allowed window in segments
cwnd = congestion window in segments
credit = amount of unused credit granted in most
recent ack
cwnd = 1 for a new connection and increased
by 1 for each ack received, up to a
maximum
Chapter 12 TCP Traffic Control
38
Figure 23.9 Effect ofFigure 23.9 Effect of
Slow StartSlow Start
Chapter 12 TCP Traffic Control
39
Dynamic Window Sizing on CongestionDynamic Window Sizing on Congestion
A lost segment indicates congestion
Prudent to reset cwsd = 1 and begin slow
start process
May not be conservative enough: “ easy to
drive a network into saturation but hard for
the net to recover” (Jacobson)
Instead, use slow start with linear growth
in cwnd
Chapter 12 TCP Traffic Control
40
Figure 12.10 SlowFigure 12.10 Slow
Start and CongestionStart and Congestion
AvoidanceAvoidance
Chapter 12 TCP Traffic Control
41
Figure 12.11 Illustration of SlowFigure 12.11 Illustration of Slow
Start and Congestion AvoidanceStart and Congestion Avoidance
Chapter 12 TCP Traffic Control
42
Fast RetransmitFast Retransmit
 RTO is generally noticeably longer than actual
RTT
 If a segment is lost, TCP may be slow to
retransmit
 TCP rule: if a segment is received out of order,
an ack must be issued immediately for the last in-
order segment
 Fast Retransmit rule: if 4 acks received for same
segment, highly likely it was lost, so retransmit
immediately, rather than waiting for timeout
Chapter 12 TCP Traffic Control
43
Figure 12.12 FastFigure 12.12 Fast
RetransmitRetransmit
Chapter 12 TCP Traffic Control
44
Fast RecoveryFast Recovery
 When TCP retransmits a segment using Fast
Retransmit, a segment was assumed lost
 Congestion avoidance measures are appropriate
at this point
 E.g., slow-start/congestion avoidance procedure
 This may be unnecessarily conservative since
multiple acks indicate segments are getting
through
 Fast Recovery: retransmit lost segment, cut cwnd
in half, proceed with linear increase of cwnd
 This avoids initial exponential slow-start
Chapter 12 TCP Traffic Control
45
Figure 12.13 FastFigure 12.13 Fast
Recovery ExampleRecovery Example
Chapter 12 TCP Traffic Control
46
Limited TransmitLimited Transmit
 If congestion window at sender is small,
fast retransmit may not get triggered,
e.g., cwnd = 3
1. Under what circumstances does sender have
small congestion window?
2. Is the problem common?
3. If the problem is common, why not reduce
number of duplicate acks needed to trigger
retransmit?
Chapter 12 TCP Traffic Control
47
Limited Transmit AlgorithmLimited Transmit Algorithm
Sender can transmit new segment when 3
conditions are met:
1. Two consecutive duplicate acks are
received
2. Destination advertised window allows
transmission of segment
3. Amount of outstanding data after sending
is less than or equal to cwnd + 2
Chapter 12 TCP Traffic Control
48
Performance of TCP over ATMPerformance of TCP over ATM
How best to manage TCP’s segment size,
window management and congestion
control…
…at the same time as ATM’s quality of
service and traffic control policies
TCP may operate end-to-end over one
ATM network, or there may be multiple
ATM LANs or WANs with non-ATM
networks
Chapter 12 TCP Traffic Control
49
Figure 12.14 TCP/IP overFigure 12.14 TCP/IP over
AAL5/ATMAAL5/ATM
Chapter 12 TCP Traffic Control
50
Performance of TCP over UBRPerformance of TCP over UBR
Buffer capacity at ATM switches is a
critical parameter in assessing TCP
throughput performance
Insufficient buffer capacity results in lost
TCP segments and retransmissions
Chapter 12 TCP Traffic Control
51
Effect of Switch Buffer SizeEffect of Switch Buffer Size
 Data rate of 141 Mbps
 End-to-end propagation delay of 6 μs
 IP packet sizes of 512 octets to 9180
 TCP window sizes from 8 Kbytes to 64 Kbytes
 ATM switch buffer size per port from 256 cells
to 8000
 One-to-one mapping of TCP connections to
ATM virtual circuits
 TCP sources have infinite supply of data ready
Chapter 12 TCP Traffic Control
52
Figure 12.15Figure 12.15
Performance of TCPPerformance of TCP
over UBRover UBR
Chapter 12 TCP Traffic Control
53
ObservationsObservations
If a single cell is dropped, other cells in the
same IP datagram are unusable, yet ATM
network forwards these useless cells to
destination
Smaller buffer increase probability of
dropped cells
Larger segment size increases number of
useless cells transmitted if a single cell
dropped
Chapter 12 TCP Traffic Control
54
Partial Packet and Early PacketPartial Packet and Early Packet
DiscardDiscard
Reduce the transmission of useless cells
Work on a per-virtual circuit basis
Partial Packet Discard
– If a cell is dropped, then drop all subsequent
cells in that segment (i.e., look for cell with
SDU type bit set to one)
Early Packet Discard
– When a switch buffer reaches a threshold
level, preemptively discard all cells in a
segment
Chapter 12 TCP Traffic Control
55
Selective DropSelective Drop
Ideally, N/V cells buffered for each of the
V virtual circuits
W(i) = N(i) = N(i) × V
N/V N
If N > R and W(i) > Z
then drop next new packet on VC i
Z is a parameter to be chosen
Chapter 12 TCP Traffic Control
56
Figure 12.16 ATM Switch BufferFigure 12.16 ATM Switch Buffer
LayoutLayout
Chapter 12 TCP Traffic Control
57
Fair Buffer AllocationFair Buffer Allocation
More aggressive dropping of packets as
congestion increases
Drop new packet when:
N > R and W(i) > Z × B – R
N - R
Chapter 12 TCP Traffic Control
58
TCP over ABRTCP over ABR
 Good performance of TCP over UBR can be
achieved with minor adjustments to switch
mechanisms
 This reduces the incentive to use the more
complex and more expensive ABR service
 Performance and fairness of ABR quite sensitive
to some ABR parameter settings
 Overall, ABR does not provide significant
performance over simpler and less expensive
UBR-EPD or UBR-EPD-FBA

More Related Content

What's hot

Mobile computing-tcp data flow control
Mobile computing-tcp data flow controlMobile computing-tcp data flow control
Mobile computing-tcp data flow controlSushant Kushwaha
 
Call flow comparison gsm umts
Call flow comparison gsm umtsCall flow comparison gsm umts
Call flow comparison gsm umtssivakumar D
 
3g umts-originating-call Call Flow
3g umts-originating-call Call Flow3g umts-originating-call Call Flow
3g umts-originating-call Call FlowEduard Lucena
 
Congetion Control.pptx
Congetion Control.pptxCongetion Control.pptx
Congetion Control.pptxNaveen Dubey
 
Mobile transport layer - traditional TCP
Mobile transport layer - traditional TCPMobile transport layer - traditional TCP
Mobile transport layer - traditional TCPVishal Tandel
 
TCP protocol flow control
TCP protocol flow control TCP protocol flow control
TCP protocol flow control anuragjagetiya
 
Congestion control and quality of services
Congestion control and quality of servicesCongestion control and quality of services
Congestion control and quality of servicesJawad Ghumman
 
Tcp snoop protocols
Tcp snoop protocols  Tcp snoop protocols
Tcp snoop protocols Amr Nasr
 
Providing Controlled Quality Assurance in Video Streaming ...
Providing Controlled Quality Assurance in Video Streaming ...Providing Controlled Quality Assurance in Video Streaming ...
Providing Controlled Quality Assurance in Video Streaming ...Videoguy
 
Unit 2 data link control
Unit 2 data link controlUnit 2 data link control
Unit 2 data link controlVishal kakade
 
Pause frames an overview
Pause frames an overviewPause frames an overview
Pause frames an overviewMapYourTech
 
UNIT II tramission control
UNIT II tramission controlUNIT II tramission control
UNIT II tramission controlsangusajjan
 

What's hot (17)

Tcp traffic control and red ecn
Tcp traffic control and red ecnTcp traffic control and red ecn
Tcp traffic control and red ecn
 
Mobile computing-tcp data flow control
Mobile computing-tcp data flow controlMobile computing-tcp data flow control
Mobile computing-tcp data flow control
 
Call flow comparison gsm umts
Call flow comparison gsm umtsCall flow comparison gsm umts
Call flow comparison gsm umts
 
3g umts-originating-call Call Flow
3g umts-originating-call Call Flow3g umts-originating-call Call Flow
3g umts-originating-call Call Flow
 
Call Forwarding
Call ForwardingCall Forwarding
Call Forwarding
 
Congetion Control.pptx
Congetion Control.pptxCongetion Control.pptx
Congetion Control.pptx
 
Mobile transport layer - traditional TCP
Mobile transport layer - traditional TCPMobile transport layer - traditional TCP
Mobile transport layer - traditional TCP
 
TCP protocol flow control
TCP protocol flow control TCP protocol flow control
TCP protocol flow control
 
transport protocols
transport protocolstransport protocols
transport protocols
 
Congestion control and quality of services
Congestion control and quality of servicesCongestion control and quality of services
Congestion control and quality of services
 
Tcp snoop protocols
Tcp snoop protocols  Tcp snoop protocols
Tcp snoop protocols
 
Ch24
Ch24Ch24
Ch24
 
Ch 23
Ch 23Ch 23
Ch 23
 
Providing Controlled Quality Assurance in Video Streaming ...
Providing Controlled Quality Assurance in Video Streaming ...Providing Controlled Quality Assurance in Video Streaming ...
Providing Controlled Quality Assurance in Video Streaming ...
 
Unit 2 data link control
Unit 2 data link controlUnit 2 data link control
Unit 2 data link control
 
Pause frames an overview
Pause frames an overviewPause frames an overview
Pause frames an overview
 
UNIT II tramission control
UNIT II tramission controlUNIT II tramission control
UNIT II tramission control
 

Similar to TCP Traffic Control Chapter12

tcp congestion .pptx
tcp congestion .pptxtcp congestion .pptx
tcp congestion .pptxECE01AJAYS
 
Tcp congestion control
Tcp congestion controlTcp congestion control
Tcp congestion controlAbdo sayed
 
Tcp congestion control (1)
Tcp congestion control (1)Tcp congestion control (1)
Tcp congestion control (1)Abdo sayed
 
Performance Evaluation of High Speed Congestion Control Protocols
Performance Evaluation of High Speed Congestion Control  ProtocolsPerformance Evaluation of High Speed Congestion Control  Protocols
Performance Evaluation of High Speed Congestion Control ProtocolsIOSR Journals
 
Lecture 19 22. transport protocol for ad-hoc
Lecture 19 22. transport protocol for ad-hoc Lecture 19 22. transport protocol for ad-hoc
Lecture 19 22. transport protocol for ad-hoc Chandra Meena
 
IMPACT OF CONTENTION WINDOW ON CONGESTION CONTROL ALGORITHMS FOR WIRELESS ADH...
IMPACT OF CONTENTION WINDOW ON CONGESTION CONTROL ALGORITHMS FOR WIRELESS ADH...IMPACT OF CONTENTION WINDOW ON CONGESTION CONTROL ALGORITHMS FOR WIRELESS ADH...
IMPACT OF CONTENTION WINDOW ON CONGESTION CONTROL ALGORITHMS FOR WIRELESS ADH...cscpconf
 
chapter 3.2 TCP.pptx
chapter 3.2 TCP.pptxchapter 3.2 TCP.pptx
chapter 3.2 TCP.pptxTekle12
 
Studying_the_TCP_Flow_and_Congestion_Con.pdf
Studying_the_TCP_Flow_and_Congestion_Con.pdfStudying_the_TCP_Flow_and_Congestion_Con.pdf
Studying_the_TCP_Flow_and_Congestion_Con.pdfIUA
 
Mobile Transpot Layer
Mobile Transpot LayerMobile Transpot Layer
Mobile Transpot LayerMaulik Patel
 
Computer network (13)
Computer network (13)Computer network (13)
Computer network (13)NYversity
 
Transport Layer in Computer Networks (TCP / UDP / SCTP)
Transport Layer in Computer Networks (TCP / UDP / SCTP)Transport Layer in Computer Networks (TCP / UDP / SCTP)
Transport Layer in Computer Networks (TCP / UDP / SCTP)Hamidreza Bolhasani
 
transport layer protocols
transport layer protocolstransport layer protocols
transport layer protocolsBE Smârt
 
Unit III IPV6 UDP
Unit III IPV6 UDPUnit III IPV6 UDP
Unit III IPV6 UDPsangusajjan
 
DCN 5th ed. slides ch24 Transport-Layer Protocols.pdf
DCN 5th ed. slides ch24 Transport-Layer Protocols.pdfDCN 5th ed. slides ch24 Transport-Layer Protocols.pdf
DCN 5th ed. slides ch24 Transport-Layer Protocols.pdfBilal Munir Mughal
 
COMPARISON OF HIGH SPEED CONGESTION CONTROL PROTOCOLS
COMPARISON OF HIGH SPEED CONGESTION CONTROL PROTOCOLSCOMPARISON OF HIGH SPEED CONGESTION CONTROL PROTOCOLS
COMPARISON OF HIGH SPEED CONGESTION CONTROL PROTOCOLSIJNSA Journal
 
Computer network (16)
Computer network (16)Computer network (16)
Computer network (16)NYversity
 

Similar to TCP Traffic Control Chapter12 (20)

tcp congestion .pptx
tcp congestion .pptxtcp congestion .pptx
tcp congestion .pptx
 
Tcp congestion control
Tcp congestion controlTcp congestion control
Tcp congestion control
 
Tcp congestion control (1)
Tcp congestion control (1)Tcp congestion control (1)
Tcp congestion control (1)
 
Performance Evaluation of High Speed Congestion Control Protocols
Performance Evaluation of High Speed Congestion Control  ProtocolsPerformance Evaluation of High Speed Congestion Control  Protocols
Performance Evaluation of High Speed Congestion Control Protocols
 
Lecture 19 22. transport protocol for ad-hoc
Lecture 19 22. transport protocol for ad-hoc Lecture 19 22. transport protocol for ad-hoc
Lecture 19 22. transport protocol for ad-hoc
 
IMPACT OF CONTENTION WINDOW ON CONGESTION CONTROL ALGORITHMS FOR WIRELESS ADH...
IMPACT OF CONTENTION WINDOW ON CONGESTION CONTROL ALGORITHMS FOR WIRELESS ADH...IMPACT OF CONTENTION WINDOW ON CONGESTION CONTROL ALGORITHMS FOR WIRELESS ADH...
IMPACT OF CONTENTION WINDOW ON CONGESTION CONTROL ALGORITHMS FOR WIRELESS ADH...
 
chapter 3.2 TCP.pptx
chapter 3.2 TCP.pptxchapter 3.2 TCP.pptx
chapter 3.2 TCP.pptx
 
Studying_the_TCP_Flow_and_Congestion_Con.pdf
Studying_the_TCP_Flow_and_Congestion_Con.pdfStudying_the_TCP_Flow_and_Congestion_Con.pdf
Studying_the_TCP_Flow_and_Congestion_Con.pdf
 
TCP_Congestion_Control.ppt
TCP_Congestion_Control.pptTCP_Congestion_Control.ppt
TCP_Congestion_Control.ppt
 
Mobile Transpot Layer
Mobile Transpot LayerMobile Transpot Layer
Mobile Transpot Layer
 
Computer network (13)
Computer network (13)Computer network (13)
Computer network (13)
 
Transport Layer in Computer Networks (TCP / UDP / SCTP)
Transport Layer in Computer Networks (TCP / UDP / SCTP)Transport Layer in Computer Networks (TCP / UDP / SCTP)
Transport Layer in Computer Networks (TCP / UDP / SCTP)
 
transport layer protocols
transport layer protocolstransport layer protocols
transport layer protocols
 
Tcp congestion avoidance
Tcp congestion avoidanceTcp congestion avoidance
Tcp congestion avoidance
 
Unit III IPV6 UDP
Unit III IPV6 UDPUnit III IPV6 UDP
Unit III IPV6 UDP
 
Transport layer
Transport layerTransport layer
Transport layer
 
DCN 5th ed. slides ch24 Transport-Layer Protocols.pdf
DCN 5th ed. slides ch24 Transport-Layer Protocols.pdfDCN 5th ed. slides ch24 Transport-Layer Protocols.pdf
DCN 5th ed. slides ch24 Transport-Layer Protocols.pdf
 
COMPARISON OF HIGH SPEED CONGESTION CONTROL PROTOCOLS
COMPARISON OF HIGH SPEED CONGESTION CONTROL PROTOCOLSCOMPARISON OF HIGH SPEED CONGESTION CONTROL PROTOCOLS
COMPARISON OF HIGH SPEED CONGESTION CONTROL PROTOCOLS
 
NE #1.pptx
NE #1.pptxNE #1.pptx
NE #1.pptx
 
Computer network (16)
Computer network (16)Computer network (16)
Computer network (16)
 

More from daniel ayalew

Protocol for QoS Support Chapter 18
Protocol for QoS Support Chapter 18Protocol for QoS Support Chapter 18
Protocol for QoS Support Chapter 18daniel ayalew
 
Integrated and Differentiated services Chapter 17
Integrated and Differentiated services Chapter 17Integrated and Differentiated services Chapter 17
Integrated and Differentiated services Chapter 17daniel ayalew
 
Exterior Routing Protocols And Multi casting Chapter 16
Exterior Routing Protocols And Multi casting Chapter 16Exterior Routing Protocols And Multi casting Chapter 16
Exterior Routing Protocols And Multi casting Chapter 16daniel ayalew
 
Interior Routing Protocols Chapter 15
Interior Routing Protocols Chapter 15Interior Routing Protocols Chapter 15
Interior Routing Protocols Chapter 15daniel ayalew
 
Overview of Graph Theory and Least-Cost Paths Chapter 14
Overview of Graph Theory and Least-Cost Paths Chapter 14Overview of Graph Theory and Least-Cost Paths Chapter 14
Overview of Graph Theory and Least-Cost Paths Chapter 14daniel ayalew
 
high-Speed LANs Chapter06
high-Speed LANs Chapter06high-Speed LANs Chapter06
high-Speed LANs Chapter06daniel ayalew
 
Frame Relay Chapter 04
Frame Relay Chapter 04Frame Relay Chapter 04
Frame Relay Chapter 04daniel ayalew
 
TCP and IP Chapter 03
TCP and IP Chapter 03TCP and IP Chapter 03
TCP and IP Chapter 03daniel ayalew
 
protocol and the TCP/IP suite Chapter 02
 protocol and the TCP/IP suite Chapter 02 protocol and the TCP/IP suite Chapter 02
protocol and the TCP/IP suite Chapter 02daniel ayalew
 

More from daniel ayalew (9)

Protocol for QoS Support Chapter 18
Protocol for QoS Support Chapter 18Protocol for QoS Support Chapter 18
Protocol for QoS Support Chapter 18
 
Integrated and Differentiated services Chapter 17
Integrated and Differentiated services Chapter 17Integrated and Differentiated services Chapter 17
Integrated and Differentiated services Chapter 17
 
Exterior Routing Protocols And Multi casting Chapter 16
Exterior Routing Protocols And Multi casting Chapter 16Exterior Routing Protocols And Multi casting Chapter 16
Exterior Routing Protocols And Multi casting Chapter 16
 
Interior Routing Protocols Chapter 15
Interior Routing Protocols Chapter 15Interior Routing Protocols Chapter 15
Interior Routing Protocols Chapter 15
 
Overview of Graph Theory and Least-Cost Paths Chapter 14
Overview of Graph Theory and Least-Cost Paths Chapter 14Overview of Graph Theory and Least-Cost Paths Chapter 14
Overview of Graph Theory and Least-Cost Paths Chapter 14
 
high-Speed LANs Chapter06
high-Speed LANs Chapter06high-Speed LANs Chapter06
high-Speed LANs Chapter06
 
Frame Relay Chapter 04
Frame Relay Chapter 04Frame Relay Chapter 04
Frame Relay Chapter 04
 
TCP and IP Chapter 03
TCP and IP Chapter 03TCP and IP Chapter 03
TCP and IP Chapter 03
 
protocol and the TCP/IP suite Chapter 02
 protocol and the TCP/IP suite Chapter 02 protocol and the TCP/IP suite Chapter 02
protocol and the TCP/IP suite Chapter 02
 

Recently uploaded

Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 

Recently uploaded (20)

Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 

TCP Traffic Control Chapter12

  • 1. Chapter 12 TCP Traffic Control 1 Chapter 12Chapter 12 TCP Traffic Control
  • 2. Chapter 12 TCP Traffic Control 2 IntroductionIntroduction TCP Flow Control TCP Congestion Control Performance of TCP over ATM
  • 3. Chapter 12 TCP Traffic Control 3 TCP Flow ControlTCP Flow Control Uses a form of sliding window Differs from mechanism used in LLC, HDLC, X.25, and others:  Decouples acknowledgement of received data units from granting permission to send more TCP’s flow control is known as a credit allocation scheme:  Each transmitted octet is considered to have a sequence number
  • 4. Chapter 12 TCP Traffic Control 4 TCP Header Fields for Flow ControlTCP Header Fields for Flow Control Sequence number (SN) of first octet in data segment Acknowledgement number (AN) Window (W) Acknowledgement contains AN = i, W = j:  Octets through SN = i - 1 acknowledged  Permission is granted to send W = j more octets, i.e., octets i through i + j - 1
  • 5. Chapter 12 TCP Traffic Control 5 Figure 12.1 TCP CreditFigure 12.1 TCP Credit Allocation MechanismAllocation Mechanism
  • 6. Chapter 12 TCP Traffic Control 6 Credit Allocation is FlexibleCredit Allocation is Flexible Suppose last message B issued was AN = i, W = j To increase credit to k (k > j) when no new data, B issues AN = i, W = k To acknowledge segment containing m octets (m < j), B issues AN = i + m, W = j - m
  • 7. Chapter 12 TCP Traffic Control 7 Figure 12.2 Flow ControlFigure 12.2 Flow Control PerspectivesPerspectives
  • 8. Chapter 12 TCP Traffic Control 8 Credit PolicyCredit Policy Receiver needs a policy for how much credit to give sender Conservative approach: grant credit up to limit of available buffer space May limit throughput in long-delay situations Optimistic approach: grant credit based on expectation of freeing space before data arrives
  • 9. Chapter 12 TCP Traffic Control 9 Effect of Window SizeEffect of Window Size W = TCP window size (octets) R = Data rate (bps) at TCP source D = Propagation delay (seconds) After TCP source begins transmitting, it takes D seconds for first octet to arrive, and D seconds for acknowledgement to return TCP source could transmit at most 2RD bits, or RD/4 octets
  • 10. Chapter 12 TCP Traffic Control 10 Normalized Throughput SNormalized Throughput S 1 W > RD / 4 S = 4W W < RD / 4 RD
  • 11. Chapter 12 TCP Traffic Control 11 Figure 12.3 Window ScaleFigure 12.3 Window Scale ParameterParameter
  • 12. Chapter 12 TCP Traffic Control 12 Complicating FactorsComplicating Factors  Multiple TCP connections are multiplexed over same network interface, reducing R and efficiency  For multi-hop connections, D is the sum of delays across each network plus delays at each router  If source data rate R exceeds data rate on one of the hops, that hop will be a bottleneck  Lost segments are retransmitted, reducing throughput. Impact depends on retransmission policy
  • 13. Chapter 12 TCP Traffic Control 13 Retransmission StrategyRetransmission Strategy  TCP relies exclusively on positive acknowledgements and retransmission on acknowledgement timeout  There is no explicit negative acknowledgement  Retransmission required when: 1. Segment arrives damaged, as indicated by checksum error, causing receiver to discard segment 2. Segment fails to arrive
  • 14. Chapter 12 TCP Traffic Control 14 TimersTimers  A timer is associated with each segment as it is sent  If timer expires before segment acknowledged, sender must retransmit  Key Design Issue: value of retransmission timer  Too small: many unnecessary retransmissions, wasting network bandwidth  Too large: delay in handling lost segment
  • 15. Chapter 12 TCP Traffic Control 15 Two StrategiesTwo Strategies  Timer should be longer than round-trip delay (send segment, receive ack)  Delay is variable Strategies: 1. Fixed timer 2. Adaptive
  • 16. Chapter 12 TCP Traffic Control 16 Problems with Adaptive SchemeProblems with Adaptive Scheme Peer TCP entity may accumulate acknowledgements and not acknowledge immediately For retransmitted segments, can’t tell whether acknowledgement is response to original transmission or retransmission Network conditions may change suddenly
  • 17. Chapter 12 TCP Traffic Control 17 Adaptive Retransmission TimerAdaptive Retransmission Timer Average Round-Trip Time (ARTT) K + 1 ARTT(K + 1) = 1 ∑ RTT(i) K + 1 i = 1 = K ART(K) + 1 RTT(K + 1) K + 1 K + 1
  • 18. Chapter 12 TCP Traffic Control 18 RFC 793 Exponential AveragingRFC 793 Exponential Averaging Smoothed Round-Trip Time (SRTT) SRTT(K + 1) = α × SRTT(K) + (1 – α) × SRTT(K + 1) The older the observation, the less it is counted in the average.
  • 19. Chapter 12 TCP Traffic Control 19 Figure 12.4Figure 12.4 ExponentialExponential SmoothingSmoothing CoefficientsCoefficients
  • 20. Chapter 12 TCP Traffic Control 20 Figure 12.5Figure 12.5 ExponentialExponential AveragingAveraging
  • 21. Chapter 12 TCP Traffic Control 21 RFC 793 Retransmission TimeoutRFC 793 Retransmission Timeout RTO(K + 1) = Min(UB, Max(LB, β × SRTT(K + 1))) UB, LB: prechosen fixed upper and lower bounds Example values for α, β: 0.8 < α < 0.9 1.3 < β < 2.0
  • 22. Chapter 12 TCP Traffic Control 22 Implementation Policy OptionsImplementation Policy Options  Send  Deliver  Accept  In-order  In-window  Retransmit  First-only  Batch  individual  Acknowledge  immediate  cumulative
  • 23. Chapter 12 TCP Traffic Control 23 TCP Congestion ControlTCP Congestion Control  Dynamic routing can alleviate congestion by spreading load more evenly  But only effective for unbalanced loads and brief surges in traffic  Congestion can only be controlled by limiting total amount of data entering network  ICMP source Quench message is crude and not effective  RSVP may help but not widely implemented
  • 24. Chapter 12 TCP Traffic Control 24 TCP Congestion Control is DifficultTCP Congestion Control is Difficult  IP is connectionless and stateless, with no provision for detecting or controlling congestion  TCP only provides end-to-end flow control  No cooperative, distributed algorithm to bind together various TCP entities
  • 25. Chapter 12 TCP Traffic Control 25 TCP Flow and Congestion ControlTCP Flow and Congestion Control  The rate at which a TCP entity can transmit is determined by rate of incoming ACKs to previous segments with new credit  Rate of Ack arrival determined by round-trip path between source and destination  Bottleneck may be destination or internet  Sender cannot tell which  Only the internet bottleneck can be due to congestion
  • 26. Chapter 12 TCP Traffic Control 26 Figure 12.6 TCPFigure 12.6 TCP Segment PacingSegment Pacing
  • 27. Chapter 12 TCP Traffic Control 27 Figure 12.7 TCP Flow andFigure 12.7 TCP Flow and Congestion ControlCongestion Control
  • 28. Chapter 12 TCP Traffic Control 28 Retransmission TimerRetransmission Timer ManagementManagement Three Techniques to calculate retransmission timer (RTO): 1. RTT Variance Estimation 2. Exponential RTO Backoff 3. Karn’s Algorithm
  • 29. Chapter 12 TCP Traffic Control 29 RTT Variance EstimationRTT Variance Estimation (Jacobson’s Algorithm)(Jacobson’s Algorithm) 3 sources of high variance in RTT If data rate relative low, then transmission delay will be relatively large, with larger variance due to variance in packet size Load may change abruptly due to other sources Peer may not acknowledge segments immediately
  • 30. Chapter 12 TCP Traffic Control 30 Jacobson’s AlgorithmJacobson’s Algorithm SRTT(K + 1) = (1 – g) × SRTT(K) + g × RTT(K + 1) SERR(K + 1) = RTT(K + 1) – SRTT(K) SDEV(K + 1) = (1 – h) × SDEV(K) + h ×|SERR(K + 1)| RTO(K + 1) = SRTT(K + 1) + f × SDEV(K + 1) g = 0.125 h = 0.25 f = 2 or f = 4 (most current implementations use f = 4)
  • 31. Chapter 12 TCP Traffic Control 31 Figure 12.8Figure 12.8 Jacobson’s RTOJacobson’s RTO CalculationsCalculations
  • 32. Chapter 12 TCP Traffic Control 32 Two Other FactorsTwo Other Factors Jacobson’s algorithm can significantly improve TCP performance, but: What RTO to use for retransmitted segments? ANSWER: exponential RTO backoff algorithm Which round-trip samples to use as input to Jacobson’s algorithm? ANSWER: Karn’s algorithm
  • 33. Chapter 12 TCP Traffic Control 33 Exponential RTO BackoffExponential RTO Backoff Increase RTO each time the same segment retransmitted – backoff process Multiply RTO by constant: RTO = q × RTO q = 2 is called binary exponential backoff
  • 34. Chapter 12 TCP Traffic Control 34 Which Round-trip Samples?Which Round-trip Samples?  If an ack is received for retransmitted segment, there are 2 possibilities: 1. Ack is for first transmission 2. Ack is for second transmission  TCP source cannot distinguish 2 cases  No valid way to calculate RTT: – From first transmission to ack, or – From second transmission to ack?
  • 35. Chapter 12 TCP Traffic Control 35 Karn’s AlgorithmKarn’s Algorithm Do not use measured RTT to update SRTT and SDEV Calculate backoff RTO when a retransmission occurs Use backoff RTO for segments until an ack arrives for a segment that has not been retransmitted Then use Jacobson’s algorithm to calculate RTO
  • 36. Chapter 12 TCP Traffic Control 36 Window ManagementWindow Management Slow start Dynamic window sizing on congestion Fast retransmit Fast recovery Limited transmit
  • 37. Chapter 12 TCP Traffic Control 37 Slow StartSlow Start awnd = MIN[ credit, cwnd] where awnd = allowed window in segments cwnd = congestion window in segments credit = amount of unused credit granted in most recent ack cwnd = 1 for a new connection and increased by 1 for each ack received, up to a maximum
  • 38. Chapter 12 TCP Traffic Control 38 Figure 23.9 Effect ofFigure 23.9 Effect of Slow StartSlow Start
  • 39. Chapter 12 TCP Traffic Control 39 Dynamic Window Sizing on CongestionDynamic Window Sizing on Congestion A lost segment indicates congestion Prudent to reset cwsd = 1 and begin slow start process May not be conservative enough: “ easy to drive a network into saturation but hard for the net to recover” (Jacobson) Instead, use slow start with linear growth in cwnd
  • 40. Chapter 12 TCP Traffic Control 40 Figure 12.10 SlowFigure 12.10 Slow Start and CongestionStart and Congestion AvoidanceAvoidance
  • 41. Chapter 12 TCP Traffic Control 41 Figure 12.11 Illustration of SlowFigure 12.11 Illustration of Slow Start and Congestion AvoidanceStart and Congestion Avoidance
  • 42. Chapter 12 TCP Traffic Control 42 Fast RetransmitFast Retransmit  RTO is generally noticeably longer than actual RTT  If a segment is lost, TCP may be slow to retransmit  TCP rule: if a segment is received out of order, an ack must be issued immediately for the last in- order segment  Fast Retransmit rule: if 4 acks received for same segment, highly likely it was lost, so retransmit immediately, rather than waiting for timeout
  • 43. Chapter 12 TCP Traffic Control 43 Figure 12.12 FastFigure 12.12 Fast RetransmitRetransmit
  • 44. Chapter 12 TCP Traffic Control 44 Fast RecoveryFast Recovery  When TCP retransmits a segment using Fast Retransmit, a segment was assumed lost  Congestion avoidance measures are appropriate at this point  E.g., slow-start/congestion avoidance procedure  This may be unnecessarily conservative since multiple acks indicate segments are getting through  Fast Recovery: retransmit lost segment, cut cwnd in half, proceed with linear increase of cwnd  This avoids initial exponential slow-start
  • 45. Chapter 12 TCP Traffic Control 45 Figure 12.13 FastFigure 12.13 Fast Recovery ExampleRecovery Example
  • 46. Chapter 12 TCP Traffic Control 46 Limited TransmitLimited Transmit  If congestion window at sender is small, fast retransmit may not get triggered, e.g., cwnd = 3 1. Under what circumstances does sender have small congestion window? 2. Is the problem common? 3. If the problem is common, why not reduce number of duplicate acks needed to trigger retransmit?
  • 47. Chapter 12 TCP Traffic Control 47 Limited Transmit AlgorithmLimited Transmit Algorithm Sender can transmit new segment when 3 conditions are met: 1. Two consecutive duplicate acks are received 2. Destination advertised window allows transmission of segment 3. Amount of outstanding data after sending is less than or equal to cwnd + 2
  • 48. Chapter 12 TCP Traffic Control 48 Performance of TCP over ATMPerformance of TCP over ATM How best to manage TCP’s segment size, window management and congestion control… …at the same time as ATM’s quality of service and traffic control policies TCP may operate end-to-end over one ATM network, or there may be multiple ATM LANs or WANs with non-ATM networks
  • 49. Chapter 12 TCP Traffic Control 49 Figure 12.14 TCP/IP overFigure 12.14 TCP/IP over AAL5/ATMAAL5/ATM
  • 50. Chapter 12 TCP Traffic Control 50 Performance of TCP over UBRPerformance of TCP over UBR Buffer capacity at ATM switches is a critical parameter in assessing TCP throughput performance Insufficient buffer capacity results in lost TCP segments and retransmissions
  • 51. Chapter 12 TCP Traffic Control 51 Effect of Switch Buffer SizeEffect of Switch Buffer Size  Data rate of 141 Mbps  End-to-end propagation delay of 6 μs  IP packet sizes of 512 octets to 9180  TCP window sizes from 8 Kbytes to 64 Kbytes  ATM switch buffer size per port from 256 cells to 8000  One-to-one mapping of TCP connections to ATM virtual circuits  TCP sources have infinite supply of data ready
  • 52. Chapter 12 TCP Traffic Control 52 Figure 12.15Figure 12.15 Performance of TCPPerformance of TCP over UBRover UBR
  • 53. Chapter 12 TCP Traffic Control 53 ObservationsObservations If a single cell is dropped, other cells in the same IP datagram are unusable, yet ATM network forwards these useless cells to destination Smaller buffer increase probability of dropped cells Larger segment size increases number of useless cells transmitted if a single cell dropped
  • 54. Chapter 12 TCP Traffic Control 54 Partial Packet and Early PacketPartial Packet and Early Packet DiscardDiscard Reduce the transmission of useless cells Work on a per-virtual circuit basis Partial Packet Discard – If a cell is dropped, then drop all subsequent cells in that segment (i.e., look for cell with SDU type bit set to one) Early Packet Discard – When a switch buffer reaches a threshold level, preemptively discard all cells in a segment
  • 55. Chapter 12 TCP Traffic Control 55 Selective DropSelective Drop Ideally, N/V cells buffered for each of the V virtual circuits W(i) = N(i) = N(i) × V N/V N If N > R and W(i) > Z then drop next new packet on VC i Z is a parameter to be chosen
  • 56. Chapter 12 TCP Traffic Control 56 Figure 12.16 ATM Switch BufferFigure 12.16 ATM Switch Buffer LayoutLayout
  • 57. Chapter 12 TCP Traffic Control 57 Fair Buffer AllocationFair Buffer Allocation More aggressive dropping of packets as congestion increases Drop new packet when: N > R and W(i) > Z × B – R N - R
  • 58. Chapter 12 TCP Traffic Control 58 TCP over ABRTCP over ABR  Good performance of TCP over UBR can be achieved with minor adjustments to switch mechanisms  This reduces the incentive to use the more complex and more expensive ABR service  Performance and fairness of ABR quite sensitive to some ABR parameter settings  Overall, ABR does not provide significant performance over simpler and less expensive UBR-EPD or UBR-EPD-FBA