In: Computer Science
How does TCP prevent sender from overflowing the receiver’s buffer? Explain how to calculate rwnd at sender side and its relationship with LastByteSent and LastByteAcked.
How does TCP prevent sender from overflowing the receiver’s buffer??
Answer: TCP uses flow control mechanism in which it keeps the acknowledged data should be less than equal to RcvWindow.
Here RcvWindow is recievers window.
Whenever the the amount of aknowledged data is less or equal to reciever window, there will be no chance of overflow.
Simply: Aknowldegement data <= reciever window.
NOTE: In case, the acknowldegement data becomes more, tcp expands the size of reciever window.
--------------------------------------------------------------------------------------------------------------------------------------
Explain how to calculate rwnd at sender side and its relationship with LastByteSent and LastByteAcked?
Answer:
LastByteSent - LastByteAcked <= rwnd
Here, rwnd is reciever window,
The diferenece of LastByteSent and LastBYteAcked is unacknowledged data.
Hence it should be be less than or equal to reciever window.
---------------------------------------------------------------------------------------------------------
PLEASE UPVOTE