In this lab we will play with the parameters and do some coding to improve a link layer protocol. The protocol can be downloaded here.

The simulation consists of four classes

  • LinkLayer.java
  • PhysicalLayer.java
  • Frame.java
  • Simulation.java

The Simulation.java simulates the communication between two Link Layers, which each use their own Physical Layer to actually exchange messages.

One of the Link layers acts as sender, the other as receiver of a String sent in packages of 1 Byte. Each package is individually acknowledged, only after acknowledgment the next package is transmitted.

Messages can get garbled, therefore the Link Layers use a parity bit to check for errors. If a parity is wrong, no acknowledgement is sent. The sender will then receive a timeout and retransmit the package.


Your tasks are

  1. Understand the code
  2. Explain why much less than errorProb frames are retransmitted
  3. Find the optimal value for the retransmission timer
  4. Improve the protocol by transmitting more than one package (aka sliding window)
  5. Improve the protocol by introducing negative acknowledgements, that is, if the receiver notices that a message got corrupted, he notifies the sender instead of just waiting until the sender retransmit after a timeout. How big is the improvement due to NACKs? Under which circumstances would it be bigger/smaller?
  6. Bonus: Improve the error correction of the protocol, and measure how many messages you save compared with by how much you increase the message length.

Ultime modifiche: Thursday, 12 March 2015, 13:18