tcp congestion control - simon fraser universityljilja/ensc835/spring08/projects/najiminaini/... ·...

27
4/16/2008 1 TCP Congestion Control in Wired and Wireless Networks ENCS 835 Course Project Spring 2008 April 7, 2008 Presented by: Mohamadreza Najiminaini Professor: Ljiljana Trajkovic

Upload: others

Post on 28-Jun-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 1

TCP Congestion Control in Wired and Wireless Networks

ENCS 835 Course ProjectSpring 2008April 7, 2008

Presented by: Mohamadreza NajiminainiProfessor: Ljiljana Trajkovic

Page 2: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 2

Roadmap

IntroductionRelated WorkSlow-Start and Congestion AvoidanceFast Retransmit and Fast RecoveryVarious TCP Congestion Control AlgorithmsSimulation ResultsConclusion

Page 3: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 3

Introduction

TCP mechanism for congestion control is implemented at the senderThe congestion window size at the sender is set as:Send Window = MIN (flow control window, congestion window)

flow control window is advertised by the receivercongestion window is set based on feedback from the network

Page 4: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 4

Introduction

Two significant parameters of TCP congestion control are:

Congestion Window size(cwnd)Slow-start threshhold Value (ssthresh)

Congestion control works in two phases:slow start: cwnd < ssthreshcongestion avoidance: cwnd ≥ ssthresh

Page 5: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 5

Related Work

Comparison of TCP Tahoe, Reno, NewReno, SACK using ns-2:

K. Fall and S. Floyd, “Simulation based comparisons of Tahoe, Reno and SACK TCP,” Computer Communications Review, vol. 26, no. 3, July 1996, pp. 5-21

Modified Tahoe and comparison with other TCP congestion control algorithms using Opnet Modeler:

M. N. Akhtar, M. A. O. Barry and H. S. Al-Raweshidy“Modified Tahoe TCP for wireless networks using OPNET simulator,” Proc of the London Communications Symposium (LCS2003), London, Sept 2003

Page 6: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 6

Slow StartInitial value: cwnd = 1(MSS)When the sender receives an ACK, the congestion window is increased by 1 segment:cwnd = cwnd + 1

an ACK for two segments, cwnd is incremented by only 1 segmentan ACK for a segment that is smaller than MSS bytes, cwnd is incremented by 1

Page 7: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 7

Congestion Avoidance

Congestion avoidance phase initiates after cwndreaches the slow-start threshold valueIf cwnd ≥ ssthresh then every time an ACK reaches to the sender, increase cwnd as:

cwnd = cwnd + 1/ cwnd

Page 8: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 8

Slow-Start Algorithm with Congestion Avoidance

SENDER RECEVER

CWND=1

CWND=2

CWND=4

Packet 0

Packet 1

Packet 2

Packet 3

Packet 4

Packet 5

Packet 6

ACK1

ACK2 ACK3

Window size

Time

SlowStart SlowStart Congestion avoidance

Congestion avoidance

packet loss packet loss packet loss

Page 9: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 9

Fast Retransmit

Three and more duplicate ACKs indicate a lost segmentThen TCP performs a retransmission of the lost segment, without waiting for a timeout to happenEnter slow start:

ssthresh = cwnd/2cwnd = 1

Page 10: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 10

Fast Recovery

Fast recovery avoids slow start after a fast retransmitAfter three duplicate ACKs set:

Retransmit the lost segmentssthresh = cwnd/2cwnd = ssthresh+3Increase cwnd by one for each additional duplicate ACK

When it receives an ACK for a new packetcwnd=ssthreshenter congestion avoidance

Page 11: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 11

Various TCP Congestion Control Algorithms

TCP Tahoe (1988, FreeBSD 4.3 Tahoe)Slow startCongestion avoidanceFast retransmit

TCP Reno (1990, FreeBSD 4.3 Reno)Fast recovery

New Reno (1996)SACK (1996)

Page 12: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 12

TCP Reno

Duplicate ACKs:Fast retransmitFast recoveryFast recovery avoids slow start

Timeout:retransmit slow start

TCP Reno performs better than TCP Tahoe when a single packet is dropped within a round-trip time.

Page 13: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 13

TCP New RenoWhen multiple packets drops, Reno can not handle wellPartial ACK:

happens if multiple packets are lostA partial ACK does not acknowledge all packets that are outstanding at the beginning of a fast recovery (this takes sender out of fast recovery)Sender must wait until timeout occurs

New Reno:Partial ACK does not take sender out of fast recoveryNew Reno can handle multiple lost segments without entering slow start

Page 14: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 14

Selective Acknowledgement (SACK)

At most 1 lost segment can be retransmitted in Reno and NewReno per round trip timeSelective acknowledgments: acknowledges non-continuous blocks of data Multiple blocks can be transmitted in a single segmentTCP SACK:

Initiate fast recovery upon 3 duplicate ACKsSender keeps records of SACKs and understand if segments are lost. Sender retransmits the subsequently segment from the list of the lost segments

Page 15: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 15

Simulation

Opnet Modeler and IT GuruSimulation results:

congestion window size (CWND)sent segment sequence number (SSSN)

Simulation scenarios:Point to point client and server connection (PPP)

single packet droptwo packet drops

WAN topology: 0.05% packet drops and 0.001 sec packet latencyWireless topology: using trajectory for packet drops

Page 16: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 16

Point-to-Point Client Server connection (PPP)

ApplicationFTPconstant file sizeConstant inter-request time

ProfileClientServer: FTP serverPacket discarder

drop packets

Page 17: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 17

CWND in PPP Server-Client: one drop

Page 18: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 18

Sent Segment Sequence Number PPP Server-Client: one drop

Page 19: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 19

CWND in PPP Server-Client: two drops

Page 20: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 20

Sent Segment Sequence Number PPP Server-Client: two drops

Page 21: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 21

WAN Topology

West Subnet East Subnet

WAN Topology

Page 22: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 22

CWND in WAN: packet drop (0.05%) packet latency (0.001)

Page 23: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 23

SSSN in WAN, packet drop (0.05%)-packet latency (0.001)

Page 24: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 24

Wireless Topology

Trajectory

Page 25: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 25

CWND in Wireless Topology

Page 26: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 26

Conclusion

Reno performs well only if no loss or one packet drop within a windowNewReno can deal with multiple lost segments without entering slow startSACK (selective acknowledgement and selective retransmit)TCP congestion control algorithms do not perform satisfactory in wireless network due to signal attenuation in wireless environment.

Page 27: TCP Congestion Control - Simon Fraser Universityljilja/ENSC835/Spring08/Projects/najiminaini/... · 2009-02-06 · Various TCP Congestion Control Algorithms TCP Tahoe (1988, FreeBSD

4/16/2008 27

References

K. Fall and S. Floyd, “Simulation based comparisons of Tahoe, Reno and SACK TCP,” Computer Communications Review, vol. 26, no. 3, July 1996, pp. 5-21. M. N. Akhtar, M. A. O. Barry and H. S. Al-Raweshidy “Modified Tahoe TCP for wireless networks using OPNET simulator,” Proc of the London Communications Symposium (LCS2003), London, Sept 2003. W. Stevens, “TCP slow start, congestion avoidance, fast retransmit and fast recovery algorithms,”. Network Working Group, RFC2001, Jan 1997.M. Omueti and Lj. Trajkovic, “M-TCP+: using disconnection feedback to improve performance of TCP in wired/wireless networks,” Proc. SPECTS 2007, San Diego, CA, USA, July 2007, pp. 443-450. A. S. Tanenbaum, “Computer Networks,” The Transport Layer, 4rd Edition.