Académique Documents
Professionnel Documents
Culture Documents
TCP doesnt like link control protocols had REJ or SREJ. It relies timer timeout to do the retransmission Two evens will retransmission
segment error or segment loss acknowledgment error or loss
SRTT ( K + 1) = SRTT ( K ) + (1 ) RTT ( K + 1) = (1 ) RTT ( K + 1) + (1 ) RTT ( K ) + 2 (1 ) RTT ( K 1) + ... + K (1 ) RTT (1) + ( K +1) RTT ( 0)
small value of
advantage: quickly reflect a rapid change in the observed quantity disadvantage: jerky changes in the average
The retransmission timer should be greater than the estimated round-trip time
RTO (K+1) = SRTT (K+1) + RTO: retransmission time out value, the should proportional to SRTT RTO(K+1) = MIN(UBOUND, MAX(LBOUND, *SRTT(K+1))
Example values: between 0.8 and 0.9 between 1.3 and 2.0
Accept Policy
in order : any segment that arrives out of order is discarded in window : accept all segments that are within the receive window
Retransmit Policy
First only: maintain one retransmission timer for the entire queue
if ACK is received, remove the appropriate segment and reset the timer if timer expires, retransmit the first segment of the queue and reset timer
Acknowledge Policy
Immediate: when data are accepted, immediately transmit an empty ACK segment Cumulative: piggyback acknowledgment, to avoid long delay, set a window timer, if timer expires, transmit an empty ACK segment
complicate the task of estimating round-trip delay by the sending TCP entity
the receives ACKs may reflects the status of the internet (congestion control) or the status of the destination (flow control) , but TCP doesnt understand
if network congestion: TCP slower the send rate
physical congestion (link): reduce the amount of the data during T logical congestion (router): reduce the number of the packet dur ing T
The fluctuations in delays that are inherent in an IP-based internet present a challenge in designing flow policies for TCP sources
If TCP flows are too slow, then the internet is underutilized If one or a few TCP sources use excessive capacity, then other TCP flows will be crowded out If many TCP sources use excessive capacity, then segments will be lost in transit, forcing retransmission, or ACK will be excessively dela yed, triggering unnecessary retransmissions as sources time out
The retransmission can have a positive feedback effect (as more segments are retransmitted, congestion grows make the congestion problem even worse
Some TCP congestion control methods with TCP sliding windows mechanism is proposed
goal: estimate the variability in RTT values and use it to calculate the RTO
use mean deviation to avoid square and square too calculation (standard deviation) MDEV (K+1) = E[|X-E[X]|] apply the estimate MDEV to estimate the RTT deviation
AERR(K+1) = RTT(K+1) - ARTT(K), where AERR(K+1) is the deviation measured at time K+1 Then using simple average to estimate MDEV
ADEV ( K + 1) = 1 K =1 | AERR(i) | K + 1 i =1 K 1 = ADEV ( K ) + | AERR( K + 1) | K +1 K +1
Where ADEV(K): average deviation. Each term is multiplied by the same constant 1/(K+1), equal weight we would like to give greater weight to more recent instances because they are more likely to reflect future behavior 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)
Karns Algorithm
Goal : to derive accurate RTT ex: if one segment timeout and retransmission, then receive an ACK
the ACK is first transmission the ACK is the second transmission Feeding false RTT into Jacobsons algorithm => error SRTT (RTO). The error effect propagates forward a number of iterations
Karns algorithm
do not use measured RTT for a retrnsm. Segment to update SRTT and SDEV if retransmission occurs, calculate the backoff RTO use the backoff RTO value for succeeding segment until an ACK arrives for a segment that has not been retransmitted
Window Management
Sending Window Management technique
Slow start Dynamic window sizing on congestion Fast retransmit Fast recovery
Congestion control
If suddenly inject a large number of segments into the network, router buffer space could become exhausted (dropped datagrams)
Use congestion window to control network congestion slow start
Slow start
When a connection is first initialized, it has no the selfclock information for pacing to guide it
for the large window size, it is risky for the sender flood large segments (allowed by windows size), the flow may incur internet congestion awnd = MIN[credit,cwnd] awnd : allowed window, in segments cwnd : congestion window, in segments credit : the amount of unused credit granted in the most recent acknowledgement, in segment (send window) s new connection is opened, => initialized cwnd = 1 (allow send 1 segment) each time an ACK is received => cwnd = cwnd + 1 (grows exponentially) probe the internet to make sure that it is not sending too many until the cwnd reaches a slow start threshold (is controlled by the incoming ACKs, the network is stable), the slow start is over, and another algorithm, congestion avoidance, takes over
Congestion avoidance
if congestion, separate the cwnd growing into two sections. In the former section, the cwnd with exponential growth (slow start). In the last section, the window size increase slowly that let more time for internet to clear congestion When timeout, the algorithm is
set ssthresh (slow-start threshold) = cwnd/2 set cwnd = 1 and perform slow-start process until cwnd = ssthresh for cwnd >= ssthresh, increase cwnd by one for each round-trip time
Window Management
RTO is set grater than the estimated round-trip time SRTT
the RTO is estimated from past values of RTT. If delays in the network fluctuate => RTO may be smaller than the actual RTT if delays at the DA fluctuate, the estimated RTT becomes unreliable the DA may not ACK each segment but cumulatively ACK multiple segments => contribute to fluctuation in RTT
Fast Retransmission
If DA receives a segment out of order
immediately issue an ACK for the previous segment continue to repeat this ACK with each incoming segment until the missing segment arrive if the hole is plugged, send a cumulative ACK for all of the inorder segment
Fast Recovery
Different with the slow start and dynamic windows sizing on congestion if SA received multiple duplicate ACK before timeout => mean that the network have good quality => avoid the initial exponential slow-start process
when the third duplicate ACK arrives (not yet timeout occur)
a set ssthresh = cwnd/2 retransmit the missing segment (fast retransmission) set cwnd = ssthresh + 3 (not set to 1) each time an additional duplicate ACK for the same segment arrives, increasecwnd by 1 and transmit a segment if possible (means additional segment thas has left the network and that triggered the duplicate ACK) when the next ACK arrives to ack new data => set cwnd = ssthresh
The source can transmit one additional segment for each duplicate ACK received. In this example, the source is unable to transmit any segment until cwnd regains its former value
ssthresh+3