CSEE 4119: Computer Networks, Spring 2014

Similar documents
EE122 Fall 2013 Project 1 - Routing Protocols Due: October 10, 2013, 11:59:59 PM

COMP 3331/9331: Computer Networks & Applications Programming Assignment 2 for Session 1, 2016

C13b: Routing Problem and Algorithms

RIP Commands. output-delay, page 32 passive-interface (RIP), page 33 poison-reverse, page 35 receive version, page 37 redistribute (RIP), page 39

Important Project Dates

COMP/ELEC 429/556 Project 2: Reliable File Transfer Protocol

New York University Computer Science Department Courant Institute of Mathematical Sciences

UNIT 2 ROUTING ALGORITHMS

Fall CSEE W4119 Computer Networks Programming Assignment 1 - Simple Chat Application

CS 344/444 Spring 2008 Project 2 A simple P2P file sharing system April 3, 2008 V0.2

Computer Networks. Routing Algorithms

Programming Standards: You must conform to good programming/documentation standards. Some specifics:

CS3114 (Fall 2013) PROGRAMMING ASSIGNMENT #2 Due Tuesday, October 11:00 PM for 100 points Due Monday, October 11:00 PM for 10 point bonus

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences

Fishnet Assignment 1: Distance Vector Routing Due: May 13, 2002.

PLEASE READ CAREFULLY BEFORE YOU START

5.2 Routing Algorithms

Comparative Study of Routing Protocols Convergence using OPNET Chapter Three: Simulation & Configuration

CSCI544, Fall 2016: Assignment 2

SWITCHING, FORWARDING, AND ROUTING

CSCi 4061: Intro to Operating Systems Spring 2017 Instructor: Jon Weissman Assignment 1: Simple Make Due: Feb. 15, 11:55 pm

Process groups and message ordering

II. Principles of Computer Communications Network and Transport Layer

TDC 363 Introduction to LANs

Protocol Specification Version 1.0 Shreyas Dube Smita Singhaniya Piyush Goswami Sowmya MD. Protocol Specification

COM-208: Computer Networks - Homework 6

COMP 3331/9331: Computer Networks & Applications. Programming Assignment 2: Link State Routing

Data Networks Project 3: Implementing Intra-Domain Routing Protocols

Project 2 Reliable Transport

(Refer Slide Time: 01:08 to 01:25min)

Teldat Router. RIP Protocol

Note: This is a miniassignment and the grading is automated. If you do not submit it correctly, you will receive at most half credit.

Department of Computer Science and Engineering. Final Examination. Instructor: N. Vlajic Date: April 15, 2011

Network Layer: Routing

Basic Idea. Routing. Example. Routing by the Network

CS 455/655 Computer Networks Fall Programming Assignment 1: Implementing a Social Media App Due: Thursday, October 5 th, 2017 (1pm)

3. When you process a largest recent earthquake query, you should print out:

Chapter 22 Network Layer: Delivery, Forwarding, and Routing 22.1

Routing by the Network

Distance vector and RIP

CSCI544, Fall 2016: Assignment 1

Project 3 - Routers, Protocols and Firewalls

CSCI4211: Introduction to Computer Networks Fall 2017 Homework Assignment 2

The print queue was too long. The print queue is always too long shortly before assignments are due. Print your documentation

Outline. Routing. Introduction to Wide Area Routing. Classification of Routing Algorithms. Introduction. Broadcasting and Multicasting

ICS 351: Today's plan. netmask exercises network and subnetwork design dynamic routing RIP distance-vector routing

Project #2: FishNet Distance Vector Routing

15-441: Computer Networks, Fall 2012 Project 2: Distributed HTTP

Routing Information Protocol. A simple distance vector scheme

===================================================================== Exercises =====================================================================

CS164 Final Exam Winter 2013

CS 447 : Networks and Data Communications Programming Assignment #02 Total Points: 150

Fall CSEE W4119 Computer Networks Programming Assignment 1 - Simple Online Bidding System

Homework 1: Programming Component Routing Packets Within a Structured Peer-to-Peer (P2P) Network Overlay VERSION 1.1

CS244a: An Introduction to Computer Networks

Network Routing - II Failures, Recovery, and Change

Hierarchical Routing. Our routing study thus far - idealization all routers identical network flat not true in practice

CSCE 463/612 Networks and Distributed Processing Spring 2018

Intra-domain Routing

Programming Assignment 1

Default & Static Routes and Routing Information Protocol. Presented by : Mohammed Hamad

Mobile Computing Professor Pushpendra Singh Indraprastha Institute of Information Technology Delhi Java Basics Lecture 02

Lecture 13: Routing in multihop wireless networks. Mythili Vutukuru CS 653 Spring 2014 March 3, Monday

Computer Networking. Intra-Domain Routing. RIP (Routing Information Protocol) & OSPF (Open Shortest Path First)

Homework 3 CSC/ECE , Fall, 2016

"In-Class" Assignment-"WINDOWS 7/OWA"

CS 6353 Compiler Construction Project Assignments

Important Project Dates

Introduction to Intra-Domain Routing

Network Layer (Routing)

Project #1 rev 2 Computer Science 2334 Fall 2013 This project is individual work. Each student must complete this assignment independently.

Additional Guidelines and Suggestions for Project Milestone 1 CS161 Computer Security, Spring 2008

CMPE 180A Data Structures and Algorithms in C++ Spring 2018

Tips from the experts: How to waste a lot of time on this assignment

Routing Protocols. The routers in an internet are responsible for receiving and. forwarding IP datagrams through the interconnected set of

The Interconnection Structure of. The Internet. EECC694 - Shaaban

CS4450. Computer Networks: Architecture and Protocols. Lecture 11 Rou+ng: Deep Dive. Spring 2018 Rachit Agarwal

Programming Assignment 1

Duke University CompSci 356 Midterm Spring 2016

ASM. Engineering Workshops

Determining IP Routes. 2000, Cisco Systems, Inc. 9-1

CIS 505: Software Systems

CS 640 Introduction to Computer Networks Spring 2009

Tips from the experts: How to waste a lot of time on this assignment

Token Ring VLANs and Related Protocols

COMP 3500 Introduction to Operating Systems Project 5 Virtual Memory Manager

Networked Systems (SAMPLE QUESTIONS), COMPGZ01, May 2016

ICMP, ARP, RARP, IGMP

CpSc 1111 Lab 9 2-D Arrays

Programming Assignment 3

ipv6 mobile home-agent (global configuration)

Homework 2: Programming Component SCALABLE SERVER DESIGN: USING THREAD POOLS TO MANAGE AND LOAD BALANCE ACTIVE NETWORK

Routing in packet-switching networks

CSE 123: Computer Networks

CS557 Spring 2013 Midterm Exam

ECE 461 Internetworking Fall Quiz 1

Lab 2: Threads and Processes

CSC 634: Networks Programming

CS 170 Spring 2000 Solutions and grading standards for exam 1 Clancy

Question A B C D E F Points / 28 / 16 / 21 / 15 / 18 / 2

Transcription:

CSEE 4119: Computer Networks, Spring 2014 Programming Assignment 2: Reliable transmission and routing Due Thursday, May 8 th 11:55 pm P. Prakash, W. An, P. Nirantar, R. Yu, X. Zhu (TAs), A. Chaintreau (instructor) Academic Honesty Policy You are permitted and encouraged to help each other through Piazza's web board. This only means that you can discuss and understand concepts learnt in class. However, you may NOT share source code or hardcopies of source code. Refrain from sharing any material that could cause your source code to APPEAR TO BE similar to another student's source code enrolled in this or previous years. Refrain from getting any code off the internet. Cheating will be dealt with severely. Cheaters will be penalized. Source code should be yours and yours only. Do not cheat. 1. Introduction In this programming assignment, you will implement the Bellman Ford routing algorithm over a distributed system. The algorithm will operate using a set of distributed client processes. Clients are identified by an <IP address, Port> tuple. Also, each client maintains a routing table which records the weight of the path between itself and the other clients in the network. Each client process should read the following from its configuration file for the initial setup. Information about self localport, timeout Information about neighbors IP address, port and link costs (weights) Each client maintains a distance vector and exchanges distance vector information with its neighbors using ROUTE UPDATE messages. On a high-level, you will be doing the following. In the first part of the assignment, you will focus on building the routing table. Your program should support the some commands for changing the network configuration dynamically. These commands are explained in detaill under Section 2c.

In the second part, you will implement a P2P like file transfer mechanism. We ask you to first split an image file into two chunks randomly and then send them from any two nodes to a destination node using the routing table you built in the first part. In the destination node, you will combine the two chunks to get the original file and print out the two paths. 2. Specifications a. You should write your program in one of the following languages C/C++ Java Python b. You should write a client routing program. Each client process gets as input the following. o o o the set of neighbors the link costs to these neighbors a timeout value Each client has a read-only UDP socket on which it listens for incoming distance vector messages. This port number is known to its neighbors. Each client maintains a distance vector which is a list of <destination, cost> tuples (one tuple per client). Here, the cost refers to the current estimate of the total link cost of the shortest path to the other client. Clients exchange distance vector information using a ROUTE UPDATE message, i.e., each client uses this message to send a copy of its current distance vector to its neighbors. Each client uses a set of write only sockets to send these distance vectors to its neighbors. The clients wait on their sockets until their distance vector changes or until TIMEOUT seconds pass, whichever occurs sooner, and then transmit their distance vectors to all neighbors. c. Each client also provides a command line interface to the user. Five types of commands are required to be supported. LINKDOWN {ip_address port } This allows the user to destroy an existing link, i.e., change the link cost to infinity for the mentioned neighbor.

LINKUP {ip_address port weight}. This allows the user to restore a link to the mentioned neighbor with the given weight after it was destroyed by a LINKDOWN. SHOWRT This allows the user to view the current routing table of the client. In other words, this command should print, for each client in the network, the cost and neighbor (next hop) in the path to reach that client. CLOSE With this command the client process should close/shutdown. Link failures is also assumed when a client does not receive a ROUTE UPDATE message from a neighbor (i.e., hasn t heard from a neighbor) for 3*TIMEOUT seconds. This happens when the neighbor client crashes or if the user isuues the CLOSE command on it. When this happens, the link cost should be set to infinity and the client should stop sending ROUTE UPDATE messages to that neighbor. The link is assumed to be dead until the client comes up and a ROUTE UPDATE message is received from it again. TRANSFER {destination_ip_address port} This is essentially the second part of the assignment. With this command, you should print out the next node (i.e., next hop) in the path to the destination mentioned and start the file transfer. Note that the destination may not be this client s neighbour. It can be assumed that the destination is in the network and that this command will be called only after all the Distance Vectors have converged. Please refer to Section 3 for more details on this. d. Client Interface A client process receives command-line arguments as follows: %>./bfclient config-file where: bfclient is the name of the local process (your executable). config-file is a text file. Each client has its own config file that is formatted as follows: localport timeout file_chunk_to_transfer file_sequence_number ipaddress1:port1 weight1 [ipaddress2:port2 weight2] [...]

where: localport (first line) is the local port number that the process should listen to (this is used to distinguish multiple clients on the same machine). timeout (first line) specifies the inter-transmission time of ROUTE UPDATE messages in steady state. It is specified in seconds. The first line of the file may also have the arguments - file_chunk_to_transfer and file_sequence_number which is used for file transmissions. Please note that these arguments are only present in the config files that belong to source nodes. See section 3 for details. The remaining part of the file consists of lines of triples (at least one) indicating incident links to neighbors. Each triple consists of the following ipaddress: the IP address of the neighbor (in dotted decimal notation) port: the port number on which the neighbor is listening weight: a real number indicating the cost of the link An example of a configuration file of a client listening on port 12345 with timeout 30 seconds, having neighbours 192.168.2.2:54321 and 192.168.2.10:53241 with weights 10.5 and 15 respectively and transfering file.jpg which is the second chunk is as follows. 12345 30 file.jpg 2 92.168.2.2:54321 10.5 192.168.2.10:53241 15 e. Poison Reverse You should implement Poison Reverse in your routing algorithm. This means that if client A has to go through client B to get access to client C, in the distance vector A sends to B, the cost AC is infinity. Here is a simple example of the routing algorithm:

The IP and port tuples are: 128.59.196.2:20000 (A) 128.59.196.3:20001 (B) 128.59.196.4:20002 (C) 128.59.15.48:20003 (D) 128.59.196.3:20004 (E) For node A, when the routing table converges, SHOWRT command should print the following. Destination = 128.59.196.3:20001, Cost = 1.0, Link = (128.59.196.2:20000) Destination = 128.59.196.4:20002, Cost = 4.0, Link = (128.59.15.48:20003) Destination = 128.59.15.48:20003, Cost = 2.0, Link = (128.59.196.4:20000) Destination = 128.59.196.3:20004, Cost = 6.0, Link = (128.59.15.48:20003) 3. Specifications for File Transmission The assignment has some aspects of distributed P2P file transfer. Here, the objective is to send data from one client to another using the routing table you built before. To make it interesting, we ask you to randomly split an image file into two chunks and send each split chunk of the file from any two nodes (called sources hereafter) in the topology to a destination node in the topology using the routing table. File splitting can be simply done by yourself with split -b command, or you can use file chunk1 and chunk2 from our wiki site. Concatenating the two chunks by yourself by calling cat chunk1 chunk2 > output (giving you the original file). Our example is a.jpg image of Internet map. The goals here are as follows. Upon receiving each chunk of the file, the destination prints out the path traversed by that chunk of the file in the network, the timestamp and the size of the chunk. Upon receiving both the chunks of the file, the destination combines these and forms the original file that you split before. Write it to a file named output.

A simple example is as follows. Suppose you have a text file that has been split into two chunks, chunk 1: "abc" chunk 2: "de" After the receiver receives both chunks correctly it should have "abcde" (without quotes) Here are the assumptions you can make: This part will be tested only after the routing table has converged and the network is stable. A route from each source to the destination exists. Each source is aware of which sequence number it sends. All chunks are smaller than 2MB The maximum number of hops is 20 The node without a chunk to send can simply ignore the filename and sequence number in its config file. To test this, following command will be issued from the source nodes: %>TRANSFER <DESTINATION_IP> <DESTINATION_PORT_NUMBER> You will need to specify the chunk name and sequence number in the config file as explained earlier. For extra credit, you can make this generic (i.e. more than two chunks) and add some innovative ideas. Make sure you document this in your README. 4. Example Consider a client with the following config file (config.txt): 20000 3 file.jpg 2 128.59.196.2:20000 4.1 128.59.196.2:20001 5.2 128.59.196.4:20000 3 An example of the user interface is as follows: %>./bfclient config.txt

%>SHOWRT <Current Time>Distance vector list is: Destination = 128.59.196.2:20000, Cost = 4.1, Link = (128.59.196.2:20000) Destination = 128.59.196.2:20001, Cost = 5.2, Link = (128.59.196.2:20001) Destination = 128.59.196.4:20000, Cost = 3.0, Link = (128.59.196.4:20000) (After sometime, new nodes may be added as they are discovered) %>SHOWRT <Current Time> Distance vector list is: Destination = 128.59.196.2:20000, Cost = 4.1, Link = (128.59.196.2:20000) Destination = 128.59.196.2:20001, Cost = 4.8, Link = (128.59.196.2:20000) Destination = 128.59.196.4:20000, Cost = 3.0, Link = (128.59.196.4:20000) Destination = 128.59.15.48:20000, Cost = 7.0, Link = (128.59.196.4:20000) Destination = 128.59.15.41:20000, Cost = 5.2, Link = (128.59.196.2:20000) Break a link %>LINKDOWN 128.59.196.2 20000 The link cost to this neighbor should be set to infinity. The distance vector needs to be updated and a LINK DOWN message has to be sent to the neighbors. On receipt of a LINK DOWN message, a client should set the link cost to the sender as infinity. The two nodes are not neighbors till the link is restored (by a LINK UP message) and stop exchanging ROUTE UPDATE messages. %>LINKUP 128.59.196.2:20000 5 The link cost should now be restored to the original value. The distance vector needs to be updated and a LINK UP message is sent to the neighbor. On receipt of a LINK UP message, a client should restore the link cost to the sender to the mentioned weight. The two nodes are now neighbors again and should resume exchanging ROUTE UPDATE messages. %>TRANSFER 128.59.15.48 20000 file.jpg chunk 2 transferred to next hop 128.59.196.4: 20000

Upon receiving this command, the client should transfer the file (file.jpg chunk 2) to the next hop 128.59.196.4. 128.59.196.4 should be told the destination 128.59.15.48:20000 as well as the chunk sequence number via your own protocol. The next hop in turn transfers the received file chunk to its next hop and so on till the destination receives the chunk. 4. Requirements and Tips For the routing part: The clients should not do busy waiting while listening on its socket. The clients should be able to adjust to dynamic networks i.e. new nodes joining and existing nodes leaving the network. When a new node enters the network, its neighbors should also add it to their list of neighbors when they receive the first ROUTE UPDATE from it. They should use their distance from it as the link cost (picked from the first ROUTE UPDATE message they receive from the new neighbor). When the CLOSE command is issued, it is like simulating link failure of all the links to that client since the process exits and its neighbors don t receive ROUTE UPDATE messages for more than 3*TIMEOUT. (It is the same as hitting CTR-C). You do nott need to worry about the counting to infinity problem that is not addressed by Poison Reverse. Use of the select() is highly recommended. The protocol messages should be compact. Avoid containing redundant or unnecessary information. You should design your own protocol for the inter-client communications. You may use HTTP-like text protocol encoding or a proprietary designed one. Project submission should include a description of the designed protocol, including syntax and semantics. System time is obtained using gettimeofday and it should be truncated before it is display in order to improve readability. Design a good timer mechanism. Since you will be using only one timer (implicit in the select system call), you have to manage a queue of all timeout values that should occur in the future (two values for each neighbor; one for the time by which the client

should send a ROUTE UPDATE and one for when the client expects a ROUTE UPDATE before concluding that the node is dead). Test your program with non-trivial topologies. Test your program behavior in a dynamic environment in which new clients join the system. Use the LINK UP/DOWN commands to test the convergence of your bellman-ford implementation. You should build your own protocol to transfer file chunks in the network. Describe it briefly in README. 5. Deliverables: Submission will be done on courseworks. Please post a single <UNI>_<Language>.zip (Ex. zz1111_java.zip) file to the Programming Assignment 2 folder. The file should include the following: README.txt: This file should contain the following. a. A brief description of your code b. Details on development environment c. Instructions on how to run your code d. Sample commands to invoke your code e. Description of an additional functionalities and how they should be executed/tested. Makefile: The make file is used to build your application. Please try to keep this as simple as possible. If you don t know how to write a makefile, read this quick tutorial http://www.cs.colby.edu/maxwell/courses/tutorials/maketutor/. Source code and related files. (Make sure your code is commented!) Sample config.txt file

Grading rubric Functionality Max Points awarded / deducted Basic client programs with following functionality as per the specifications: - Initial convergence of routing tables (prior to dynamic addition/removal of nodes using LINKDOWN and LINKUP) - Correct implementation of SHOWRT - Transfer of 2MB file (single chunk) from one client to another 45 Correct implementation of LINKDOWN 5 Correct implementation of LINKUP 5 Correct implementation of CLOSE 5 Correct implementation of poison reverse 10 Correct implementation of TRANSFER - Printing relevant details about path and chunk - Recreating original file on receiving all chunks 10+10 Well documented README, makefile (if required) 5 Code quality 5 Extra features: The feature should be useful and grading will be done on its innovation, utility and amount of effort. Max 10 points per extra feature. On TA discretion. Total max extra feature points 20 NOTE: You will lose 10 points if you do not follow the format of the config file passed as an argument while initializing the client. If the transfer for a single 2MB file fails, we will not test the TRANSFER command for multiple chunks of the same file. In effect, this will mean a direct deduction of 20 points for the TRANSFER command.