15-441 Project 2: Network Layer

Assigned: Monday, Feb 13th, 2006

Due: Monday, March 6th, 2006, 11:59pm

Due: Thursday, March 9th, 2006, 4:59pm

Lead TAs: Thomas Harris and Mike Cui

Introduction - Logistics - Assignment - Evaluation
Hand-in - Coding Style - Resources

Introduction

While Project 1 gave you experience with the application layer in networking, this project will give you experience with one of the lower layers of the networking stack. Specifically, you will design and implement forwarding and routing in an IP-capable network layer.

Note that Project 3 depends significantly on Project 2. To successfully complete Project 3, you will need the facilities that you implement in Project 2 (forwarding). It is vital that you keep this in mind when choosing your project partner, and while working on the project.

Logistics

This is a group project. You must find exactly one partner for this assignment. The only reason you should not have a partner is if there are an odd number of people in the class and you are left out (in which case contact us). Talk to your neighbors and use the bboards. See Barbara Grandillo, WeH 8018, for access to the sign-up sheet. The deadline for signing up is Wednesday 3/15.

Like Project 1, you must write your code in C. Your code will run on top of a virtual machine that we have supplied. See the Support Code section below.

The project directory for this project is /afs/cs/academic/class/15441-s06/project2, which is referred to as $PDIR in the rest of this document.

Assignment

Evaluation

Testing Utilities

How you test your code is up to you. However, we have provided some utilities to help you test. startkernel.pl is a perl script that will read the network configuration file and launch the appropriate kernels in separate X windows. fdconfig is a program that will allow you to manually manage routes in your kernel. unreliable-server is a program that runs on a simulated node, waiting for a transferred file, which it can write to a file or send to stdout. unreliable-client is a program that will read a file, and attempt to send it to the unreliable-server. pktdrop is a utility that can set a packet drop rate for a node's interface. It only affects the interface's sent packets, so if you want to simulate a cut wire, you'll need to call pktdrop for the interfaces at both ends of that wire. startkernel.pl can be found in the $PDIR/template directory and the rest of these programs can be found in All of these programs can be found in the $PDIR/utils directory.

We will use these programs to test your code. We will also test your code with various topologies. Edit the network config file to do the same.

Grading Rubric

Hand-in

You should submit the following files:

Your Makefile should produce two executables, named p2_kernel and p2_routed, when make is run with no arguments in your directory. Your makefile should run gcc with option -Wall -Werror and should produce no errors or warnings.

Coding Style

We expect highly readable code. See project 1 for details.

Resources