Question

In: Computer Science

Consider a scenario where Host A and Host B want to send messages to Host C....

Consider a scenario where Host A and Host B want to send messages to Host C. Hosts A and C are connected by a channel that can lose and corrupt (but not reorder) messages. Hosts B and C are connected by another channel (independent of the channel connecting A and C) with the same properties. The transport layer at Host C should alternately deliver M (M>1) consecutive messages received from A to its application layer and N (N>1) consecutive messages received from B to its application layer, i.e., M messages from A, N messages from B, M messages from A, N messages from B, and so on.

Design a NAK-free stop-and-wait protocol to achieve reliable data transfer from A and B to C, by giving FSM descriptions of the protocols at A and C. (The FSM for B is essentially the same as that for A except the number of messages, and hence you do not need to provide B’s FSM.) Notes: (1) If you use variables and procedure calls other than those defined in Chapter 3.4 of the textbook, clearly describe their functions. (2) You can use the following mechanisms: checksum, sequence numbers (you need a larger sequence number range than just 0 and 1), ACKs (but not NAKs), timer and sender retransmission. (3) Recall we do not consider buffering of received packets in a stop-and-wait RDT protocol.

Solutions

Expert Solution

Stop-and-wait like error-control protocol:

  1. While transmitting a message through the channel,a message can be lost in Stop-and-wait like error-control protocol.
  2. It is required to use the sequence numbers of the packets, to detect and re-transmit the lost packets.
  3. In this protocol, it is also possible that the sender sends the lost messages repeatedly that are received by the receiver.

Flow of the Sender FSM:

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

  1. Initialize the session and the sequence number should be started with 0.

  2. Build the packet with the sequence number and data .

  3. Start the timer and broadcast the packet with hosts in the channel.

  4. Wait for the acknowledgement.

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

Flow of the Receivers FSM:

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

  1. Initialize the session and the acknowledgement number should be started with 0.
  2. Wait for the uncorrupted data packet to be recieved from all hosts with sequence number same as the acknowledgement number.
  3. If a packet’s sequence number received does not match with the acknowledgement number, then the acknowledgement is lost and the packet should be made with acknowledgement number 1.
  4. If packet’s sequence number received matches with the acknowledgement number, then send the acknowledgement number to the sender.
  5. Extract and process the data packet.

Related Solutions

Suppose Host A wants to send a large file to Host B. The path from Host...
Suppose Host A wants to send a large file to Host B. The path from Host A to Host B has three links, of rates R1 = 200 kbps, R2 = 2 Mbps, and R3 = 1 Mbps. Assuming no other traffic in the network, what is the average throughput for the file transfer? Suppose the file is 4 million bytes, on average, how long will it take to transfer the file to Host B? Repeat (a) and (b), but...
In an organization there are four Hosts (i.e. Host A, Host B, Host C and Host...
In an organization there are four Hosts (i.e. Host A, Host B, Host C and Host D) connected to a Router (i.e. Router0). Explain in your own words (a) what happens when each of the four Hosts send a broadcast (b) How many broadcast domains are on the Router0? (c) If the Router (i.e. Router0) is replaced by a hub, how many broadcast domains are on the hub? (d) If the Router (i.e. Router0) is replaced by a switch, how...
Host A wants to send 15 frames to Host B using Selective repeat protocol. How many...
Host A wants to send 15 frames to Host B using Selective repeat protocol. How many numbers of frames are transmitted by Host A if every 8th packet is lost or corrupted? Also compare the number of number of transmissions of Selective Repeat with Go Back 3.
You and a friend are using the C(7,4) Hamming code to send some 4-bit messages to...
You and a friend are using the C(7,4) Hamming code to send some 4-bit messages to each other. (a) You encode the message 1010 and send the encoded 7-bit sequence to your friend, who receives 1011011. How many errors were introduced during transmission? (b) You subsequently receive the encoded sequence 0111011 from your friend. Assuming at most one error, what is the 4-bit message that your friend sent?
a. In an IPv4 environment, if a host on a LAN is about to send an...
a. In an IPv4 environment, if a host on a LAN is about to send an IP packet to another host on the same LAN, how does it know the MAC address of the interface card of the destination host? What is the protocol which is used to obtain the MAC address? b. If a host is moved to another LAN, connected to a different router, will its MAC address be the same? Explain why.
Consider sending a large file of F bits from Host A to Host B. There are...
Consider sending a large file of F bits from Host A to Host B. There are three links (and two switches) between A and B, and the links are uncongested (that is, no queuing delays). Host A segments the file into segments of S bits each and adds 80 bits of header to each segment, forming packets of L=80+ S bits. Each link has a transmission rate of R bps. Find the value of S that minimizes the delay of...
Consider sending a large file of F bits from Host A to Host B. There are...
Consider sending a large file of F bits from Host A to Host B. There are three links (and two switches) between A and B, and the links are uncongested (that is, no queuing delays). Host A segments the file into segments of S bits each and adds 80 bits of header to each segment, forming packets of L=80+ S bits. Each link has a transmission rate of R bps. The link propagation delay, let's call it d, was not...
How long does it take to send a 15 MiB file from Host A to Host...
How long does it take to send a 15 MiB file from Host A to Host B over a circuit-switched network, assuming: - Total link transmission rate = 49.7 Gbps. - Network is FDM, with 7 permitted users, each with an equal bandwidth share. - A link connection requires a setup time of 84.5 ms. Your answer should be in miliseconds (ms) with one decimal place, and without the unit (e.g. "140.6" without the quotes)
Think of a scenario where you'd want to know if the graph that represents that scenario...
Think of a scenario where you'd want to know if the graph that represents that scenario has an Euler Path, Euler Circuit or neither?
Suppose there are 5 links between sending host A and receiving host B, where each link...
Suppose there are 5 links between sending host A and receiving host B, where each link has the same transmission rate R. What is the end-to-end delay of sending 10 packets of length L from A to B? (Ignore propagation delay and nodal processing delay). Assume there are no other packets on the network.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT