40
TCP flow control (Congestion Window Control) Ashkan Paya 1

TCP flow control

Embed Size (px)

DESCRIPTION

TCP flow control. (Congestion Window Control) Ashkan Paya. Based on. An argument for increasing TCP’s initial congestion window Nandita Dukkipati, Tiziana Refice, Yuchung Cheng, Jerry Chu, Tom Herbert, Amit Agarwal, Arvind Jain and Natalia Sutin. Google Inc. Content. Terminology - PowerPoint PPT Presentation

Citation preview

TCP flow control

TCP flow control(Congestion Window Control)

Ashkan Paya 1Based onAn argument for increasing TCPs initial congestion window Nandita Dukkipati, Tiziana Refice, Yuchung Cheng, Jerry Chu, Tom Herbert, Amit Agarwal, Arvind Jain and Natalia Sutin. Google Inc.2ContentTerminologyTCP explanation and originOSI modelTCP header formats and fieldsTCP Flow Control

3Terminology ITCP: Transmission Control Protocol IP : Internet ProtocolACK : acknowledgementURG : Urgent Pointer field significancePSH : Push or send data to applicationSYN : Synchronize sequence numbersRST : Reset (abort) the connectionFIN : No more data4Terminology IIcwnd : Congestion Window(an interval that sender choose a number of sending bytes from that)awnd : advertised window (how many more bytes the receiver is willing to accept beyond the last acknowledged byte)ss_thresh : defined constant as a critical valueRTT : Round Trip TimeBDP : Bandwidth Delay ProductTime Out : duration from sending a packet that will be lost and retransmission of that until receiving acknowledgement.

55What is TCP?TCP is one of the mainprotocolsinTCP/IPnetworks. TCP enables twohoststo establish a connection and exchange streams of data (packets) and guarantees delivery of them in the same order which they were sent. In other words, TCP provides reliable, ordered delivery of a stream of bytes from a program on one computer to another program on another computer. TCP is the protocol that major Internet applications such as theWorld Wide Web,email andfile transfer rely on. Packet loss is one of the major concerns here.66What is TCP?On the other hand, other applications, which do not require reliable data stream service, may use theUser Datagram Protocol (UDP), which provides adatagram service that emphasizes reducedlatencyover reliability. Applications like Skype, ooVoo and almost all of the video/audio stream based applications using UDP protocol. Packet loss is not important here.

7Historiam begoo7OSI model

89

TCP Header format10

TCP header fieldsSource and destination port : identifies the sending and receiving ports. (16 bits)Sequence Number : random number from (2^32 _ 1)ACK Number : A dedicated ACK or piggybacked ACK contains the sequence number of the next data segment the receiver expects. (= sequence number)Heather LengthReserved : reserved for future use. Must be zero11TCP header fieldsFlags : URG, ACK , PSH, RST, SYN and FIN. (6 bits)Window : flow control credit allocation, value of advertised window. (16 bits)Checksum : this field is used for error-checking of the header and data. (16 bits)Urgent Pointer : if theURGflag is set, then this 16-bit field is an offset from the sequence number indicating the last urgent data byte . Indicates data that is to be delivered as quickly as possible. This pointer specifies the position where urgent data ends. Options : Variables such that time stamping to augment seq.num in high speed connections

1212TCP Connection Establishment sender receiver

1. SYN, sequence number =x 2. SYN+ACK seq.num = y Acknowledgement x+1 3. ACK, acknowledgement y+1

13231Three-way Hand shake Protocol(Client)(server)X random numbere 32 bit ke az oon shooroo mishe va mirie too dore ta behesh berese baz 2. badeesh active ke sendere13TCP Connection Termination client server 1. FIN, seqNum = x

2. acknowledgement = x+1 3. FIN, seqNum = y

4. acknowledgement = y+1 141234TCP Flow Control [1]15Flow control is needed to:16Flow control is needed to:Prevent sender from swamping receiver with data e.g.a fast server sending to a slow client.

17Flow control is needed to:Prevent sender from swamping receiver with data e.g.a fast server sending to a slow client.Provide congestion control inside the network, e.g. in gateways or routers.

18Flow control is needed to:Prevent sender from swamping receiver with data e.g.a fast server sending to a slow client.Provide congestion control inside the network, e.g. in gateways or routers.

* In either case, a node can be forced to discard packets due to lack of buffer space.

19Flow control can solve:20Flow control can solve: end-to-end flow control

21(overload problems at end node)

21Congestion control mechanism22Congestion control mechanism1. Slow start phase initial_cwnd = 1

23Congestion control mechanism1. Slow start phase initial_cwnd = 12. Congestion avoidance phase24Congestion control mechanism1. Slow start phase initial_cwnd = 12. Congestion avoidance phase3. Congestion detection and recovery a) Standard Recovery ( recovery by timeout)

b) Fast retransmission and fast recovery

25Moshkele fast ine ke faghat yekio recover mikone va age too ye rtt bish az 1 loss dashte bashim ba ga raftim va timeout mishe2526

Begoo ke faghat 3 dafe poshte ham fast mikone bad dige be ga mire26Increasing initial cwnd TCP initial_cwnd has remained unchanged since 2002. in 2009 one paper[2] indicated that average connection bandwidth is 1.7 Mbps with more than 50% of clients have bandwidth above 2 Mbps, while the usage of narrowband (