Questions and Answers

Question:
Hi Arnold, I was reading ur notes and in the subnet mask section there is sometinh that is unclear to me. You said: 142.150.10.197 is on subnet 255.255.252.0. Determine if another machine is on the same subnet by ANDing both with the subnet mask. The result should be the same. machines on this subnet of this Class B network are... 252 in binary is 11111100 & 10 in binary is 00001010 ---------------------------- 00001000 So 142.150.8.0, ..., 142.150.11.255 are all addresses on this subnetwork. 142.150.12.3 is not on this subnetwork 00001000=8 and you are saying all 8,9,10 and 11 would result in 8 if we AND them with 252 so they are in this subnet mask. However you are saying 12 is not in this subnet mask because 12 AND 252 is 12 and not 8(in binary), but 13,14 and 15 would also AND to 12. I want to know based on what you are claiming 142.150.8.0, ..., 142.150.11.255 is in the given subnet but for example 142.150.12.0, ..., 142.150.15.255 is not? If they give us an IP address like 142.150.18.0, How can we say if its in the subnet or not? From what I see, for each binary number we can find a bunch of different numbers that would AND up to the same number. Or is it all based on us and we define which address is on which subnet, initially? Thanx for you reply.
Answer:
Here is the short answer...a NETWORK is defined by it's NETWORK ADDRESS and SUBNETMASK in the lecture example, the NETWORK was NETWORK ADDRESS SUBNETMASK 142.150.8.0 255.255.252.0 So how are these two used to define the network? An IP address ip1.ip2.ip3.ip4 is on this NETWORK if and only if ip1.ip2.ip3.ip4 & 255.255.252.0 = 142.150.8.0 Another way of looking at this is...if you have IP 142.150.9.7 and subnetmask 255.255.252.0, then what NETWORK are you on? Well you are on the network defined by NETWORK ADDRESS SUBNETMASK 142.150.9.7 & 255.255.252.0 255.255.252.0
Question:
  1. What is the whole purpose of NetMask?
  2. Why it is neccessary to subdivide into class A/B/C?
  3. In the routing table, what is the purpose for Genmask?
Answer:
  1. The netmask is used as I demonstrated previously. You need an IP address and a subnetmask to determine a subnet. The example in the notes is correct, that is, 142.150.10.197 subnetmask 255.255.252.0 determines the network address 142.150.8.0. You can think of the subnet as being detemined by either 142.150.10.197 subnetmask 255.255.252.0 or 142.150.8.0 subnetmask 255.255.252.0 in any case, the way you determine if IP X and Y are on the same subnet (with subnetmask Z) is as follows: if X&Z=Y&Z then they are on the same subnet, otherwise they are not.
  2. When you request a set of addresses for your local network, the subnetmask is used to give you a group of similar addresses (in the sense that when you AND them with the given subnetmask, they all have the same network address). It is used to group addresses.
  3. Genmask is anothername for subnetmask.
Question:
Hi Can we do ASP,PHP in CSC 309 ?I am very interested in learning them!! Enjoyed the first lecture.
Answer:
As JSP, ASP and PHP are all similar, we won't be covering all of them, instead, we will just choose one as an example of the concepts. Once you learn one, you should be able to pick up the other easily. We usually cover JSP, but maybe this time we will cover ASP or PHP (I am currently leaning towards PHP).

Glad you enjoyed it!! It gets better.