02/16/2006 I just fimished grading the homework. There are too many mistakes in the basics. Below are some ``model solutions''. Please study for the midterm. 1.After login in to lafite you find, from ifconfig: inet addr:128.235.35.52 Bcast:128.235.35.255 Mask:255.255.252.0 Q: What are IPv4 address and NetID? A: 128.235.35.52 , 128.235.32.0/22 . (Sometimes we are sloppy and say the NetID is 128.235.32.0 . That is kind of OK as long as it is clear what the mask is. NOT in the situation above.) Explanation: (Give only if asked!) The mask of 255.255.252.0 translates in a mask length of 22. ((8 + 8 + 6) , or (32 - (8 + 2)). So we get the NetID by keeping the first 22 bits as they are, and making the last 10 bits into zero. BTW, the mask is 11111111 11111111 11111100 00000000 , but that was not asked. Never answer questions that were not asked: if correct you get no credit. If wrong you loose points. BTW, read questions carefully. Many students clearly did not read questions carefully. That always costs you points. Common error: NetId 128.235.35.0/22 That hurts me! 128.235.35.0 does not even have the last 10 bits equal to zero! BTW, please note that the Bcast address, 128.235.35.255 , indeed is the first 22 bits of the NetID, with 10 ones concatenated. (Check it out!) 2. A mask is FF:FF:F8:0 i. What is its length? 21 . (8 + 8 + 5) ii. write it in dotted decimal. 255.255.248.0 (easiest way: 248 = 255 - 7 , but feel free to do it any way you feel like). iii. Write it in Binary. 11111111 11111111 11111000 00000000 Be nice to the grader: put in the blanks where i put them. And, of course, if the mask is given in any other way you can write it in hexadecimal. 3. Suppose we have a LAN with network address 128.235.32.0/22 . a. What is the length of the mask of this LAN? b. Write down the mask in bits. c. Write down the mask in dotted decimal d. Write down the mask in hexadec. e. For each of the following INET addresses: Is it allowed as IPv4 interface address on this LAN? Is it allowed as source address in an IPv4 packet in this LAN (say on coaxial cable, or in switch)? Is it allowed as destination address in an IPv4 packet in this LAN? (same). Answer x/y/z , each of x, y, z yes (y) or no (n). Give a BRIEF explanation. i 128.235.32.0 ii 128.235.32.1 iii 128.235.31.2 iv 128.235.33.3 v 128.235.35.254 vi 128.235.35.255 vii 128.236.32.4 viii 255.255.255.255 ix 127.0.0.1 x 224.1.2.3 a. 22 (!!) b. 11111111 11111111 11111100 00000000 c 255.255.252.0 d. FF:FF:FC:00 or: FFFFFC00 I prefer to have the separators. e i n/n/n This is the network address (or network ID). ii y/y/y perfectly legal interface address in this LAN iii n/y/y could be legal in other LAN. iv y/y/y perfectly legal interface address in this LAN v y/y/y perfectly legal interface address in this LAN. (The highest possible host ID in this LAN). vi n/n/y Directed Broadcast address. vii n/y/y could be legal in other LAN (outside NJIT). viii n/n/y Limited Broadcast address. ix n/n/n Loopback address x n/n/y Multicast address. A few more: 0.0.0.0 n/y/n ``I am stupid'' address. More scientific: ``THIS host on THIS network"". Only allowed as source address. 10.1.2.3 n/n/n This is allowed only in a private network, and 128.235.32.0/22 is not in one of the sets of private addresses. 0.0.2.75 MY answer would be n/y/y (local scope only, surrogate for 128.235.34.75, but I have never really studied this. So I will not ask you. Comer I p 71 seems to say it is OK, so it probably is. In NJIT this does not work. I just did , from 128.235.32.243 : ping 0.0.3.52 lafite did not respond. (Lafite is 128.235.35.52) So maybe it is legal, but inside 128.235.32.0/22 it does not work. 235.3.4.5 n/n/y Multicast. 240.4.5.6 depends/depends/depends This is a class E address, so it is OK if you have permission from the right people in the IETF. You can get that permission if you describe a legitimate experimental purpose. 0.0.4.75 This is NOT local scope in 128.235.32.0/22 ! (4 > 3). The answer is n/n/n because it is a class A address, and class A addresses must have the first octet at least one. I am fairly sure this still holds even though we no longer use classful addressing. Similar for class B and class C addresses, see Comer I p 70. Make sure you understand everything I just said, including those items I will not ask about. Make sure to understand, not memorize.