![]() In the graph above you can see the window size that was used during this connection. Here’s what happened, take a look at this picture: To get an interesting output, I will copy a large file through SSH from my computer to the raspberry pi which will be easily overburdened. The raspberry pi is a great little device but it’s cpu / memory / ethernet interface are limited. On the right side, we have a small raspberry pi which has a FastEthernet interface. The device on the left side is a modern computer with a gigabit interface. To examine the TCP window size I will use two devices: Now you have an idea what the TCP window size is about, let’s take a look at a real example of how the window size is used. When we use RED, our average interface utilization will improve. The end result will look similar to this: When packets are dropped before a queue is full, we can avoid the global synchronization. this is a feature that drops “random” packets from TCP flows based on the number of packets in a queue and the TOS (Type of Service) marking of the packets. To prevent global synchronization we can use RED (Random Early Detection). The result of this is that we don’t use all the available bandwidth that our interface has to offer. If you look at the dashed line you can see that we the average interface utilization isn’t very high. ![]() The interface then gets congested again, the window size drops back to one and the story repeats itself. What happens is that the window size of all these TCP connections will drop to one and once the interface congestion is gone, all their window sizes will increase again. These TCP connections start at different times and after awhile, the interface gets congested and packets of all TCP connections are dropped. The orange, blue and green lines are three different TCP connections. This is called TCP global synchronization. Packets will be dropped and then all TCP connections will have a small window size. When an interface gets congested, it’s possible that all your TCP connections will experience TCP slow start. At that moment, the window size will grow linearly instead of exponentially. It will then grow exponentially again until the window size is half of what it was when the congestion occurred. With TCP slow start, the window size will initially grow exponentially (window size doubles) but once a packet is dropped, the window size will be reduced to one segment. It’s queue(s) will hit a limit and packets will be dropped. One of them is called slow start.Ĭongestion occurs when the interface has to transmit more data than it can handle. To deal with this, TCP has a number of algorithms that deal with congestion control. When an interface has congestion then it’s possible that IP packets are dropped. When the receiver doesn’t send an acknowledgment within a certain time period (called the round-trip time) then the window size will be reduced. In the example above the window size keeps increasing as long as the receiver sends acknowledgments for all our segments or when the window size hits a certain maximum limit. The host is now sending four segments and the host on the right side responds with a single acknowledgment. Everything is working fine so the window size will increase even further: The host on the left side is now sending two segments and the host on the right side will return a single acknowledgment. Since the acknowledgement was successful, the windows size will increase: Here’s an example:Ībove we have two hosts, the host on the left side will send one segment and the host on the right side will send an acknowledgment in return. Typically the TCP connection will start with a small window size and every time when there is a successful acknowledgement, the window size will increase. Basically, the window size indicates the size of the receive buffer. ![]() When the receiver sends an acknowledgment, it will tell the sender how much data it can transmit before the receiver will send an acknowledgment. When we start a TCP connection, the hosts will use a receive buffer where we temporarily store data before the application can process it. TCP uses “windowing” which means that a sender will send one or more data segments and the receiver will acknowledge one or all segments. When we don’t receive the acknowledgment in time then the sender will re-transmit the data. The sender will transmit some data and the receiver has to acknowledge it. TCP (Transmission Control Protocol) is a connection oriented protocol which means that we keep track of how much data has been transmitted.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |