What are the difference between GoBackN GBN and Selective Re
What are the difference between Go-Back-N (GBN) and Selective Repeat (SR) protocols? Suppose the last packet received at the receiver is packet k and the receiver is receiving packet k + 2. What action would the receiver take? (discard or keep packet k + 4, send ACK for which packet.) Suppose the window size is N, how many timer do GBN and SR need. Is it possible that a receiver using GBN receives packet outside of its current window? Why or why not? Is it possible that a receiver using SR receives packet outside of its current window? Why or why not?
Solution
Difference Between Go-Back-N(GBN) and Selective Repeat Protocol:
A.Answer:
Recieved packet is k.
GBN:1)if n=k,then reciever take k-1.
2)if n=k+2,then reciever take k+2-1=k-1
SR:1).(k+1)/2.
2)(k+2+1)/2=(k+3)/2.
B.Answer:
GBN:N-1
SR: (N+1)/2
C.Answer:
If the sender does not receive any ACK or if the ACK is lost or damaged in between the transmission. The sender waits for the time to run out and as the time run outs, the sender retransmits all the frames for which it has not received the ACK. The sender identifies the loss of ACK with the help of a timer
The sender window size is equal to ‘w’. If the error rate is high, a lot of bandwidth is lost wasted.
D.Answer:
Reciever using RBN recieve the packets from outside of its current window:
| Go-back-N | Selective | |
| Basic | Retransmits all the frames that sent after the frame which suspects to be damaged . | Retransmits only those frames that are suspected to lost. |
| Bandwidth Utilization | its error rate is high, it wastes a lot of bandwidth. | Comparatively less bandwidth is wasted in retransmitting. |
| Complexity | Less complicated. | More complex as it require to apply extra logic and sorting and storage, at sender and receiver. |
| Window size | N-1 | <= (N+1)/2 |
| Sorting | Sorting is neither required at sender side nor at receiver side. | Receiver must be able to sort as it has to maintain the sequence of the frames. |
| Use | It more often used. | It is less in practice because of its complexity. |
