Network Layer

Stop and Wait:

 In Stop and Wait flow control, once the sender send a data packet, the sender waits for the acknowledgement to be received from receiver side to send the next data packets, Then the next packet will be sent to receiver side.

Sender:

  • Send only one packet at a time.
  • The next packet will send after receiving of acknowledgement.

Receiver:

  • Receiver will send acknowledgement after receiving packet.

 

Stop and Wait

Problems:

1) Lost Data 

Stop and Wait
2) Lost ACK
Stop and Wait
Advantages:
  • The stop and loss protocols are easy to implement.
Disadvantages:
  • If the loss of data occurs the senders  will wait for acknowledgement for infinite amount of time.
  • If the sender Lost acknowledgement in between route then waiting period will be infinite.

Stop and wait ARQ:

ARQ Means Automatic Repeat Request, If the above three problems are resolved by stop and wait for ARQ  that does both error control and flow control.

Time out:

Once the data send from sender side, there will be a time bound to receive that knowledgement. If the acknowledgement not received then the data will be send again with the sequence number.

Stop and Wait

Sequence Number: 

Stop and Wait ARQ

Working of stop and wait for ARQ:

 

  • The sender will send a data packet with sequence number 0.
  • Receiver after receiving the date of packet sends and acknowledgement with sequence number 1.(the sequence number of the next expected data packet)
  • There is only one bit sequence number that implies that both sender and receiver have a buffer for One Frame or packet only.
Stop and Wait ARQ
Working of stop-and-wait protocol:
suppose we have a sender and we have a receiver, if sender is sending one frame or a data packet the sender will not send the next data packet of the frame, before receiving an acknowledgment. If that knowledge but is received on time it will send the next data packet.
Suppose if that acknowledgement not received on time, the timer of the send goes out. and it retransmits the previous data packet or the frame and it expects an acknowledgment, if that knowledge mode is on time no problem it sends the next data packet otherwise the same process is continued.
Advantages:
  • Can implement easily.
  • It can detect errors..
  • It can be reliable and flow control
Diadvantages of stop and wait ARQ:
  • Low efficiency as the sender wait for an acknowledgement.
  • High latency: Stop and wait ARQ has a latency. as wait for the acknowledgement to receive.