0% found this document useful (0 votes)
18 views

Computer Networks Assignment

The document describes tasks to implement simplified versions of the Trivial File Transfer Protocol (TFTP) using UDP and TCP. For each task, students must create a Java client and server that can transfer files while adhering to protocol specifications. Implementation and design quality will be evaluated against marking criteria.

Uploaded by

Behzad hassan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Computer Networks Assignment

The document describes tasks to implement simplified versions of the Trivial File Transfer Protocol (TFTP) using UDP and TCP. For each task, students must create a Java client and server that can transfer files while adhering to protocol specifications. Implementation and design quality will be evaluated against marking criteria.

Uploaded by

Behzad hassan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

The Trivial File Transfer Protocol (TFTP) is an Internet software utility for

transferring les that is simpler to use than the File Transfer Protocol
(FTP) but less capable. It is used where user authentication and
directory visibility are not required. For example, it is used by Cisco
routers and switches to transfer images of the operating system from/to
the devices.

NOTE: TFTP's port is 69 (a system/OS port). This is below 1024 and


therefore you cannot bind a Socket to it unless you have administrative
access rights on the machine you are working. To avoid any
complications you can use any port > 1024 to bind server sockets.

Task 1: Implementation of the Trivial File


Transfer Protocol (TFTP)
For this task you need to implement (in Java) the Trivial File Transfer
Protocol (TFTP) as speci ed in RFC 1350. You will submit source code
for a client and server application that 'speak' the TFTP protocol. You will
built your protocol on top of UDP. Compared to the speci cations in the
RFC, you will implement a slightly simpli ed version:

• Support for octet mode only. The les should be transferred as a


raw sequence of bytes. Do not read, write or transfer les as
characters.
• Support only for error handling when the server is unable to satisfy
the request because the le cannot be found.
• No support for error handling when data duplication occurs.
• The client and server applications should be simple Java console
applications. The server should operate (i.e. read and write les) in
the directory where it is started from. The server should support
simultaneous le transfers to and from multiple clients. The client
should just read command line arguments (or have a very simple
console-based menu - e.g. "press 1 to store le, press 2 to retrieve
le") and execute user commands (i.e. reading or writing a le).

Hint: the simplest way to implement timeouts is by calling the


setSoTimeout() method on the DatagramSocket objects (assuming that
you are using blocking I/O). If the timeout expires, a
java.net.SocketTimeoutException is raised, though the DatagramSocket
is still valid.
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
Task 2: Implementation of an even simpler
version of TFTP on top of TCP
For this task you will use TCP sockets to implement a protocol that
operates like TFTP (i.e. supports only read and write operations). Given
that TCP supports in-order, reliable data transport, you should not
implement the relevant mechanisms described in RFC 1350 (ACKs,
retransmissions). The client and server applications should be equally
simple, as in Task 1. The server must be able to handle multiple le
transfers.

Task 3: Interoperability with existing


implementations (5% bonus)
Given that the UDP version of TFTP client and server that you will
implement must adhere to the respective RFC, both the client and
server should be able to interoperate with other TFTP servers and
clients, respectively, regardless of the programming language they are
written. For this optional task, you are asked to demonstrate this
interoperability by running your client with an existing third-party server,
and your server with an existing third-party client.

Marking Criteria
You should make sure that your code compiles. Code which does not
compile will receive at most 20%.

I will assess your assignment using the following criteria:

TFTP-UDP-Server (35%)
• Is the server-side of the protocol fully and correctly implemented
(based on the speci cations in the RFC)? i.e. read/write requests,
fi
fi
acknowledgments, timeouts, error handling, support for
simultaneous le transfers.
TFTP-UDP-Client (30%):
• Is the client-side of the protocol fully and correctly implemented
(based on the speci cations in the RFC)? i.e. read/write requests,
acknowledgments, timeouts, error handling.
TFTP-TCP-Server (10%)
• Is the server-side of the protocol fully and correctly implemented?
i.e. read/write requests, error handling, support for simultaneous
le transfers.
TFTP-TCP-Client (10%):
• Is the client-side of the protocol fully and correctly implemented?
i.e. read/write requests, error handling.

Description of Protocols (10%):


• Is there description for both protocols and how/where the
speci cations are implemented?
• Is the description well-written with clear references to the source
code?
Other Characteristics (5%):
• Is the code commented appropriately?
• Is it indented correctly?
• Is naming of variables and methods sensible?
Interoperability (extra 5%)

• Is your implementation compatible with third-party TFTP servers


and clients and have you demonstrated that it is?
Note that the maximum mark you can get is 100% and the extra 5% will
be added to the mark to reach up to 100%.

Submission Guidelines
You should submit the coursework by the deadline posted on Sussex
Direct (and the submission link on Canvas). Standard penalties for late
submissions will apply. You will need to submit a .zip le containing the
following:
• Well-formatted and well-documented source code (written in Java)
in 4 separate IntelliJ maven projects that can be compiled and run.
The IntelliJ projects, named TFTP-UDP-Server, TFTP-UDP-Client,
TFTP-TCP-Server and TFTP-TCP-Client, respectively, will include
fi
fi
fi
fi
fi
all required source code to execute the 2 different le transfer
protocols.
• A short report (up to 2000 words) describing your protocols, the
source code and the design decisions that you made.
• Screenshots and details about third-party TFTP clients and servers
you used to demonstrate interoperability of your implementation
(optionally for the extra 5%).

Please do not put your names on your submissions, but do include your
candidate number. Failure to submit source code, as described in the
rst bullet, will result to a zero mark as I will not be able to assess your
programming effort.
fi
fi

You might also like