You are on page 1of 2

Project 3

A Link Layer Reliable data delivery: (Implementation of Stop and Wait


protocol with ARP over UDP).
_______________________________________________________
In this project, you will be implementing Stop-and-Wait ARP protocol over UDP in
which a Sender will send a file reliably to the Receiver.
Sending a file reliably means that the Receiver receives the contents of the file
without any loss or damage and in the same order as it were sent.
Since you will be running both Sender and Receiver on the localhost, there is all
most no chance of a frame being lost or damaged, so you have to simulate the
situation in which a frame is either lost or damaged in the Sender class(see the
errType below).
You will implement error detection by using CRC checksum.
You will be using CRC-16 generator polynomial (X16 + X15 + X2 + 1) for the
computation of CRC checksum.
Format of the Frame for this project:
01111110

Kind

Seq

Ack/Nack

1 byte flag

1 byte

1 byte

1 byte

Data

CRC-16
Checksum

8 bytes

01111110
1 byte flag

2 bytes

Where,
Preamble

01111110

kind
seq
Ack/Nack

variable of type FrameKind identifies the type of frame (control or data frame)-not used
the sequence number of this frame
sequence number of frame to acknowledge a negaive value for Nack
the data

data

Your project should be executed in the following format:

>java DLLSim <errType> <srcFile> <destFile>

where,
errType : is an integer used by the Sender to emulate lost or damage frame
0 - Perfect (no loss, no errors)
1 - Lossy (second frame in the sequence is lost)
2 - Noisy (first six bits of the first data byte are damaged in the second frame)
srcFile : the text file from which the sender reads
source LogFile: Whenever a frame is sent, its sequence number should be recorded in srcLogFile.txt.
Note that if a frame did not get actually sent due to frame loss emulation, its
sequence number still needs to be recorded.
destFile : the text file to which the receiver writes the data it receives from the sender
dest LogFile : the file logs the sequence number s of all the frames that are acknowledged.
In addition to the above files, Sender and Receiver should also generate the following files.

Generated
by the
Receiver

source LogFile: Whenever a frame is sent, its sequence number should be recorded in srcLogFile.txt.
Note that if a frame did not get actually sent due to frame loss emulation, its
sequence number still needs to be recorded.
dest LogFile : the file logs the sequence number s of all the frames that are acknowledged.
receiver.log : in which it records all the sequence numbers including the duplicates.
As usual ,you must demo your project in the class(bring in a hard copy of your source code + screen
shot)) and submit a zip file containing the source code, log files, screen shot, and a write up file
describing your implementation.
Format of the log files:
Seq #

Data

CRC checksum

comments

You might also like