当前位置:网站首页>Sliding window technology based on byte in transport layer

Sliding window technology based on byte in transport layer

2022-06-25 00:24:00 Foxconn quality inspector zhangquandan

The previous principle of reliable transmission , More generally , For example, stop waiting for the agreement , continuity ARQ And sliding windows , In fact, the sliding window technology in bytes is to say continuous in detail ARQ And how sliding windows are implemented .

The application will transfer the file to another computer , In fact, this file is put into the cache in the form of byte stream , Segment bytes in the cache ,

  piecewise , Each sequence number is the first in the segment .

 

 

Detailed explanation of sliding window technology  


a and b When the computer communicates, it is necessary to establish a connection ,b Computer tells a The receiving window on the computer side is 400 Bytes , Maximum supported message segment mss yes 100 Bytes , This is a b Computer tells a The computer ,400 Bytes is the acceptance window .

This is the time a Set a send window in the cache , This window is 400 Bytes , Then, the contents transmitted inside are transmitted in the form of byte stream 100 Byte grouping , And number .

There will be 4 Groups are in this sliding window , This time you can send 1,2,3,4 Groups , This is continuous ARQ, The first sequence number is 1, The second serial number is 101...........

b When received , The application reads these consecutive received data from the cache , At this time, the receiving window starts to move , It is equivalent to making room , Before you receive it 4 Data segments for a Send a confirmation , Confirmation no. ack Tag bit of ACK=1, The confirmation number is 401, This means that the front 400 Bytes all received , You should send me 401 The bytes , At this time, the sending window also starts to move , Then the following data segment runs into the sliding window , Repeat the above steps .

After receiving the confirmation , The sent data segments can be deleted in the cache .

At the time of sending , The first 7 If you lose it , The receiver received it 5,6,8, After receiving it at this time, due to 7 Have not received , The window cannot move forward , At this time, I will ask a Send a confirmation , You should send me 601 了 , I have received it before , The receiving end starts sliding the window , that 9,10 Into the sliding window , And then send 9,10.

7 lost , When will it be sent ? Each time a packet is sent, there is a timing , Waiting for a round trip , Automatically resend after timeout . After receiving the confirmation , It wasn't immediately lost 7, Instead, move the window first , Falling on the window 9 and 10 Hair .( Because it supports selective confirmation , that 8 It won't be reissued )

7 8 9 10 received , Start reading these continuous data , Read consecutive bytes and send them confirmation 1001.

The above is the sliding window technology in bytes .

The size of this sliding window is b Computer tells a Of .

原网站

版权声明
本文为[Foxconn quality inspector zhangquandan]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206241941261725.html