0

When a packet is being sent after the SYN ACK connection has been established between a host and a server, packets can now be sent between the hosts and a server. Sometimes, there’s a window size which is determinable by ACK sent after reception of a segment.

Let’s say the window size is 100, the sender can send 100 segments before it expects to receive an ACK. But what happens is segment 50 gets missing along the line?

I read somewhere that 1-49 & 51-100 gets sent but then the receiver ACKs for 50 and the sender resend 1 segment with segment number 50. I was also reading somewhere that, for example, let’s say sender has a window size of three, and my sender sends segment 1,2,3, receiver ACKS for 4. The next window must be 4,5,6.

Let’s say 4 doesn’t get sent, the receiver ACKS for 4 again, and the whole segment gets sent again, which conflicts with the earlier idea. I was thinking 5-6 gets sent before an ACK for 4 gets sent, then the 4th segment gets sent after 5-6.

Which idea is right?

3
  • The TCP send window doesn't count segments but bytes.
    – Zac67
    Apr 8 at 11:18
  • @Zac67 My bad. Kindly ignore the error and address the main question if you can Apr 8 at 11:23
  • "Let’s say the window size is 100, the sender can send 100 segments before it expects to receive an ACK." No, it is 100 bytes.
    – Ron Maupin
    Apr 8 at 12:26
1

what happens if segment 50 gets missing along the line?

The receiver can either

  • simply wait for retransmission (when the sender's timer for a unACKed segment expires it is resent automatically)
  • send duplicate ACKs (DUPACK) for 50 (the next expected segment) to prompt a faster retransmission

The receiver can also selectively ACK (SACK) 51-100 to avoid a retransmission of successfully received segments. Without selective ACK, the sender retransmits 50-100.

Note that TCP doesn't have a client/server concept. There are two hosts, each of them able to send and receive. Clients and servers only exist in the application layer.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.