Understanding Class C Subnet Masking

Type: Networking

In the day to day support operations a Symertix tech support agent will most often come across customers that have their PC and Symetrix DSP on a Class C Subnet Mask of 255.255.255.0. However, this document covers what Class C subnets mean when they are further partitioned, such as a subnet mask of 255.255.255.128, and how Symetrix support agents can help to support a PC or Symetrix DSP that is assigned to a subnet such as this.

 

Subnet Mask 101:
The first thing to understand is where the 255 comes from. Each number in an IP address, subnet mask, or gateway consists of an 8-bit number, which is why these numbers are also referred to as an “octet”. Four octets make a single IP address, subnet mask, or gateway. How 8 bit numbers, octets, work are similar to dip switches on old SymNet Designer boxes. In other words, a bit can either be on or off, it is a power of two based upon its position, and to get the full value of the octet we add up each of the bit’s values to the previous bit’s value. An 8-bit number can be looked at in several ways, which doing so can sometimes help to make sense of the binary math:
11111111= 264 232 216 28 24 22 21 20 = 128 64 32 16 8 4 2 1

 

So, if the subnet mask was 11111111, we would add up all relevant bits such that 128+64+32+16+8+4+2+1 = 255

 

When a 255 is used in a mask, this indicates that all IP address numbers that have a mask below them must match for two devices to be in the same subnet. For instance, if the IP address is 192.168.100.5 with a subnet mask of 255.255.255.0, then in order for two devices to be on the same subnet their IPs must both contain 192.168.100.n (where n=node address that can vary between 0 and 255).

 

When placed vertically we see:
192.168.100.5
255.255.255.0

 

Every number with a 255 in the same octet must match, so in this case the first three octets of 192.168.100 is masked and must match for devices to be in the same subnet. Only the last octet, 5, is not masked. This is the octet that will vary for all devices in the 192.168.100.n subnet in order for the devices to have unique IP addresses. So, in this instance the subnet consists of all IP addresses between
192.168.100.0 – 192.168.100.255, which is a total of 256 IP addresses within this subnet.

 

Reserved Addresses within a Subnet:
It is also important to remember that every subnet on a network has two reserved IP addresses, also called host addresses.

 

(Note: in a point to point network, the reserved addresses are not needed. “Point to point network” meaning a direct connection or simply a few IP capable units on an unmanaged switch, however, reserving these host addresses on a point to point network certainly doesn’t hurt anything, so these host addresses can always be implemented as a rule)

 

The first reserved IP address in a subnet is the “network” address. This is typically the gateway address, or that of the router that manages the subnet. It is sometimes referred to as the network ID.

 

The second reserved address is the broadcast address, which is always the last IP address in the subnet. Any data sent to the broadcast address will automatically be routed to all nodes within that particular subnet. Many auto-discovery software features use the broadcast address to send a hello/discovery packet to find units on a network. Symetrix Connection Managers or search features of the System Manager in Composer use the broadcast address for discovery of DSP units.

 

Looking at the previous example of a 192.168.100.5 IP address with a 255.255.255.0 subnet mask, the network address would be 192.1683.100.0 and the broadcast address would be 192.168.100.255, leaving 192.168.100.1 through 192.168.100.254 as available IP addresses for all devices (also called “nodes”) on this subnet. In other words, if there are 256 IP addresses and two of those addresses are reserved for the network and broadcast address, then a subnet mask of 255.255.255.0 creates 254 possible IP addresses for additional hosts, also known as IP capable devices or nodes, on the defined subnet.

Dividing Up Subnets using the Subnet Mask:

While the previous section covered the most common class C subnet mask of 255.255.255.0 which creates 254 available IP addresses for nodes on the subnet, the class C subnet mask can be further divided up.

 

As we mentioned above, each octet is an 8-bit number, so a subnet mask of 255.255.255.0 actually looks like this in binary math 11111111.11111111.11111111.00000000.

 

If on the last octet a 1 is added to the far left bit we get 11111111.11111111.11111111.10000000, which is to say the subnet mask is now 255.255.255.128. Changing the last octet from 0 to 128 effectively divides the IP address ranges into two completely different subnets of 128 addresses each.

 

However, it important to remember that within each subnet there are two host addresses reserved for the network and broadcast address.

 

Take a network of 192.168.100.0 with a subnet mask of 255.255.255.128, below are the two defined subnets, their reserved addresses, and available host addresses.

 

Subnet 1:
network address = 192.168.100.0
Host range = 192.168.100.1 to 192.168.100.126
Broadcast address = 192.168.100.127

 

Subnet 2:
network address = 192.168.100.128
Host range = 192.168.100.129 to 192.168.100.254
Broadcast address = 192.168.100.255

 

If a customer had a Symetrix DSP and they could not located it, then support would need to insure the PC running the Symetrix software and the Symetrix DSP is on the same subnet. So, if the Symetrix DSP was at 192.168.100.5 then the customer’s PC would need to be assigned to an open IP address in the range of 192.168.100.1 to 192.168.100.126, excluding of course the DSP’s address of 192.168.100.5 (When looking for an available IP address on the subnet, ping the address before assigning the customer’s PC and only after it is confirmed that no devices respond to the ping request, then assign the customers PC to the available IP address).

How Many Divisions of the Class C Subnet are there?

Now that it is apparent how a subnet mask can create multiple subnets (networks) within a single address base, how many types of divisions are possible and what ranges for hosts are available in each range. First, in the previous example a single bit was added to the last octet of the subnet mask (left side of the 8 bit number) such that 10000000= 128 making the subnet mask 255.255.255.128

 

This however is not the only possible division. Additional bits can be added to the last octet as follows:
10000000=128
11000000=192
11100000=224
11110000=240
11111000=248
11111100=252
11111110=254

 

When these divisions are made, subnet mask then creates the following
network topology:

Subnet Mask# of SubnetsTotal # IP per SubnetNetwork & BroadcastHost IP per Subnet
255.255.255.012562254
255.255.255.12821282126
255.255.255.192464260
255.255.255.224832230
255.255.255.2401616214
255.255.255.24832826
255.255.255.25264422
255.255.255.254128220

 

It is important to note that while a 255.255.255.254 subnet mask may work for a point to point network or direct connection between a DSP and a PC, since in that scenario the subnet mask would provide two IP addresses per subnet, which means this subnet could only support a single Symetrix DSP and a PC. Even more important is that if this subnet mask is used on a managed network, then the two available IP addresses are used for the network and broadcast IP addresses, which does not leave any available host IP addresses for the Symetrix device nor the PC running Composer.

IP Address Ranges per Subnet Mask:

Below is a spreadsheet for each subnet listing the network and broadcast address, as well as the available ranges of available host IP addresses per subnet:

 

192.168.100.n
255.255.255.0

Subnet #Network IPFirst Host IPLast Host IPBroadcast IP
Subnet 1192.168.100.0192.168.100.1192.168.100.254192.168.100.255

 

192.168.100.n
255.255.255.128

Subnet #Network IPFirst Host IPLast Host IPBroadcast IP
Subnet 1192.168.100.0192.168.100.1192.168.100.126192.168.100.127
Subnet 2192.168.100.128192.168.100.129192.168.100.254192.168.100.255

 

192.168.100.n
255.255.255.192

Subnet #Network IPFirst Host IPLast Host IPBroadcast IP
Subnet 1192.168.100.0192.168.100.1192.168.100.62192.168.100.63
Subnet 2192.168.100.64192.168.100.65192.168.100.126192.168.100.127
Subnet 3192.168.100.128192.168.100.129192.168.100.190192.168.100.191
Subnet 4192.168.100.192192.168.100.193192.168.100.254192.168.100.255

 

192.168.100.n
255.255.255.224

Subnet #Network IPFirst Host IPLast Host IPBroadcast IP
Subnet 1192.168.100.0192.168.100.1192.168.100.30192.168.100.31
Subnet 2192.168.100.32192.168.100.33192.168.100.62192.168.100.63
Subnet 3192.168.100.64192.168.100.65192.168.100.94192.168.100.95
Subnet 4192.168.100.96192.168.100.97192.168.100.126192.168.100.127
Subnet 5192.168.100.128192.168.100.129192.168.100.158192.168.100.159
Subnet 6192.168.100.160192.168.100.161192.168.100.190192.168.100.191
Subnet 7192.168.100.192192.168.100.193192.168.100.222192.168.100.223
Subnet 8192.168.100.224192.168.100.225192.168.100.254192.168.100.255

 

192.168.100.n
255.255.255.240

Subnet #Network IPFirst Host IPLast Host IPBroadcast IP
Subnet 1192.168.100.0192.168.100.1192.168.100.14192.168.100.15
Subnet 2192.168.100.16192.168.100.17192.168.100.30192.168.100.31
Subnet 3192.168.100.32192.168.100.33192.168.100.46192.168.100.47
Subnet 4192.168.100.48192.168.100.49192.168.100.62192.168.100.63
Subnet 5192.168.100.64192.168.100.65192.168.100.78192.168.100.79
Subnet 6192.168.100.80192.168.100.81192.168.100.94192.168.100.95
Subnet 7192.168.100.96192.168.100.97192.168.100.110192.168.100.111
Subnet 8192.168.100.112192.168.100.113192.168.100.126192.168.100.127
Subnet 9192.168.100.128192.168.100.129192.168.100.142192.168.100.143
Subnet 10192.168.100.144192.168.100.145192.168.100.158192.168.100.159
Subnet 11192.168.100.160192.168.100.161192.168.100.174192.168.100.175
Subnet 12192.168.100.176192.168.100.177192.168.100.190192.168.100.191
Subnet 13192.168.100.192192.168.100.193192.168.100.206192.168.100.207
Subnet 14192.168.100.208192.168.100.209192.168.100.222192.168.100.223
Subnet 15192.168.100.224192.168.100.225192.168.100.238192.168.100.239
Subnet 16192.168.100.240192.168.100.241192.168.100.254192.168.100.255

 

192.168.100.n
255.255.255.248

Subnet #Network IPFirst Host IPLast Host IPBroadcast IP
Subnet 1192.168.100.0192.168.100.1192.168.100.192.168.100.7
Subnet 2192.168.100.8192.168.100.9192.168.100.192.168.100.15
Subnet 3192.168.100.16192.168.100.17192.168.100.192.168.100.23
Subnet 4192.168.100.24192.168.100.25192.168.100.192.168.100.31
Subnet 5192.168.100.32192.168.100.33192.168.100.192.168.100.39
Subnet 6192.168.100.40192.168.100.41192.168.100.192.168.100.47
Subnet 7192.168.100.48192.168.100.49192.168.100.192.168.100.55
Subnet 8192.168.100.56192.168.100.57192.168.100.192.168.100.63
Subnet 9192.168.100.64192.168.100.65192.168.100.192.168.100.71
Subnet 10192.168.100.72192.168.100.73192.168.100.192.168.100.79
Subnet 11192.168.100.80192.168.100.81192.168.100.192.168.100.87
Subnet 12192.168.100.88192.168.100.89192.168.100.192.168.100.95
Subnet 13192.168.100.96192.168.100.97192.168.100.192.168.100.103
Subnet 14192.168.100.104192.168.100.105192.168.100.110192.168.100.111
Subnet 15192.168.100.112192.168.100.113192.168.100.118192.168.100.119
Subnet 16192.168.100.120192.168.100.121192.168.100.126192.168.100.127
Subnet 17192.168.100.128192.168.100.219192.168.100.134192.168.100.135
Subnet 18192.168.100.136192.168.100.137192.168.100.142192.168.100.143
Subnet 19192.168.100.144192.168.100.145192.168.100.150192.168.100.151
Subnet 20192.168.100.152192.168.100.153192.168.100.158192.168.100.159
Subnet 21192.168.100.160192.168.100.161192.168.100.166192.168.100.167
Subnet 22192.168.100.168192.168.100.169192.168.100.174192.168.100.175
Subnet 23192.168.100.176192.168.100.177192.168.100.182192.168.100.183
Subnet 24192.168.100.184192.168.100.185192.168.100.190192.168.100.191
Subnet 25192.168.100.192192.168.100.193192.168.100.198192.168.100.199
Subnet 26192.168.100.200192.168.100.201192.168.100.206192.168.100.207
Subnet 27192.168.100.208192.168.100.209192.168.100.214192.168.100.215
Subnet 28192.168.100.216192.168.100.217192.168.100.222192.168.100.223
Subnet 29192.168.100.224192.168.100.225192.168.100.230192.168.100.231
Subnet 30192.168.100.232192.168.100.233192.168.100.238192.168.100.239
Subnet 31192.168.100.240192.168.100.241192.168.100.246192.168.100.247
Subnet 32192.168.100.248192.168.100.249192.168.100.254192.168.100.255

 

Because the last two possible subnet masks create 64 and 128 subnets respectively with such a minimal amount of available hosts, these two subnet masks have been omitted from the listed tables. In a practical sense it will be highly unlikely that a Symetrix support agent will come in contact with either of the following subnet mask; however, should a Symetrix support agent encounter either subnet mask in the field, using the above data and understanding the pattern should allow them to figure out the available host IP addresses.

Subnet Mask# of SubnetsTotal # of IP per SubnetNetwork & BroadcastHost IP per Subnet
255.255.255.25264422
255.255.255.254128220

 

Abbreviations:

To conclude this document, one final piece of the puzzle is that sometimes these subnet masks are abbreviated. And abbreviated subnet mask would be displayed in the form of 192.168.100.0/26 where the /26 indicates the subnet mask that is being used. Below is a chart of the abbreviations.

Subnet MaskAbbreviation
255.255.255.0/24
255.255.255.128/25
255.255.255.192/26
255.255.255.224/27
255.255.255.240/28
255.255.255.248/29
255.255.255.252/30

 

As such, it is apparent that 192.168.100.0/26 indicates that the network is 192.168.100.0 with a subnet mask of 255.255.255.192 so Symetrix support would know this subnet mask creates 4 subnets with 64 total IP addresses of which 2 are reserved for the network and broadcast addresses, so there are 62 available host IP addresses per network.