effect of using different netmasks


Divide 256 by the number of students in class and round down. For example if there are 10 students in class the rounded quotient is 25 ( 256/10 = 25.6 ). Make a list of IP addresses, one per student, whose final octet is a multiple of that quotient. Let the first 3 octets be constant, say 100.110.120. In the example the list would be:

1 100.110.120.25
2 100.110.120.50
3 100.110.120.75
4 100.110.120.100
5 100.110.120.125
6 100.110.120.150
7 100.110.120.175
8 100.110.120.200
9 100.110.120.225
10 100.110.120.250

Distibute/assign these IP addresses among yourselves. Refer to this table of common netmasks for small networks:

Netmask: # of zero bits: Implied network size:
255.255.255.0 8 256 (254)
255.255.255.128 7 128 (126)
255.255.255.192 6 64 (62)
255.255.255.224 5 32 (30)
255.255.255.240 4 16 (14)
255.255.255.248 3 8 (6)

You will now do an experiment 6 times. In it, you will apply your assigned IP address to your network card then attempt to ping each of the other students and record, for each, either success or failure. The difference among the 6 experiments is that you will apply your IP in conjunction with a different netmask each time. All students should conduct a given experiment (use a common netmask) at the same time, them move on as a class to the next experiment.

1st experiment

Apply your IP to your network card in conjunction with netmask 255.255.255.0. Assuming your network card is called eth0 and your particular IP is 100.110.120.75, here is the command for you to execute:

ifconfig  eth0  100.110.120.75  netmask  255.255.255.0

Make sure all the other students have finished doing the same. Now attempt to ping each of them in succession and record either a "Y" or "N" depending whether you got an answer back from them or not. Here are the commands for you to execute in this example (vary the IPs to conform with the ones actually used by your class):

ping -c 1  100.110.120.25
ping -c 1  100.110.120.50
ping -c 1  100.110.120.75
ping -c 1  100.110.120.100
ping -c 1  100.110.120.125
ping -c 1  100.110.120.150
ping -c 1  100.110.120.175
ping -c 1  100.110.120.200
ping -c 1  100.110.120.225
ping -c 1  100.110.120.250

In doing so, you will fill in the 2nd column of a results table like the one shown at the bottom of this page. Draw one on paper for your class, with the particular number and values of IP addresses it is actually using. Or, use a prepared table on a worksheet supplied by your instructor.


2nd experiment

Apply your IP to your network card in conjunction with netmask 255.255.255.128. Assuming your network card is called eth0 and your particular IP is 100.110.120.75, here is the command for you to execute:

ifconfig  eth0  100.110.120.75  netmask  255.255.255.128

Again attempt to ping the other students in succession and record either a "Y" or "N," this time filling in the 3rd column of the table.


3rd experiment - repeat using netmask 255.255.255.192, filling in the 4th column.


4th experiment - repeat using netmask 255.255.255.224, filling in the 5th column


5th experiment - repeat using netmask 255.255.255.240, filling in the 6th column.


6th experiment - repeat using netmask 255.255.255.240, filling in the 7th column.

 

When you are done, observe the results in the completed table. If you can, explain them. If not, hold on to them until you learn enough to figure out how to explain them.

 

 

Results table:

 

255.255.255.0

255.255.255.128

255.255.255.192

255.255.255.224

255.255.255.240

255.255.255.248

100.110.120.25            
100.110.120.50            
100.110.120.75            
100.110.120.100            
100.110.120.125            
100.110.120.150            
100.110.120.175            
100.110.120.200            
100.110.120.225            
100.110.120.250