CIS 656, Spring 2006. All homework is assigned on this page. Homework must be done before / is due on the date stated. Homework to be handed in: Unless stated differently, and unless you make a different arrangement with the TA, homework must be handed in on the day stated, before 1:00 pm, by putting it in the envelope on the door of the Internet Laboratory. That is GITC 4325. If you want a special arrangement for handing in homework, ask the TA. Don't ask Dr Ott. He always says no. I try to assign homework at least 6 days in advance (on Tuesday for the next Monday) but sometimes I do not succeed. Also, sometimes I change my mind. So check this page frequently. Use ``reload'' or ``refresh'', or you will get the version you looked at last time. Students are encouraged to discuss homework at the ``idea'' level (``how would you start on this problem''), but doing homework together and handing in essentially the same copy is absolutely not permitted and leads to reduced credit or worse. It is recommended students read Forouzan Chapters 1, 2, 3 before the first lecture (01/23/2006). If you can't make that, you have to read them before the second lecture (01/30/2006). It is recommended students read all files pointed to from the ``CIS 656 general remarks'' page, and from the page ``computer access at NJIT'' do all the excercises not old hat to them. If you can't make that, it is compulsory for the second lecture (01/30/2006). ------ 01/30/2006 (lecture 2) On my website, CIS 656 General Remarks, read the ``Computer Access at NJIT'' page. Do those excercises that are not old hat to you. Do not hand in. On the same website, read the ``CIS 656 Content'' page. Remember this page: later you need the ``man pages'' listed there. On the same website, read the ``Networking Books'' page. Remember this page: you may need to read RFCs listed there, or books listed there. Read the README file. Look at Forouzan Appendix A (pp 771 - on). (ASCII). Do not memorize! but remember where it is: you may need it later on. Read Forouzan Appendix B (pp 776 - on). (Numbering systems). You have had this as undergraduate. (Also Octal). Read Forouzan pp 783 - 785 (first 3 pages of Appendix C). This is a review of one's complement arithmetic (which you already knew) in the context of checksums (which may be new). Read Forouzan pp 1 - 40 (Ch 1 and 2). Read Forouzan pp 43 - 54 (ethernet). Read Forouzan pp 81 - 95 (Start of ``adressing''). IETF stands for ``Internet Engineering Task Force''. RFC stands for ``Request for Comments''. IETF RFCs can be obtained on the web. Find out how. (For example, first use GOOGLE to find IETF). Get IETF RFC 1700 and read page 1. (The whole RFC is too long and too out-dated to read). Get IETF RFC 3232 and read the whole thing. (2 pages). 1. Use the mechanism described to find out what the content of the ``Frame Type Field'' (see below) in an ethernet frame header is, in case the ethernet frame contains an IP version 4 (IP v4) packet. (The answer is 0800 in hexadecimal, 0000 1000 0000 0000 in binary, 2048 in decimal). To prove you found the answer in the location I want you to know about, copy 5 lines from the page you found: the line with the answer, two lines above it, two lines below it (five lines total). Hand in these 5 lines. Note: What I usually call the ``frame type field'' in the ethernet header, other people sometimes call the ``ether type field''. (And sometimes I do that, too). Forouzan used to call this the ``Length PDU'' field. That was outdated. In the third ed p 46 he calls it the ``length/type'' field. Nowadays it is almost always used as ``frame type'', i.e., as descriptor of the next higher protocol. More about this in class. While doing the homework you may have to search for ``ethernet numbers'' or ``ether type'' or ``frame type''. In the problems 2 and 3, assume ``Classful Adresses'' are being used. 2. Do Forouzan p 112 problem 10. Hand in. 3. Do Forouzan p 112 problem 11. Hand in. ------ 02/06/2006 (lecture 3) Since I did not cover ``Fragmentation'' yet, do the problems below but do not spend time on the ``fragmentation'' parts of the problems. Read Forouzan pp 55 - 79 (Most of this is ``the other LANs'' that you must be aware of but that are not of further relevance in this course.) Read Forouzan pp 95 - 110. Read Forouzan pp 115 - 128. (CIDR etc). Read Forouzan pp 131 - 155. (In class I called this ``forwarding''). Read the ``Domain Names'' page on this website. Read the ``nslookup and dig'' page on this website. You have access to the computers afs1, ... , afs36. (Walk-up, telnet, ssh. Possibly more.) (These are Solaris computers.) You have access to afs48, ... , afs57. (Telnet only.) (These are old sgi computers.) You have access to lafite and mouton. (lafite.njit.edu etc.) (Ssh only.) (These are linux computers.) Some of those machines are often down. Try another one in the same group. group 1: afs1, ... , afs36 . group 2: afs48, ... , afs57. group 3: lafite and mouton. 1. Log on to one of the afs computers (afs1, ... , afs36). Preferably from home. (Use ssh, vpn, telnet, rlogin, rsh, or whatever). Do man nslookup Use Google to find the name of the computer that hosts the website of the ``Nizhni Novgorod State University''. Use nslookup to find the IP address of that computer. Hand in the entire output from nslookup. (Also the line you typed, including prompt. I want to see your login ID there! MUST be on one of afs1 ... afs36.) Hand in as hardcopy. 2. Log in to at least 1 computer from each of the 3 groups. Do ``man ifconfig''. Use ifconfig to find IPaddress and Mask of that computer. (Actually: of the one ethernet card on that computer. lafite and mouton have 4 ethernet cards each, but on both lafite and mouton only one ethernet card is ``active'', i.e. has an IP address.) Note the different behavior of ifconfig on the various computers. Find the network address of the LAN the computer is on. For three computers (one from each group) hand in: Name, IP address, network address (in slash notation). Example: For maan.njit.edu that would be: maan.njit.edu , 128.235.32.243 , 128.235.32.0/22 . 3. Write two programs. C++ or Java. If you want to use another language ask permission first. Program A takes 32 bits in ``pseudo-binary'' and outputs the IPv4 address in dotted decimal and the numerical value of the whole address (unsigned int). Program B takes an IPv4 address in ``dotted decimal'' and outputs the 32 bits (in ``pseudo-binary''), and the numerical value of the whole address (unsigned int). Hand in the programs. They must run on afs computers! Do your developement and testing on afs machines. (afs1, ... , afs36). In particular with C++, if you do the development on a PC, the code is likely not to run on a Solaris machine. If you do development and testing on a Solaris machine, the code will also run on a PC. Hamd in as hardcopy. Example: Program A, if given the input 10000000111010110010000011110011 , would answer 128.235.32.243 , 2,162,893,049 Program B, if given the input 128.235.32.243 , would answer 10000000111010110010000011110011 , 2,162,893,049 ( 2^(31) + 2^(23) + 2^(22) + 2^(21) + 2^(19) + 2^(17) + 2^(16) + 2^{7} + 2^{6} + 2^{5} + 2^{4} + 2^(1) + 2^(0) ) = 2,162,893,049 . (Unless I made an error!) In the project you will use this: Write ``destination address'', ``mask'', and ``network address'' as unsigned ints. Then: if ( (dest_address & mask) == netw_address ) you know the destination network. (Or at least : You have a ``hit'' in the forwarding table. There could still be an issue with ``longest fit''.) Hand in by Email. It must be in .txt format. NOT in .doc format. If you do your development on a PC that means you must use ``Notepad''. If you do your develoment on an afs computer, or any Unix / Solaris / Linux computer, and use any editor I know of (ed, vi, emacs, etc) it automatically in in .txt format. In that case the ``postfix'' indicates the language used. For example, dott2bits.cc would mean the file contains a program written in C++. Do not hand in the following: Also write a program that takes an insigned int ( < 2^(32) ) as input and gives ``pseudo-binary'' and ``dotted decimal'' as output. Henceforth: Programs are always handed in by Email, in .txt format. Never .doc . Other homework is always handed in as hardcopy. ------ 02/13/2006 (Lecture 4) Read Forouzan Ch 7 (pp 159 - 175) Read Forouzan pp 179 - 191. For each of the three groups of computers you already know: Log in to one of them and study the behavior of the arp cache. Do "man arp". You probably need to use "arp -a" and "arp -an", but this may be a little bit different on different OSs. (Hence "man arp") Check that for each of these groups all computers you know about (in that group) are on the same LAN. (There almost certainly are more computers on the same LAN.) If you are in (e.g.) afs55 and (e.g) afs53 is not in afs55's ARP Cache, you can force it in by "ping afs53". (afs55 must find out afs53's physical address in order to send it the ping packet.) Do not hand in. Trick Question: What is the length of the mask 255.255.244.0 ? Do not hand in. Check that 128.235.192.0/20 is a PREFIX to 128.235.200.0/22. Do not hand in. 1. For one from afs1 , ... , afs36 study how ``Resolved'' times out. (How? for 8 minutes or so, do "arp -a" and "arp -an" once every 30 seconds or so.) Write a SHORT paragraph on what you see and what your conclusions are. Hand in. 2. We have a LAN (or VLAN) with address 128.235.32.0/22. For each of the following addresses, is it allowed on the network as: interface address / source address in packet / destination address in packet? For each, give a SHORT explanation. Example: 129.235.32.1 n/y/y Legal interface address on different LAN: packet may be on its way from or to there. i 128.235.32.0 ii 128.236.32.1 iii 128.235.33.2 iv 127.0.0.1 v 128.235.35.254 vi 128.235.35.255 vii 10.1.2.3 viii 0.0.0.0 ix 255.255.255.255 x 224.0.0.1 xi 235.128.32.3 xii 245.245.245.245 (answer: depends. depends on what?) Hand in. 3. Some router R0 has forwarding table Route mask netw interface NextHop 1 255.255.255.255 128.235.32.243 eth1 R1 2 255.255.0.0 128.235.0.0 eth2 R2 3 255.255.224.0 136.136.64.0 eth3 R3 4 255.255.240.0 136.136.80.0 eth3 DD 5 255.255.252.0 136.136.88.0 eth4 R4 6 0.0.0.0 0.0.0.0 eth5 R5 5A. Compute and give the lengths of each of the masks. 5B. Which routes are prefixes for which other routes? 5C. For each of the following destination addresses, give the route (number) R0 would put a packet with that destination address on. (There are ``longest prefix'' issues.) C1 128.235.32.242 C2 128.234.32.243 C3 136.136.89.89 C4 136.136.72.72 C5 136.136.81.81 C6 136.136.96.96 Hand in. ------ 02/20/2006 (Lecture 5) Plan was to have ``midterm 1'' on 02/20/2006. However, because I did not finish grading homework, the ``first midterm'' has been postponed to 02/27/2006. (Still comprehensive!) Comprehensive: All reading, notes, homework, including for day of exam. Read Forouzan pp 191 - 208 (remainder Ch 8). I have put the project information on my web page: start working on the project. A router receives an IPv4 packet with in the header: HLEN = 10, TL = 4352, Identifier = 54321 (numerical value of 16 bit unsigned int), U = 0 (the unused bit in the Fragmentation Flags), DF = 0, M = 1, Fragmentation Offset = 1078, TTL = 23. It contains two options: 1 No-Op, 1 Loose Source Route. i. For how many adresses is there space set aside in this Loose Source Route Option? ii. How many data bytes are there in this packet? iii. How many preceding data bytes are there? (THIS router need not have seen these!) iv. Give your best guess for what kind of LAN caused fragmentation of the original packet of which this packet is a fragment. The router determines the next hop and finds this next hop goes through an ethernet LAN. It finds further fragmentation is needed. v. How many fragments will there be? (From THIS packet). vi. For each of these fragments, give HLEN, TL, Identifier, U, DF, M, Frag Offset, TTL, and number of data bytes it contains. Hand in. Henceforth: ALL programs handed in by Email. ALL other homework handed in as hardcopy, before the end of the break. Model Solution for the problem above: i: There are HLEN = 10 ``lines'' of 32 bits each in the header. 5 of these are for the ``usual'' header. 1 is for the line that contains No-Op, Code, Length, Ptr (of LSR). Therefore there is space for 10 - 6 = 4 addresses. ii There are TL - 4xHLEN = 4352 - 40 = 4312 data bytes in this incoming fragment. iii The number of data bytes in preceding fragments of the original packets is 8x1078 = 8624 Bytes. iv TL = 4352. This is the MTU of FDDI (See Forouzan p 187). So it looks likely that the LAN that caused the original fragmentation is FDDI. Also: LSR option is put in all fragments. So previous fragments may very well have been (4312 + 40) = 4352 Bytes each. And 2x4312 = 8624. The evidence is mounting: A large IP packet with an LSR option arrived at an FDDI LAN. The first three fragments were each 4312 data bytes + 40 header bytes. After those three fragments, there were more data bytes: the fragment at hand has M = 1. The fragment now being fragmented further is the third of the original fragments. I recommend in a case like this you give a little bit of expl, so I can give some credit if you have the wrong answer with a sensible argument. v The next MTU is 1500 Bytes. Each fragment gets a header of 40 Bytes. So each has space for 1460 data bytes, but that is legal only if 1460 is a multiple of 8. 1460 = 8 x 182.5: 1460 data bytes is not legal. Take the largest multiple of 8 that is .LEQ. 1460: 1460 = 1456 + 4 = 182x8 + 4. Fragment 1 gets 1456 data bytes, left over 2856 data bytes. Fragment 2 gets 1456 data bytes, left over 1400 data bytes. Fragment 3 gets 1400 data bytes, nothing left over. There will be 3 fragments. vi: HLEN TL Ident U DF M FragOffs TTL NumDBytes Frag 1 10 1496 54321 0 0 1 1078 22 1456 Frag 2 10 1496 54321 0 0 1 1260 22 1456 Frag 3 10 1440 54321 0 0 1 1442 22 1400 All three fragments have M=1: Each has more to come, because the fragment being further fragmented has more to come. For the first of the three fragments, FragOffset = the original FragOffset: All data bytes before the fragment being fragmented are before the new fragment. For the second of the three fragments: increase by (the number of data bytes in the first of three)/8. Etc. Please note: This ensures that what was the fourth fragment in the original fragmentation at an FDDI LAN has the right FragOffset: 3 x 539 = 1617. Or 539 + 539 + 182 + 182 + 175. If that fourth original fragment is fragmented somewhere, the first of the resulting ``sub-fragments'' will also have FragOffset = 1617. Don't forget to be a good router: decrease TTL by 1! ------ 02/27/2006 (Lecture 6) Midterm I. All classnote material up to and including 02/20/2006. Including ICMP, delays in networks. All homework material up to and including for 02/27, 2006. All reading Forouzan Ch 1 - 9. (pp 1 - 234). That includes the reading for 02/27/2006. To prepare: Go to the CIS656 General Pages. read the file on ``stuff you must understand but must not memorize''. Look at the list of Standard Exam Questions. Read Forouzan pp 211 - 234 (Ch 9). CAN be asked about in the exam! Do: For each of the 3 groups of computers in NJIT you have used before: Log on to one of the computers. (Preferably from home!) Do man ping and man traceroute . Do traceroute to one of each of the three groups, and to a computer outside NJIT. (Total: 3x4 = 12 traceroutes). Think about what you see. Do not hand in. Use Google to find traceroute.org . Use traceroute.org to find a site in the USA that let's you log in and traceroute from there. Traceroute to a site in Africa or Asia or Australia. (Choose your own site). Traceroute to a computer inside NJIT. Think about what you see. Do not hand in. 1. Lafite and mouton are on the same LAN (or VLAN). (You already knew that, and you just saw it again!) Use ping to (approximately) measure the Data Rate of that LAN. Hand in the plot you get, with a SHORT! explanation of how you use that plot to estimate the Data Rate of the LAN. If you see ``strange'' behavior, write a SHORT! paragraph describing and if possible explaining the strange behavior. Hand in. Warning: If you are (un)-lucky, the plot may look strange. There are several reasons this may happen. One is that somebody else may be taking the same measurements at the same time, and your and his/her packets are interfering with each other. There are other causes for ``strange'' behavior. Use common sense. Redo the measurements a couple of hours later. In general it is best to do this kind of measurements at times when the computers in question, and any switches the packets flow through, have no or few other users. ------ 03/06/2006 Lecture 7. Forgot to assign homework! Project A is due 03/20. Project B is due 04/17. Read the ``Project'' page. ------ 03/20/2006. Lecture 8. Project A is due. Read Forouzan pp 237 - 252 (Ch 10) Read Forouzan pp 255 - 272 (Ch 11) Read Forouzan pp 662 - 670 (Sections 25.4 - 25.7) More (not much) homework to be added soon. ------ 03/27/2006. Lecture 9. Read Forouzan pp 275 - 312 (first half+ Ch 12). ------ I made an error in class on 03/27: TCP connection, desired throughput 400Mbits/sec (promised by Internet II), RTT = 100 msec. What Window Scale Factor is needed? Throughput is 400Mbits/sec = 50MBytes/sec. RTT is 100 msec = .1 sec. So flightsize must be 50MBytes/sec x .1 sec = 5MBytes. 5,000,000/65535 = 76.3 . Thus, the window scale facor must be 7. (2^6 = 64 < 76.3 < 2^7 = 128). With a window scale factor of 7 the highest possible ``advertised window'' would be 128 x 65535 = 8,388,480 > 5,000,000 (In class I said a window scale factor of 3 would be enough: I was wrong). Give some thought to this: Why must the window scale factor be between 0 and 14 (both included)? In other words: Why is a window scale factor of 15 or higher never allowed? 04/03/2006. Lecture 10. Second midterm. 8:30 - 9:30. Be on time. Time will be short: be efficient in your use of time. Midterm is comprehensive (cumulative): Everything since day zero: Forouzan Ch 1 - Ch 12. (Not Ch 13). All classnotes up to and including 03/27/2006. All homework including for 04/03/2006 (!). Likely questions: Draw, and explain in detail, a TCP header without options. (or: IP header, or UDP header). Look at the homework (below) for 04/03/2006. --- Read Forouzan pp 312 - 340 (remainder Ch 12). Read Forouzan pp 345 - 369 (first half+ Ch 13). A file of 1 Terabyte (10^{12} Bytes, 1000 GBytes) must be moved from the Supercomputer Centre in San Diego to the Supercomputer Centre in Pittsburgh. The System Administratpors and Network Administrators invloved have checked with ``Internet II'', and Internet II has promised to have 640 Mbits/sec available for this transfer. The RTT between the two Supercomputer Centres has been measured and is found to be 100 msec. As a ``Hero-experiment'' the transfer will be done in one TCP flow, not a number of parallel TCP flows. In the following, disregard overhead for various headers. Don't forget the factor 8 between bits and Bytes! Questions (hand in) 1. What Window Scale Factor must the Pittsburgh Supercomputer Centre use when advertising to San Diego? 2. What size SendBuffer must San Diego use? 3. What size RcveBuffer must Pittsburgh use? 4. Supposing a data rate of 640 Mbits/sec can indeed be maintained, How long will it take to move the data over? 5. Suppose some System Administrator blunders and forgets to use Window Scaling, how long would it take (roughly) to transfer the data? Hand in. There is a good chance a question of this type will be asked in midterm or final. Or both. ------ 04/10/2006, Lecture 11. Read Forouzan pp 345 - 382 (Ch 13). ------ 04/17/2006, Lecture 12. Read Forouzan pp 385 - 423 (first 4/5 of Ch 14) ------ 04/24/2006, Lecture 13. Read Forouzan pp 423 - 432 (Remainder Ch 14) Read Forouzan pp 437 - 455 (Ch 15) Read Forouzan pp 457 - 468 (Ch 16) ------ 05/01/2006, Lecture 14. Read Forouzan pp 689 - 723 (Ch 27: IPv6). Last lecture I forgot to mention ``Hot Potato Routing''. Please remind me. Do the next problem. Do not hand in. A variation on this problem WILL be asked in the Final exam. Router R1 is in a domain that uses RIP1. It has a combination routing table / forwarding table as follows: network 1 2 3 4 5 6 7 8 9 10 11 12 13 14 distance 1 1 1 2 2 2 2 4 5 6 7 8 9 9 outp interf 1 2 3 1 1 2 3 1 1 2 3 1 2 3 next hop DD DD DD R2 R3 R4 R5 R2 R3 R4 R5 R2 R4 R3 (To save space, networks are given by name, not address, next hops are given by name, not address, and many networks that should be there are not listed). 1. Suppose the domain uses ``Split Horizon''. Give the Router Update R1 next sends to R2. 2. Suppose the domain uses ``Poison Reverse''. Give the Router Update R1 next sends to R2. 3. Further disregard 1 and 2 above. R1 still has the same Routing / Forwarding Table. Suppose R1 next receives the following Router Update from R3: network 1 2 3 4 5 6 7 8 9 10 11 13 14 15 distance 16 16 16 16 1 16 3 3 5 4 6 5 7 5 3A. Does this domain use Split Horizon? Poison Reverse? 3B. Based on the above, what is the ``actual'' hopcount from R3 to Network 4? In R3, what is the ``next hop'' for the route to network 4? 3B. Construct the new routing / forwarding table in R1 after is has received and digested the update fom Router R3. Hint: Formally speaking, you do not need to make a drawing of the domain (the part that you know about) in order to answer questions 3A and 3C. I recommend you do it anyhow (the first time). So during the exam you may not need to: you have seen it all. :-) . When you make a drawing, put a ``dotted line'' from (e.g.) Router R2 to network 12: I have not given you information about other networks and routers on that path. But you ``know'' the hopcount. Similar for other paths you can not completely reconstruct. ------ The date etc of the Final Exam has changed. Final: Wed May 10, 8:30 - 11:00. in CULM 111 . Comprehensive. All reading, notes, homeworks. ------ Homework for summer 2006: (Do not hand in :-) ). Keep your textbook (Forouzan). Read the parts we did not cover in class. If you kept up with the class you know enough about networking that you can do a lot of studying on your own. In particular: read Ch 17 (DNS), Ch 18 (Telnet), Ch 19 (FTP), 22 (HTTP), Ch 24 (Mobile IP: Take Dr Borcea's course if you want to know more), Ch 25 (Multimedia), Ch 26 (NAT etc), Ch 27 (IP v6), Ch 28 (Security), then Chapters 20 , 21 , 23 . Hope you learned a lot, and a lot of useful stuff, in this class.