2
votes

Just assume we are sending a packet with TCP and we found that packet has been dropped by network. After expiry of the time we try to resend the packet. In the meanwhile we got a new segment from application layer, and we are now trying to send both segments, the older one and new one with the sequence number which has not been acknowledged. Now the packet size is greater than older size. Just assume the older packet was delivered successfully but its acknowledgement was lost.

I explain this by some steps:-
1. (from sender) packet[SEQ=100,SEG_LEN=3,SEG="ABC"]----(To receiver)--->Receiver got it
2. (from receiver) packet[ACK=121]-----(To sender)---->Packet lost(Sender couldn't receive it)
3. We got new segment from application SEG="XYZ" and time expired for the previous packet
4. (from sender) packet[SEQ=100,SEQ_LEN=6,SEG="ABCXYZ"]----(To receiver)--->Receiver got it

So, now I want to know that what will happen at the receiver side,

  1. Will it drop the packet by just assuming duplicate? or
  2. It will accept the extra("XYZ") segment or total("ABCXYZ") segment.(?)
1

1 Answers

0
votes

After expiry of the time we try to resend the packet.

Not necessarily, see below.

In the meanwhile we got a new segment from application layer, and we are now trying to send both segments, the older one and new one with the sequence number which has not been acknowledged.

Not necessarily. It is entirely possible that both segments are now coalesced and that you're only trying to send one segment at this point.

Now the packet size is greater than older size.

The segment size may be older than the old size, if what I said above is true. If it isn't, the sizes of the two packets you originally talked about haven't changed at all.

Just assume the older packet was delivered successfully but its acknowledgement was lost. So, now I want to know that what will happen at the receiver side

Will it drop the packet by just assuming duplicate?

It will drop the original packet if it was resent according to your postulate. If it was coalesced according to my postulate it will accept the new part of the packet, from the currently accepted point onwards.

It will accept the extra segment or total segment.

This question is too confused to answer. You need to make up your mind whether you're talking about two packets or a single coalesced packet. You're talking about both at the same time.

So, now I want to know that what will happen at the receiver side,

Will it drop the packet by just assuming duplicate?

No.

It will accept the extra("XYZ") segment

Yes.

or total("ABCXYZ") segment.(?)

No.

You need to think about this. TCP/IP works. Seriously. For 25 years at least. If any of the alternative scenarios you've posted were true it wouldn't be usable.