Search for question
Question

IN2011 Computer Networks: Coursework 1 This coursework assesses your ability to use what you have learnt about networking to build functioning software that interacts with network services. This includes the following: • Understanding the IP network layer and TCP transport layer. • Being able to read and understand the specification of a application layer protocol. • Using Java to implement the application layer protocol. • Use cryptographic hashes. Because this is a second year unit, we will assume that you have the following skills from the first year: • Can write Java programs up to a few hundred lines long. • Be able to test your software so that it is robust against a range of inputs and errors. • Be able to build and run your software on a variety of different operating systems and configurations. • Understand what a hash table is and how they are used. • Understand how a number or a string of bytes can be represented using hexadecimal. • Perform bit-wise comparisons on arrays of bytes. You will not get marks for these but you need to know them to do this course- work. If you do not feel confident about these please revise your notes from last year and talk to the staff running your practical sessions or your personal tutor. 1 1 Tasks Download the 2D#4 RFC and read it carefully. • Download the starting git repository, unzip it and carefully read the code. • Complete TemporaryNode.java so that it can: - Act as a temporary node as described in the RFC. Connect to the 2D#4 network using the name and address of a starting node. Search the network to find the full node with a hashID closest to a given hashID. Can store a (key, value) pair in the network. Given a key, can find the value from the network. • Complete FullNode.java so that it can: - Act as a full node as described in the RFC. Connect to the 2D#4 network using the name and address of a starting node and notify other full nodes of its address. Handle inbound connections. Handle all requests and respond appropriately, including storing (key, value) pairs Build and maintain a network map. • Submit a zip file containing: 1. Your version of the git repository including the two classes you have to implement. Do not include class or binary files. If you have create any other objects or project files that are needed to build and run your submission these must be included. It must be able to be built and run on the course virtual lab machine. 2. A README.txt file that gives: - - All of the instructions needed to build and run your objects. Which functionality you think is complete and working. 3. A Wireshark recording of your code working and interacting with the test network. 2 2 Mark Scheme This is individual coursework. The programs that you submit must be your work. You must not use generate AI tools to create the code for you. You must not share your code with other students. You must not make your code available to other students such as by making it a publicly accessible github repository. When using the test network, your code may interact with other student's programs. This is acceptable as a form of testing. Part of the assessment of your two objects will be automated. Your objects will be used in a larger system. For this it is vital that you: ● Submit Java files that build on the course virtual lab machines. • Test your code so that it does not crash. • Do not alter any of the code marked as DO NOT EDIT. This is your responsibility and you will loose marks if you do not do so! Submissions will be marked out of a total of 50. Marks will be awarded for the following: Temporary Node.java • Connect to the 2D#4 network (3) ● Find the full node with the hashID closest to the given hashID (3) • Store a (key, value) pair correctly handling all responses (3) • Given a key, find the value from the network (3) FullNode.java ● Connect to the 2D#4 network and notify other full nodes of your address (1) • Accepting incoming connections (3) • Respond to ECHO? correctly (1) • Respond to PUT? correctly (3) • Respond to GET? correctly (3) • Passive mapping of the network (3) • Respond to NEAREST? correctly (3) • Active mapping of the network (3) node's 3 Wireshark Does your recording show all of the features working correctly (5) Robustness and Quality A final (13) marks will be awarded for code quality and robustness. This includes handling of error conditions, network faults and protocol errors. 3 Deadline Sunday March 24th 2024 17:00 Wednesday April 3rd 2024 23:00 4 4 Hints • There will be a number of nodes running on the virtual lab network. Use these to test that your code works and to record your program working. • When understanding the RFC, you can use netcat to interact with the nodes running on the test lab. If you don't know how to start then see if you can try to do what TemporaryNode.java and FullNode.java need to do by hand using netcat. Once you understand the protocol it should be straight-forward to write the code. • There are three testing programs which show how the objects you are creating can be used. You don't have to use these but they may make your testing easier. • You can also use netcat to send the contents of a file via a TCP connection which allows you to automate testing to some degree. • The course virtual lab machines has a command sha256sum which allows you to compute the SHA-256 sum of any file. 5