1
$\begingroup$

While Going through Exercise problem of " Computer Networking A Top-Down Approach" by Kurose and Ross, i encountered this problem.I am giving my approach and the point where i am stuck at.

Question

Suppose Host A sends 5 data segments to Host B, and the 2nd segment (sent from A) is lost. In the end, all 5 data segments have been correctly received by Host B.How many segments has Host A sent in total and how many ACKs has Host B sent in total for Go Back N

Given Answer

GoBackN: $A$ sends $9$ segments in total. They are initially sent segments $1, 2, 3, 4, 5 $and later resent segments $2, 3, 4, $and $5$. $B$ sends $8$ ACKs. They are $4$ ACKS with sequence number $1,$ and $4$ ACKS with sequence numbers $2, 3, 4,$ and $5.$

My Approach /Doubt

I agree with the number of transmission of data segment by Host $A$.But i have doubt regarding the Acknowledgement by Host $B$.

Why?

We know that GBN has sender side window size=$N$ while reciever side as only$1$ which is the reason that it cannot recieve Out of order packet.

Now When Host $A$ sends entire packet $1,2,3,4,5$ where $2^{nd}$ gets lost then Host $B$ which is expecting Sequence number $1$.On recieving sequence number $1$, it will send ack as $2$i.e expecting sequence number $2$.As Sequence number gets lost , host $B$ will recieve sequence $3,4,5$ for which it will discard the packet as it is not the packet it is expecting.

On recieving again sequence number $2,3,4,5$(retransmitted packet), Host $B$ will send the Acknowledgement.

Total Acknowledgement i am getting is $5$ i.e ACk no for sequence number $1,2,3,4,5$ not $8$.

Please help me out where i am wrong ??

Thanks

$\endgroup$
1
$\begingroup$

GBN is resending ACK's for the discarded packets .

Excerpt from what I can find:

The receiver's actions in GBN are also simple. If a packet with sequence number n is received correctly and is in-order (i.e., the data last delivered to the upper layer came from a packet with sequence number n-1), the receiver sends an ACK for packet n and delivers the data portion of the packet to the upper layer. In all other cases, the receiver discards the packet and resends an ACK for the most recently received in-order packet. Note that since packets are delivered one-at-a-time to the upper layer, if packet k has been received and delivered, then all packets with a sequence number lower than k have also been delivered. Thus, the use of cumulative acknowledgements is a natural choice for GBN.

$\endgroup$

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.