Project, CIS 656, Spring 2004. Dr Ott. The project consists of two parts. The first part (``miniproject'') is done by individual students. (Teams of one). The second part (``maxiproject'') is done in teams of two. (or one, two is recommended). Please send Mr jain the name of your partner by 03/24. In the miniproject every student writes a program (preferably in C++) that reads an IPv4 packet header in ``pseudo binary'' (see the examples), computes all fields, computes the number of data bytes, and prints the result (see the example). Examples reside on this page. I did not compute the Checksums, and I do not expect you to compute checksums. There will be packets without options, as well as packets with No-Op, EoO, SSR, LSR, RR. Your program must duplicate the examples mini1 and mini2. Please note that I do a small amount of checking on the legitimacy of the headers. Do at least as much. Most important: make sure that if there is a ``bad'' packet, you do the next one(s) right. I used some ``error codes'', strictly for my own use. Feel free to use or not use error codes. No need to make your error codes the same as mine. You can count on HLEN and the number of 32-bit words of input to be correct. The last two bits in the ToS field are called the ECT bit (ECN Capable Transport), CE bit (Congestion Experienced bit). I will discuss these when we do TCP. For the time being, just compute them. Use the network drawing, and the network description, that are on this website to map ``Input Port'' into ``Router''. The ``miniproject'' is due on Saturday March 13. In the second part of the project (``maxiproject'') you will be given a network of routers and LANs, with addresses and masks and MTUs for all LANs, and adresses (names and IP adresses) for all ports on the routers, and for two of the routers you must write a program (preferably in C++) that does the ``forwarding'' for those routers. An example will be provided soon. The reason that ``input ports'' are given is that the forwarding of a packet often depends on the input interface (input port) as well as on the destination address of the packet. The network etc has been on the website for over a week. In the maxiproject, the packets will be without options, or with No-Op and SSR. There will be packets that need (further) fragmentation. There will be packets that need fragmentation but have DF = 1. etc. In the maxi projects, packets will arrive at one of the input interfaces A1, A2, A3, A4, A5, A6 (that was R1) or A25, A26 (that was R11). The code in the maxiproject will need the code from the miniproject as front-end: You need to know the values of all fields in order to generate the packets being sent out by the router. Please send Mr Jain the name of your partner by 03/24. The Maxiproject code is due on Saturday April 10 13:00. Start in time! While most students can do an adequate job on the miniproject in just one evening, the maxiproject may take as much as two whole days. Or more if you have not paid attention in class and have to study the theory while writing the program. Students are allowed, even encouraged, to discuss the structure of the programs and to share ideas. Sharing code between teams is not allowed. If you share code (as opposed to ideas) you may end up getting no credit at all for the project, even if you only gave your code away. Grading: I will have two secret input files. I will use my program to get the perfect output files. You will give us your programs (electronically), with clear and simple instructions on how to run. We will use your program with my secret files to get your output files. Then I will do a unix ``diff'' between your output files and mine. If there is no difference, you have done perfect. If there is a difference, I look at the differences. Try to get diff down to zero. Try to make your output such, that for as many packets as possible your output is identical to mine. (Makes grading easy). Go to a Unix / Solaris / Linux system and do ``man diff'' . This is an example of how I compile and run my program: --------------------- maan-393 Mini>: ls -l total 74 -rw-r--r-- 1 ott 30 1693 Feb 29 13:52 mini1_in.txt -rw-r--r-- 1 ott 30 1915 Feb 29 13:52 mini2_in.txt -rw-r--r-- 1 ott 30 33406 Feb 29 13:52 projA.cc maan-394 Mini>: CC projA.cc maan-395 Mini>: a.out < mini1_in.txt > mini1_out.txt maan-396 Mini>: a.out < mini2_in.txt > mini2_out.txt maan-397 Mini>: ls -l total 990 -rwxr-xr-x 1 ott 30 461532 Feb 29 14:21 a.out -rw-r--r-- 1 ott 30 1693 Feb 29 13:52 mini1_in.txt -rw-r--r-- 1 ott 30 2932 Feb 29 14:21 mini1_out.txt -rw-r--r-- 1 ott 30 1915 Feb 29 13:52 mini2_in.txt -rw-r--r-- 1 ott 30 3562 Feb 29 14:21 mini2_out.txt -rw-r--r-- 1 ott 30 33406 Feb 29 13:52 projA.cc maan-398 Mini>: --------------------- projA.cc is my C++ program. I compile it using CC . (I am ashamed: it did not compile with gcc ). My program projA.cc is much larger than necessary: it has large unused parts. mini1_in.txt, mini2_in.txt are the input files. projA.cc ``thinks'' it is reading from standard input and writing to standard output (cin and cout). I use input re-direction ( < ) and output redirection ( > ). If you prefer to read from a file and write to a file, that is OK. If you want to use commandline parameters, that is OK. Make sure to give CLEAR and SIMPLE instructions on how to compile and run. Your program must come in a single file. You must state what compiler to use. The program must run on a Solaris computer. Make sure to test it on one of afs1 - afs36. DO NOT come with excuses like ``but it ran on my PC, just come to my home and see ... ''. DO NOT offer to bring your laptop and show how your program runs on your laptop.