SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
James F. Kurose, Keith W. Ross
Chapter:
Transport Layer
Exercise:
Problems
Question:19 | ISBN:9780132856201 | Edition: 6

Question

Consider a scenario in which Host A wants to simultaneously send packets to Hosts B and C. A is connected to B and C via a broadcast channel—a packet sent by A is carried by the channel to both B and C. Suppose that the broad- cast channel connecting A, B, and C can independently lose and corrupt packets (and so, for example, a packet sent from A might be correctly received by B, but not by C). Design a stop-and-wait-like error-control protocol for reliably transferring packets from A to B and C, such that A will not get new data from the upper layer until it knows that both B and C have correctly received the current packet. Give FSM descriptions of A and C. (Hint: The FSM for B should be essentially the same as for C.) Also, give a description of the packet format(s) used.

TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

Answer

Description of Stop-and-wait like error-control protocol:

  • While transmitting the message over the channel, the message may be lost in Stop-and-wait like error-control protocol.

  • It is required to use the sequence numbers for the packets, to detect and retransmit the lost packets.

  • In this protocol, it is also possible that the sender sends the lost messages again and again that are received by the receiver.



Following is the Finite State Machines (FSM) of sender and receiver:


FSM of the sender:


FSM of the receiver B:




FSM of the receiver C:



Sender to Receiver data packet format:


Seqnum

data


Receiver to Sender acknowledgement format:


Acknum

B|C


Flow of the Sender FSM:


The data in the sender FSM (Finite state machine) changes the states as follows:

  • Initialize the session and start the sequence number with 0.

  • Build the packet with data and sequence number.

  • Start the timer and broadcast the packet to hosts in the channel.

  • Wait for some time for acknowledgement.

  • If acknowledgement is not received in sepecified time, then broadcast the packet to all hosts in the channel.


Flow of the Receivers FSM:


The acknowledgement in the receiver FSM (Finite state machine) changes the states as follows:

  • Initialize the session and start the acknowledgement number with 0.

  • Wait to receive the uncorrupted data packet from all hosts with sequence number same as acknowledgement number.

  • If packet’s sequence number received do not match with the acknowledgement number, then lose the acknowledgement and make the packet with acknowledgement number 1.

  • If packet’s sequence number received match with the acknowledgement number, send acknowledgement number to the sender.

  • Extract and process the data packet.



0 0

Discussions

Post the discussion to improve the above solution.