The TCP-IP sliding window

Foreword

TCP in the OSI model, belongs to the fourth layer (transport layer), to help us deal with the details of the transport layer. Comprising a flow restrictor, packet loss, network transmission, problems such disorder. That in the end is how to achieve TCP limiting it?

If you need a refresher on the basics, please stamp here "TCP / IP foundation ten minutes Getting Started", bloggers are lazy, make up next week

Buffer is filled with the receiving end

If the sender transmission speed, reciever processing speed. what will happen?

Over time, reciever buffer is played.

  • When the buffer is played reciever, told sender by ack (win = 0) Do not send data up to me, I can not deal with.
  • sender will stop sending data.
  • After a while, after reciever process data buffer has free space.
  • Statement by ack own window size
  • sender continue sending data

Sliding window appearance

The TCP-IP sliding window
By animation we can visually see the sliding window to the right, so called sliding window.

Decomposition action

Slide the front

The TCP-IP sliding window
Illustrates what information it contains? We look decomposition.

  • Window size of the receiving end 6
  • Outside the window, the left has been sent and received ACK, this part of the data may be discarded.
  • 12-14 has been sent, but did not receive ack. (Can not be discarded, a retransmission may be required)
  • 15-17 is not transmitted data, since the data is less than 6 unacknowledged, transmission can be quickly
  • Outside the window, no data is transmitted to the right, but the window is full, can not send

After sliding

The TCP-IP sliding window

  • sender receives the acknowledgment packet ack = 12
  • Sliding window right
  • The data within the window to 13-18

    to sum up

    These are the sliding window TCP / IP in.
    Sliding window algorithm is also a limiting service.

    other

    Some students might ask, if the first received confirmation packet ack = 13, the sliding window is what it? We directly on the map it!
    The TCP-IP sliding window

Guess you like

Origin blog.51cto.com/4436396/2430582