Project, CIS 456, 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. In the miniproject every student writes a program (preferably in C++) that reads an IPv4 packet header in ``pseudo binary'' (see the example), 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. The only options will be No-Op, EoO, and SSR. (And of course packets without options). Currently (02/29/04) there are three sets of examples on my web page. mini1 (in and out), mini2, and mini3. Your program must duplicate the examples mini1 and mini2. mini3 is more complicated (it has ``Loose Source Route'' and ``Record Route'' options: you do not need to do that). Feel free to play with it. Please note that in the mini-project there is only minimal check on the legitimacy of the header (see packet numbers 4, 6, 8 in mini1: what is wrong in those packets?) and only weak checking that all characters are actually zero-one (see packets 6 and 8 in mini1: what is wrong with those packets?). See also packet 3 in mini2 (and packet 3 in mini3, if you want to). In the miniproject I do not make sure that the addresses etc actually make sense on the network as drawn in my website. So you could see a packet with source address as well as destination address outside my network. In the maxiproject, all addresses will make sense. As far as error checking is concerned: The most important thing is to make sure that if there is a ``bad'' or ``wrong'' packet, you still do the later packets correctly. I included some ``error codes'' in my program. For debugging. Feel free to include error codes in your program. No need to make them the same as mine. Error codes in your program are there for your convenience and your peace of mind, not for my grading. 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 Tuesday March 23, by 9:00 am. I STRONGLY recommend you make sure you have it done by 03/12, and use the spring break for the ``Maxiproject''. The Maxiproject is harder than the miniproject. The miniproject you should be able to do in one (long) evening. The maxiproject may take (almost?) two days. Other advice: think about the maxiproject before you start on the miniproject. If you do not end up using your code from the miniproject in the maxiproject, you have wasted valuable learning. 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 one of the routers (Router R1) you must write a program (preferably in C++) that does the ``forwarding'' for that router. An example will be provided. 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. This network now is on the website. (02/29/04). There will soon be example input files and output files for the maxiproject. In the maxiproject you will not have options, but there WILL be fragmentation, cases with DF = 1 and packet too large, TTL down to zero, etc. 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. The Maxiproject code is due on Tuesday April 13 9:00 am. As stated before: 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 make your output such, that for as many packets as possible your output and mine are identical. 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 . With g++ it gives warnings but does compile ). My program projA.cc is much larger than necessary: it has large unused parts. mini1_in.txt, mini2_in.txt are the input files. mini1_out.txt, mini2_out.txt are the output files. These files are all in my website: look at them. I also put the pair mini3_in.txt , mini3_out.txt on my website. These have complications students in CIS 456 need not worry about. (LSR, RR, etc. They also have a wrong map from port to router). Feel free to look at the third pair anyhow. 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.