TCP-SLOW START/CONGESTION CONTROL
Slow Start:- it balances speed of N/W connection
slow start use congestion window CWND
sender----1segment, win size =x---------->receiver
sender<----ack1,received x size of data---receiver ===>after ack then CWND=window size is incremented p value
sender----1segment win size =x+some value------>receiver
sender----1segment win size =x+some value------>receiver
sender<----ack1----------receiver
sender<----ack1----------receiver ===>after ack then CWND=window size is incremented P+ Q value
sender----1segment win size =x+some value------>receiver
sender----1segment win size =x+some value------>receiver
sender----1segment win size =x+some value------>receiver
sender<----ack1----------receiver
sender<----ack1----------receiver
sender<----ack1----------receiver ===>after ack then CWND=window size is incremented P+Q+R value
.
.
.
.after some time CWND=1+1+1...+1=Z window size which is too large for receiver to handle
sender<----CWND=size is too large------receiver
===>so it sends max date until transmission rate=HIGH, when the receiver or link cannot handle then
it slows down the transmission rate
again starts this SLOW START PROCESS.....
advantages:
++user has uninterrupted connections
++faster downloads
++BW is balanced
even if we increase the BW from 5Mbps to 10Mbps just improves 5%
it only depends on sender and receiver and the slow start.
congestion control:-
it will avoids the congestion or in case if the congestion happens it removes it.
two types:-
congestion avoidance:-
asoon as the CWND=high where receiver cannot handle it slows down the transmission rate.
like this congestion is avoided.
congestion detection:-
lets say the congestion has occurred.
sender-->doesn't know that receiver window size has reached threshold.
it can detect like:-
1)when timeout occurs
slow start use congestion window CWND
sender----1segment, win size =x---------->receiver
sender<----ack1,received x size of data---receiver ===>after ack then CWND=window size is incremented p value
sender----1segment win size =x+some value------>receiver
sender----1segment win size =x+some value------>receiver
sender<----ack1----------receiver
sender<----ack1----------receiver ===>after ack then CWND=window size is incremented P+ Q value
sender----1segment win size =x+some value------>receiver
sender----1segment win size =x+some value------>receiver
sender----1segment win size =x+some value------>receiver
sender<----ack1----------receiver
sender<----ack1----------receiver
sender<----ack1----------receiver ===>after ack then CWND=window size is incremented P+Q+R value
.
.
.
.after some time CWND=1+1+1...+1=Z window size which is too large for receiver to handle
sender<----CWND=size is too large------receiver
===>so it sends max date until transmission rate=HIGH, when the receiver or link cannot handle then
it slows down the transmission rate
again starts this SLOW START PROCESS.....
advantages:
++user has uninterrupted connections
++faster downloads
++BW is balanced
even if we increase the BW from 5Mbps to 10Mbps just improves 5%
it only depends on sender and receiver and the slow start.
congestion control:-
it will avoids the congestion or in case if the congestion happens it removes it.
two types:-
congestion avoidance:-
asoon as the CWND=high where receiver cannot handle it slows down the transmission rate.
like this congestion is avoided.
congestion detection:-
lets say the congestion has occurred.
sender-->doesn't know that receiver window size has reached threshold.
it can detect like:-
1)when timeout occurs
2)duplicate ACKs are received
===>sender will immediately decrease window size=1/2 half, slow start is again started
DUP-ACK/FAST-re-transmission:-
NORMAL behaviour:-
sender----segment seq=1------>receiver
sender<----ack=1+1,seq=1------receiver
sender----segment seq=2------>receiver (i should get seq=2)
somtimes it happens like this:-
sender----segment seq=1------>receiver
sender<----ack=1+1,seq=1------receiver
sender----segment seq=5----------------->receiver(i should get seq=2)
*****here receiver got higher seq number than expected. TCP out of order.****
sender<--DUP-ACK1 is sent that seq2 is missing--receiver
sender----segment seq=1------>receiver
sender<----ack=1+1,seq=1------receiver
sender----segment seq=2------>receiver (i should get seq=2)
somtimes it happens like this:-
sender----segment seq=1------>receiver
sender<----ack=1+1,seq=1------receiver
sender----segment seq=5----------------->receiver(i should get seq=2)
*****here receiver got higher seq number than expected. TCP out of order.****
sender<--DUP-ACK1 is sent that seq2 is missing--receiver
sender<--DUP-ACK2 is sent that seq2 is missing--receiver
sender<--DUP-ACK3 is sent that seq2 is missing--receiver
retransmission timer to expire.(retransmission timout is calculated based on RTT)
*****now tcp re-transmission happens called fast re-transmission******
**** congestion avoidance will happen by reducing window size to its half***and slow start process continued.
fast recovery:-
fast re-transmit is used to send missing segment.
in fast recovery slow start is not performed again.
0 Response to "TCP-SLOW START/CONGESTION CONTROL"
Post a Comment