In the spring of 2002, the CIS656 course of Prof Ott will have two projects. Students have to write source code, as follows: Project A: Assume an input file which contains a number of headers of IP packets in pseudo-binary form. (Actually: an asci file containing zeros and ones in asci). The students must write code that takes the input file and gives a description of the packets in ``english'', including numerical values of all fields. An example input and output file is given in the sample input file for project A. The headers will either be without options, or contain a strict sourceroute option. In the latter case the first 8 bits of the option part will be 00000001 (no-operation option) and the second 8 bits will be 10001001 (strict sourceroute), etc. This may violate the standard (no-op only at the end of an option, to let the next option start on a 32 bit boundary?) but it makes life a bit easier. Anyway, this is the way we do it in this project. There is one non ``binary'' input item: the input interface. The students will echo this, see examples. The students also will compute and print the number of data bytes in the packet. IP checksums will always be zero, need not be checked, need not be computed or re-computed. Project A is done by students individually. the project is due, in the form of source code, on March 25 2002, 9:00 am, by Email to Ms Zhang. Students are expected to re-use the software from project A in the second project: Project B: Consider the network handed out in class, and also available in ... . Students will write a program that for a file containing a number of headers of IP packets describes what Router 1 would do with the packets. If the packet is dropped in R1 this must be stated. If an ICMP packet is sent this must be stated, and a short description of the ICMP packet must be given, but no details about the layout or values of fields in the ICMP packet need be given. See examples. If the packet is routed the output packet (or packets, in case of fragmentation) must be described, in the ``english'' format as in project A, with output interface (or interfaces) and numbers of data bytes in the packet. (Or in each of the packets, in case of fragmentation). All headers will either be without options or with the strict sourceroute option, as in project A. It is possible a packet must be routed AND an ICMP redirect packet must be sent (!). Students make their own ``routing table'' for R1. The routing table is based on the assumption that always the min-hop route is chosen. If R1 gets a packet for subnetwork V it chooses the route III-R14-IX-R6-V (and NOT II-R3-VIII-R5-V). (I.e: forwards to interface A25 on R14). The network has 15 Routers numbered 1 through 15. The network has 16 networks, numbered in Roman numerals. (I through XVI). This network is supposed to be the network of a company that owns the whole address space 153.153.0.0/16 . Part of that space is not used. The next table gives the network addresses and the MTUs of the various subnetworks: Subnetwork Address MTU I 153.153.0.0/20 17914 II 153.153.16.0/20 4352 III 153.153.32.0/20 65535 IV 153.153.48.0/20 4464 V 153.153.64.0/20 65535 VI 153.153.240.0/24 1500 VII 153.153.80.0/20 65535 VIII 153.153.96.0/20 65535 IX 153.153.241.0/24 65535 X 153.153.242.0/24 1500 XI 153.153.243.0/24 1500 XII 153.153.112.0/20 1500 XIII 153.153.128.0/20 65535 XIV 153.153.244.0/24 1500 XV 153.153.245.0/24 1500 XVI 153.153.246.0/24 1500 The IP addresses of the interfaces are: Interface Address A1 (R1 to XI) 153.153.243.1 A2 (R1 to II) 153.153.24.0 A3 (R1 to III) 153.153.32.1 A4 (R1 to I) 153.153.8.0 A5 (R2 to II) 153.153.16.1 A6 (R2 to VII) 153.153.88.0 A7 (R4 to VII) 153.153.80.1 A8 (R4 to IV) 153.153.56.0 A9 (R10 to IV) 153.153.48.1 A10 (R10 to VI) 153.153.240.128 A11 (R3 to II) 153.153.16.2 A12 (R3 to VIII) 153.153.104.0 A13 (R5 to VIII) 153.153.96.1 A14 (R5 to V) 153.153.72.0 A15 (R6 to V) 153.153.64.1 A16 (R6 to IX) 153.153.241.128 A17 (R9 to XI) 153.153.243.2 A18 (R9 to X) 153.153.242.128 A19 (R7 to III) 153.153.32.2 A20 (R7 to XII) 153.153.120.0 A21 (R8 to XII) 153.153.112.1 A22 (R8 to XIII) 153.153.136.0 A23 (R15 to XIII) 153.153.128.1 A24 (R15 to UUNET) 10.0.0.1 (we wish! :-) ) A25 (R14 to III) 153.153.40.0 A26 (R14 to IX) 153.153.241.1 A27 (R14 to XIII) 153.153.132.0 A28 (R12 to I) 153.153.0.1 A29 (R12 to XV) 153.153.245.128 A30 (R11 to XV) 153.153.245.1 A31 (R11 to XiV) 153.153.244.128 A32 (R13 to I) 153.153.0.2 A33 (R13 to XVI) 153.153.246.128 (Students: please check I did not goof. Like having two different interfaces with the same address, or an interface with an address not in the network it interfaces to. I THINK I did not goof.) For Routing, assume the following: Whenever a router gets a packet for one of the 16 subnetworks, and the packet can be routed, it is sent to or toward that subnetwork. (Using the min-hop policy, etc). If a router gets a packet with a destination address not in one of the 16 subnetworks, and the router is not R15, it sends the packet to or toward R15. (Using ther min-hop policy, etc). If R15 gets a packet with a destination address outside 153.153.0.0/16 it sends it out through interface A24, to a further irrellevant router or host. If R15 gets a packet with a destination address inside 153.153.0.0/16 but not in one of the 16 subnetworks, it drops the packet and sends an ICMP error message: ``network unknown''. If a router gets a packet for one of the subnets it interfaces to, and the destination address is NOT its own address (!), and the address is NOT a broadcast address (!), we always assume that the destination host exists, is known to the router, and we do ``direct delivery''. Decide for yourself what the router does if it gets a packet with one of its own addresses as destination, or if it gets a packet with a broadcast destination address (direct broadcast or limited broadcast). Students will do projects B in teams. Teams of 2 people are recommended. Teams of 1 person are allowed, not recommended. Teams of 3 people are allowed in special cases. Permission is needed. Ask Prof Ott. Teams of 4 or more people are not allowed. All people in a team get the same score, which depends only on how many packets from Prof Ott's secret test file are handled correctly by the program. Project B is due, in the form of source code, on Sat April 20, 23:59 (BEFORE midnight) by Email to Ms Zhang. You have to let Prof Ott know the composition of your team (if one or two people) by Sat 03/16, by Email. If you want permission for a team of 3, ask prof Ott NO LATER THAN Thu 03/14, noon. Prof Ott will be at a conference March 17 - 22. ------------------------------------------------------------------------- The following holds for both projects, A and B: Source code that compiles on gcc, g++, cc, CC, or javac (and runs correctly!) will be accepted. These are the prefered compilers. If you want to use some other language or compiler, ask permission first. If it requires a compiler prof Ott or Ms Zhang do not have easy access to, permission will not be given. When submitting the project, give clear instructions on how to compile and run. Input files and output files will be called infileA, outfileA, infileB, outfileB. You are allowed to use input redirection and output redirection, so you can write the program as if it uses standard input and standard output. You can also use named files. Give clear instructions on what your program expects! Examples infileA, outfileA are on Prof Ott's web page. You are now ready to do project A. Examples infileB, outfileB will be given shortly. ------------------------------------------------------------------------- A competent programmer who has been paying attention in class should be able to do project A in a day or (much?) less. Project B is MUCH more work. You will save yourself time by given careful thought to the structure of your program BEFORE starting to code. Make sure to have started CODING of project B by March 30, or you will be in time trouble. That means having a design of the logic BEFORE March 30. Starting earlier is safer! (I recommend making a good start during the spring break.) Ask questions on March 16 (before the break). No class on March 23. Academic spring break is March 17 - 24. Good Luck. Teun Ott.