9.TCP Windowing

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to this tutorial we're going to talk about the TCP feature known as windowing now if you've ever been in a classroom or a lecture and the speaker is talking so fast that no matter how fast you write down your notes and try to process the information you just can't keep up because they're talking too fast and eventually you start to fall behind you start to lose some of the data that they're telling you well if that's happened to you then you can imagine it happening to two computers and in fact that used to happen when a very fast computer can send so much information that perhaps an older slower computer would eventually fall behind and start to lose this ability to process all the data well in order to avoid this TCP uses the concept of windowing and all windowing really is is a mechanism to control the flow of data to prevent too much data from being sent so that the receiving host doesn't doesn't fall behind now TCP does this by using some mechanisms we've already talked about like sequence numbers and acknowledgment messages but it also introduces something new here and that's the concept of the window now by window all we mean is the maximum amount of data that can be sent before an acknowledgement is received so you remember that TCP is a reliable protocol and that a receiver will send an acknowledgment to the sender so if the sender knows that the data was delivered well here the concept of the window uses the acknowledgment to let the sender know that all of the information in the window was received all of that data and that the sender can now continue to send more data so the receiver has a little bit of control here over that flow all right so that's the concept of windowing and we're going to go ahead now and take a look at a few examples so after a TCP connection is established then the two hosts involved can go ahead and send and receive information so it starts with a window size and here pc2 is going to tell pc1 that it has a window size of 2 meaning PC one can send two data segments like that before it has to wait for an acknowledgment from PC to now it can no longer send any more data to PC 2 until PC one receives that acknowledgement so you can see now how PC 2 is in control of the amount of data it receives so when PC 2 is ready it will go ahead and send the acknowledgment and remember this is a forward acknowledgement so it states what it's expecting to receive next and that implies the reception of everything before it so when PC 1 receives this acknowledgement it now knows it has an open window to fill again so it can go ahead and send two more data segments and then this repeats itself once again the window is full PC one has to wait for PC 2 to send it or not to send an acknowledgement like that and then it can go ahead and continue and so this is a very effective means of controlling the flow of data however TCP enables this process to be a little more flexible so that if things are going really well this window size can be increased or if things are starting to go poorly it can be decreased so let's go ahead and take a look at an example of that happening let's begin again by having PC to state its window size and here the window size is one data segment so PC one is going to go ahead and send the one data segment and now has to wait for the acknowledgement well let's say pc2 is more than capable of receiving one data segment at a time so what it'll do is it'll send its acknowledgment and when it does that it can also change the size of the window so you can see here now it's stating okay I can take a window size of two now PC one can go ahead and send two data segments before it has to wait for that acknowledgement if things are going very well PC two can go ahead and increase the window size again if it starts to lose some packets or fall behind and processing the data it can go ahead and shrink the window size or it can just go ahead and leave the window size the same so here it sends an acknowledgment back and now PC one can go ahead and continue using a window size of two until it changes again okay so the idea to walk away with here is that the window size is dynamic and it often changes many times in a given conversation okay so let's summarize what we covered we now know that windowing is a means of controlling the flow of data so we create a window size and this size is expressed in bytes and the sender is going to go ahead and fill that window and once it does it has to wait for an acknowledgment from the receiver once it goes ahead and gets that acknowledgment you can go ahead and fill up the window again and then it has to wait in this process continues finally we talked about how windows are dynamic in other words the size of the window can change depending on the needs of the hosts involved if things are going well it can get bigger if it's not going so well the window size can shrink okay so that's it that is the TCP feature of windowing thanks for watching
Info
Channel: System Engineer
Views: 69,607
Rating: undefined out of 5
Keywords:
Id: hkXPXJA8-UA
Channel Id: undefined
Length: 6min 16sec (376 seconds)
Published: Sun Apr 23 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.