| CS 455/555 - Intro to Networks and Communication
Spring 2011: Tues/Thurs 9:30-10:45am, Spong 108 |
|
Staff
|
Program 4: Alternating Bit Reliable TransportAssigned: Thursday, April 7, 2011 DescriptionThe goal of this assignment is to implement the alternating bit reliable transport protocol that you designed in your last homework assignment. Remember that this is based off of the RDT 3.0 reliable transport protocol from Chapter 3. You will implement both a sender and a receiver. Sender
Receiver
Rules
TestingA large part of your program's grade will be determined by how well it handles a set of inputs. You should test your program rigorously before submitting. Because your programs will be run and tested using a script, you must format your output exactly as I have described or you will lose points. Example 1 antares> java AbrtReceiver
Usage: java AbrtReceiver port delay lossRate [seed]
port - listening port (10001-11000)
delay - avg delay (ms)
lossRate - loss percentage [0-1]
seed - RNG seed (optional)
vega> java AbrtSender
Usage: java AbrtSender host port msgs
host - receiver hostname
port - receiver port (10001-11000)
msgs - number of unique messages to send
Example 2 antares> java AbrtReceiver 10005 4 40 ERR - arg 3 Example 3 antares> java AbrtReceiver 10005 500 0.1 7777 RECV: 0 0 4 SENT: ACK 0 - delayed 425 ms RECV: 1 1 4 SENT: ACK 1 - not sent RECV: 1 1 4 SENT: ACK 1 - delayed 577 ms RECV: 0 2 4 SENT: ACK 0 - delayed 701 ms RECV: 1 3 4 SENT: ACK 1 - delayed 872 ms vega> java AbrtSender antares 10005 4 SENT: 0 0 4 RECV: ACK 0 SENT: 1 1 4 - timeout SENT: 1 1 4 RECV: ACK 1 SENT: 0 2 4 RECV: ACK 0 SENT: 1 3 4 RECV: ACK 1 Note: The packets dropped and the amount of delays should be exactly as in this example since a seed was specified on the command-line.
Example 4 antares> java AbrtReceiver 10005 150 0.2 7890 RECV: 0 0 4 SENT: ACK 0 - not sent RECV: 0 0 4 SENT: ACK 0 - not sent RECV: 0 0 4 SENT: ACK 0 - delayed 197 ms RECV: 1 1 4 SENT: ACK 1 - delayed 131 ms RECV: 0 2 4 SENT: ACK 0 - not sent RECV: 0 2 4 SENT: ACK 0 - delayed 270 ms RECV: 1 3 4 SENT: ACK 1 - delayed 145 ms vega> java AbrtSender antares 10005 4 SENT: 0 0 4 - timeout SENT: 0 0 4 - timeout SENT: 0 0 4 RECV: ACK 0 SENT: 1 1 4 RECV: ACK 1 SENT: 0 2 4 - timeout SENT: 0 2 4 RECV: ACK 0 SENT: 1 3 4 RECV: ACK 1 Example 5 I'm not giving the results here, but try this:
It should produce two premature timeouts in a row (on data 1 and the retransmission of data 1) by delaying the ACKs by 1000ms and 1266ms. Convince yourself that the operation of your program is correct. SubmissionYou must name your source files AbrtSender.java and AbrtReceiver.java (note the capitalization). Make sure that you submit all files necessary to compile your program. But, do not submit compiled files (.class files). Directions for submitting your assignment through Blackboard |