CIS 656-102, Spring 2006, Dr Ott Midterm I, 02/17/2006. Be clear and concise, and within the constraints of clear and concise, be short. 8:30 - 9:30. Class resumes 9:40. Name on every sheet! 1. Draw, in detail, the header of an IPv4 packet without options. For each field give the size in bits, give a SHORT description of its meaning and use. Where applicable, mention what the units are it is expressed in. (e.g., bits, Bytes, meters, miles, coulombs, seconds, etc.) 2. Router R0 has the following forwarding table: Route Net.Addr Mask outputInterf. Next hop 1 129.236.128.0 255.255.240.0 eth0 R2 2 129.236.136.0 255.255.252.0 eth1 DD 3 129.236.133.4 255.255.255.255 eth2 R1 4 129.236.192.0 255.255.224.0 eth3 R5 5 129.236.224.0 255.255.240.0 eth2 DD 6 0.0.0.0 0.0.0.0 eth3 R4 a. For each of those routes, give the length of the mask. b. For each of the routes, give the mask in hexadecimal. c. Which routes are prefixes to which other routes? d. For the following destination addresses, which route would R0 put a packet with that destination address on? (Read the question: I said route, not router.) i 129.236.133.5 ii 129.236.140.6 iii 129.236.240.7 iv 129.236.141.8 v 129.237.142.9 vi 129.236.133.4 vii 129.236.208.5 viii 129.236.225.6 ix 129.236.223.7 x 129.236.160.8 Model solution to problem 2: 2a: 20, 22, 32, 19, 20, 0. 2b: FFFFF000, FFFFFC00, FFFFFFFF, FFFFE000, 00000000. 2c. Route 6 is a prefix to all other routes. Route 1 is a prefix to route 2 and to route 3. (Not asked, but correct: route 3 is a host-specific route. route 6 is a default route.) Several people said that route 4 is a prefix to route 5. That is wrong: those people did not look at the length of the mask. Let's have a look at the third octet: (Route 4) 110x xxxx (or: 110 twigle 0 0000) (Route 5) 1110 xxxx (or: 1110 twigle 0000) For Route 4 to be a prefix to route 5, they must have the same first 19 bits. That includes the first 3 bits of the third octet. They do NOT have the same first 3 bits in the third octet. 2d: 1, 1, 6, 1, 6, 3, 4, 5, 4, 6. (Check it yourself). (v must be put on 6 because the second octet is not 136.) 3. Router R1 receives an IPv4 packet with: HLEN = 5, TL (Total Length) = 2020, Identifier = 54321 , U = 0 (unused bit in Fragmentation Flags), DF = 0, M = 0, Fragmentation Offset = 541, TTL = 19. a. How many data bytes does this packet have? b. How many data bytes are there in preceding fragments? (R1 may not have seen those preceding fragments, and may never see them.) Router R1 determines the next hop for this packet, and finds the next LAN is an ethernet (MTU = 1500 Bytes). c. How many fragments will result from this packet? d. For each of these fragments, give HLEN, TL, Identifier, DF, M, FragOffset, and TTL. Model Solution to problem 3: 3a: The packet has a total of 2020 Bytes, of which HLENx4 = 20 Bytes are header Bytes. Hence there are 2020 - 20 = 2000 Data Bytes. 3b: The number of data Bytes in ``preceding fragments'' is 8x541 = 4328 Bytes. 3c. The next MTU is 1500 Bytes. That makes it possible to have at most 1500 - 20 = 1480 data bytes. Also, 1480 is divisible by 8. (1480/8 = 185). Therefore, the first fragment resulting from the fragment we are now further fragmenting has 1480 data bytes. There are 2000 - 1480 = 520 data bytes left over. That easily fits inside a second fragment. The further fragmentation of the packet (which already is a fragment) will result in 2 fragments. Numbers of data bytes: 1480 and 520. Numbers of header byutes: 20 and 20 Total Lengths: 1500 and 540. 3d HLEN TL Ident DF M FragOffset TTL frag 1: 5 1500 54321 0 1 541 18 frag 2: 5 540 54321 0 0 726 18 Fragoffsets: The data bytes preceding the first (new) fragmemt are exactly the data bytes preceding the packet we are fragmenting. Hence the same fragoffset. The databytes preceding the second fragment are those preceding the packet we started with, plus the data bytes in the first fragment we just constructed. Don't forget to count in units of 8 Bytes. Don't forget to decrease the TTL by one. Distribution of scores: 94 92 92 90 82 82 78 70 69 69 66 65 58 52 33 19