Question

Explain how TCP flow control is done? (5 Points)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Following is the answer:

Transmission Control Protocol (TCP) uses a sliding window for flow control.

  • The TCP sliding window determines the number of unacknowledged bytes, x, that one system can send to another.
  • Two factors determine the value of x:
  • The size of the send buffer on the sending system
  • The size and available space in the receive buffer on the receiving system.
  • The sending system cannot send more bytes than space that is available in the receive buffer on the receiving system.
  • TCP on the sending system must wait to send more data until all bytes in the current send buffer are acknowledged by TCP on the receiving system.
  • On the receiving system, TCP stores received data in a receive buffer.
  • TCP acknowledges receipt of the data, and advertises (communicates) a new receive window to the sending system.
  • The receive window represents the number of bytes that are available in the receive buffer.
  • If the receive buffer is full, the receiving system advertises a receive window size of zero, and the sending system must wait to send more data. After the receiving application retrieves data from the receive buffer, the receiving system can then advertise a receive window size that is equal to the amount of data that was read. Then, TCP on the sending system can resume sending data.
  • The available space in the receive buffer depends on how quickly data is read from the buffer by the receiving application.
  • TCP keeps the data in its receive buffer until the receiving application reads it from that buffer.
  • After the receiving application reads the data, that space in the buffer is available for new data.
  • Ensure that you understand the TCP window size when you use sliding window for flow control.
  • The window size is the amount of data that can be managed.
  • You might need to adjust the window size if the receive buffer receives more data than it can communicate.

Flow control is controlled by the receiving side.
It ensures that the sender only sends what the receiver can handle.
Think of a situation where someone with a fast fiber connection might be sending to someone on dialup or something similar.
The sender would have the ability to send packets very quickly, but that would be useless to the receiver on dialup, so they would need a way to throttle what the sending side can send.
Flow control deals with the mechanisms available to ensure that this communication goes smoothly.

How its Work:
When we need to send data over a network, this is normally what happens.
The sender application writes data to a socket, the transport layer (in our case, TCP) will wrap this data in a segment and hand it to the network layer (e.g. IP), that will somehow route this packet to the receiving node.
On the other side of this communication, the network layer will deliver this piece of data to TCP, that will make it available to the receiver application as an exact copy of the data sent, meaning if will not deliver packets out of order, and will wait for a retransmission in case it notices a gap in the byte stream.

TCP stores the data it needs to send in the send buffer, and the data it receives in the receive buffer. When the application is ready, it will then read data from the receive buffer.

Flow Control is all about making sure we don’t send more packets when the receive buffer is already full, as the receiver wouldn’t be able to handle them and would need to drop these packets.

To control the amount of data that TCP can send, the receiver will advertise its Receive Window (rwnd), that is, the spare room in the receive buffer.

Every time TCP receives a packet, it needs to send an ack message to the sender, acknowledging it received that packet correctly, and with this ack message it sends the value of the current receive window, so the sender knows if it can keep sending data.

Add a comment
Know the answer?
Add Answer to:
Explain how TCP flow control is done? (5 Points)
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT