Networking IP Addressing and Subnetting

Computing

The following is a practice test I had once, I’ve added how you work the answers out on the sheet for future reference.

Part of it is below, the rest can be found in the IP Addressing and Subnetting PDF.

1.    What networks do the following host IP Addresses belong to?

Fairly standard, the addresses below are classful addresses so just work out what class they are; A for example is a Class B address so the network is 132.86.0.0, B is a Class A address so the network is 14.0.0.0

IP Address Subnet Mask Network Address
A. 132.86.97.10 255.255.0.0 132.86.0.0
B. 14.255.255.0 255.0.0.0 14.0.0.0
C. 176.176.176.32 255.255.0.0 176.176.0.0
D. 216.126.250.54 /24 216.126.250.0
E. 19.0.0.69 /8 19.0.0.0
F. 163.150.0.22 /16 163.150.0.0

2.    Develop a subnet design for a network – 198.23.42.0 (with current subnet mask of 255.255.255.0) – so that it has at least 8 useable subnets.

Only list the first and last subnets that are available for use.

(N)etwork bits+(S)ubnet bits+(H)ost bits=32 total bits, 24N+S+H=32, 24N+4S+H=32, 32-(24N+4S)=32, 32-28=4H, 24N+4S+4H=-32Bits

First determine class, Class C so the standard mask starts with 255.255.255.0 which means we have used 24 bits out of the total 32 so far, we need to work out how many bits will be needed for 8 usable subnets, 2 to the power of 3 gives 8 but 2 are unavailable so we need to use 2 to the power of 4 which gives 16 – 2 = 14. Using the conversion table make a mark at the 4th number in as we used 4 bits then add up the bits before the mark.

128      64        32        16        |8         4          2          1

1          1           1            1          |

128+64+32+16 = 240 this is the value for the last Octet of the subnet mask.

255.255.255.240 or /28

To work out the first subnet ID select the first value before the mark you made above ie: 16 (which is the magic number) so the first subnet ID is 198.23.42.16 the first usable value on that range is 17 as 16 is the network ID and can’t be used. To work out the last available subnet ID add up all the marks used minus the magic number which is 16 so 240 -16 = 224 so the last available subnet ID is 224. The Custom Subnet Mask is: 255.255.255.240 or /28_

Subnet ID 198.23.42.16

128 64 32 16 |8 4 2 1
0 0 0 1 |0 0 0 0

First Valid host ID 198.23.42.17

128 64 32 16 |8 4 2 1
0 0 0 1 |0 0 0 1

Last valid host ID 198.23.42.30

128 64 32 16 |8 4 2 1
0 0 0 1 |1 1 1 0

Broadcast Address 198.23.42.31

128 64 32 16 |8 4 2 1
0 0 0 1 |1 1 1 1

To work out the last valid subnet ID set all bits to the left of the magic number to 1 and the rest to 0 add those up 128+64+32=224 so 198.23.42.224

128 64 32 16 |8 4 2 1
1 1 1 0 |0 0 0 0

First valid host ID on the last subnet

128 64 32 16 |8 4 2 1
1 1 1 0 |0 0 0 1

To work out the broadcast add all the bits except the magic number 128+64+32+8+4+2+1=239

128 64 32 16 |8 4 2 1
1 1 1 0 |1 1 1 1

Subnet to the left and including the magic number, Hosts to the right of the magic number.

1st Subnet ID = 16

128      64        32        16        |8         4          2          1

0          0          0          1          |0         0          0          0 Subnet ID 16

128      64        32        16        |8         4          2          1

0          0          0          1          |0         0          0          1 1st Host 17

128      64        32        16        |8         4          2          1

0          0          0          1          |1         1          1          0 Last Host 30

128      64        32        16        |8         4          2          1

0          0          0          1          |1         1          1          1 Broadcast 31

Last Subnet ID = 224

128      64        32        16        |8         4          2          1

1          1          1          0          |0         0          0          0 Subnet ID 224

128      64        32        16        |8         4          2          1

1          1          1          0          |0         0          0          1 1st Host 225

128      64        32        16        |8         4          2          1

1          1          1          0          |1         1          1          0 Last Host 238

128      64        32        16        |8         4          2          1

1          1          1          0          |1         1          1          1 Broadcast 239

Subnet ID First Valid Host ID Last valid Host ID Broadcast Address
198.23.42.16 198.23.42.17 198.23.42.30 198.23.42.31
198.23.42.224 198.23.42.225 198.23.42.238 198.23.42.239

A