Subnetting Class C- Understanding IP

If you recall, a Class C network uses the first 3 bytes (24 bits) to define the network address. This leaves you 1 byte (8 bits) with which to address hosts. So, if you want to create subnets, your options are limited because of the small number of bits available.

If you break down your subnets into chunks smaller than the default Class C, then figuring out the subnet mask, network number, broadcast address, and router address can be confusing. To build a sturdy base for subnetting, study the following techniques for determining these special values for each subnet, but also learn and use the more efficient technique presented in the later section “Quickly Identifying Subnet Characteristics Using CIDR” and the earlier section “An Easier Way to Apply Subnetting.” Table 4.5 summarizes how you can break down a Class C network into one, two, four, or eight smaller subnets, and it gives you the subnet masks, network numbers, broadcast addresses, and router addresses. The first

3 bytes have simply been designated x.y.z. (Note that the table assumes you can use the all 0s and all- 1s subnets too.)

TABLE 4.5 Setting up Class C subnets

Number of desired subnetsSubnet maskNetwork numberRouter addressBroadcast addressRemaining number of IP addresses
1255.255.255.0x.y.z.0x.y.z.1x.y.z.255253
2255.255.255.128x.y.z.0x.y.z.1x.y.z.127125
 255.255.255.128x.y.z.128x.y.z.129x.y.z.255125
4255.255.255.192x.y.z.0x.y.z.1x.y.z.6361
 255.255.255.192x.y.z.64x.y.z.65x.y.z.12761
 255.255.255.192x.y.z.128x.y.z.129x.y.z.19161
 255.255.255.192x.y.z.192x.y.z.193x.y.z.25561
8255.255.255.224x.y.z.0x.y.z.1x.y.z.3129
 255.255.255.224x.y.z.32x.y.z.33x.y.z.6329
 255.255.255.224x.y.z.64x.y.z.65x.y.z.9529
 255.255.255.224x.y.z.96x.y.z.97x.y.z.12729
 255.255.255.224x.y.z.128x.y.z.129x.y.z.15929
 255.255.255.224x.y.z.160x.y.z.161x.y.z.19129
 255.255.255.224x.y.z.192x.y.z.193x.y.z.22329
 255.255.255.224x.y.z.224x.y.z.225x.y.z.25529

For example, suppose you want to chop up a Class C network, 200.211.192.x, into two subnets. As you can see in the table, you’d use a subnet mask of 255.255.255.128 for each subnet. The first subnet would have the network number 200.211.192.0, router address could be the first available host address of 200.211.192.1, and broadcast address 200.211.192.127. You could assign IP addresses 200.211.192.2 through 200.211.192.126— that’s 125 additional different IP addresses.

Heavily subnetting a network results in the loss of a progressively greater percentage of addresses to the network number, broadcast address, and router address.

The second subnet would have the network number 200.211.192.128, router address 200.211.192.129, and broadcast address 200.211.192.255.

Determining the Subnet Numbers for a Class C Subnet

The first subnet always has a 0 in the interesting octet. In the example, it would be 200.211.192.0, the same as the original nonsubnetted network address. To determine the subnet numbers for the additional subnets, first you have to determine the incremental value:

  1. Begin with the octet that has an interesting value (other than 0 or 255) in the subnet mask. Then subtract the interesting value from 256. The result is the incremental value. If again you use the network 200.211.192.x and a mask of 255.255.255.192, the example yields the following equation: 256 – 192 = 64. Thus, 64 is your incremental value in the interesting octet— the fourth octet in this case. Why the fourth octet? That’s the octet with the interesting value, 192, in the mask.
  2. To determine the second subnet number, add the incremental value to the 0 in the fourth octet of the first subnet.

In the example, it would be 200.211.192.64.

3. To determine the third subnet number, add the incremental value to the interesting octet of the second subnet number.

In the example, it would be 200.211.192.128.

4. Keep adding the incremental value in this fashion until you reach the actual subnet mask number.

For example, 0 + 64 = 64, so your second subnet is 64. And 64 + 64 is 128, so your third subnet is 128. And 128 + 64 is 192, so your fourth subnet is 192. Because 192 is the subnet mask, this is your last subnet. If you tried to add 64 again, you’d come up with 256, an unusable octet value, which is always where you end up when you’ve gone too far. This means your valid subnets are 0, 64, 128, and 192 (total of 4 subnets on your network).

The numbers between the subnets are your valid host and broadcast addresses. For example, the following are valid hosts for two of the subnets in a Class C network with a subnet mask of 192:

       The valid hosts for subnet 64 are in the range 65–126, which gives you 62 hosts per subnet.

(You can’t use 127 as a host because that would mean your host bits would be all 1s. The all- 1s format is reserved as the broadcast address for that subnet.)

       The valid hosts for subnet 128 are in the range 129–190, with a broadcast address of 191.

As you can see, this solution wastes a few addresses— six more than not subnetting at all, to be exact. In a Class C network, this should not be hard to justify. The 255.255.255.128 subnet mask is an even better solution if you need only two subnets and expect to need close to 126 host addresses per subnet.

Calculating Values for an Eight- Subnet Class C Network

What happens if you need eight subnets in your Class C network?

By using the calculation of 2x, where x is the number of subnet bits, you would need 3 subnet bits to get eight subnets (23 = 8). What are the valid subnets, and what are the valid hosts of each subnet? Let’s figure it out.

11100000 is 224 in binary, and it would be the interesting value in the fourth octet of the subnet mask. This must be the same on all workstations.

To figure out the valid subnets, subtract the interesting octet value from 256 (256 – 224 = 32), so 32 is your incremental value for the fourth octet. Of course, the 0 subnet is your first subnet, as always. The other subnets would be 32, 64, 96, 128, 160, 192, and 224. The valid hosts are the numbers between the subnet numbers, except the numbers that equal all 1s in the host bits. These numbers would be 31, 63, 95, 127, 159, 191, 223, and 255. Remember that using all 1s in the host bits is reserved for the broadcast address of each subnet.

The valid subnets, hosts, and broadcasts are as follows:

SubnetHostsBroadcast
01–3031
3233–6263
6465–9495
9697–126127
128129–158159
160161–190191
192193–222223
224225–254255

You can add one more bit to the subnet mask just for fun. You were using 3 bits, which gave you 224. By adding the next bit, the mask now becomes 240 (11110000).

By using 4 bits for the subnet mask, you get 16 subnets because 24 = 16. This subnet mask also gives you only 4 bits for the host addresses, or 24 – 2 = 14 hosts per subnet. As you can see, the number of hosts per subnet gets reduced rather quickly for each host bit that gets reallocated for subnet use.

The first valid subnet for subnet 240 is 0, as always. Because 256 – 240 = 16, your remaining subnets are then 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, and 240. Remember that the actual interesting octet value also represents the last valid subnet, so 240 is the last valid subnet number. The valid hosts are the numbers between the subnets, except for the numbers that are all 1s— the broadcast address for the subnet.

Table 4.6 shows the numbers in the interesting (fourth) octet for a Class C network with eight subnets.

TABLE 4.6 Fourth octet addresses for a Class C network with eight subnets

SubnetHostsBroadcast
01–1415
1617–3031
3233–4647
4849–6263
6465–7879
8081–9495
9697–110111
112113–126127
128129–142143
144145–158159
160161–174175
176177–190191
192193–206207
208209–222223
224225–238239
240241–254255

Leave a Reply

Your email address will not be published. Required fields are marked *