IP Subnet Masks, Notation and Subnet Calculations
(Page 4 of 4)
Rationale for Subnet Mask Notation
So, in practical terms, the subnet mask actually conveys only a single piece of information: where the line is drawn between the subnet ID and host ID. You might wonder, why bother with a big 32-bit binary number in that case, instead of just specifying the bit number where the division occurs? Instead of carrying the subnet mask of 255.255.248.0 around, why not just say divide the IP address after bit #21? Even if devices want to perform a masking operation, could they not just create the mask as needed?
That's a very good question. There are two historical reasons: efficiency considerations and support for non-contiguous masks.
The subnet mask expression is efficient, in that it allows routers to perform a quick masking operation to determine the subnet address. This improves performance; remember that computers were much slower when this system was developed. Today this is not really that much of an issue.
RFC 950 actually specified that when splitting the bits in the host ID for subnet ID and host ID, it was possible to split it in more than one place! In the example above, we could, instead of splitting the 16 bits into 5 bits for subnet ID and 11 for host ID, have done it as 2 bits for the subnet ID, then 4 bits for the host ID, then 3 more bits for the subnet ID and finally 7 more bits for host ID. This would be represented by the subnet mask pattern 11000011 10000000 for those sixteen bits (following the sixteen ones for the network ID).
Why do this instead of just dividing as 5 bits for subnet ID followed by 11 bits for host ID as we did before? I have no idea. J In fact, most other people had no idea either. Trying to subnet this way makes assigning addresses extremely confusing. For this reason, while it was technically legal, the use of non-contiguous subnet masking was not recommended, and not done in practice.
Given that non-contiguous masks are not used, and today's computers are more efficient, the alternative method of expressing masks with just a single number is now often used. Instead of specifying IP address of 126.96.36.199 with subnet mask of 255.255.248.0, we can just say 188.8.131.52/21. This is sometimes called slash notation or CIDR notation. It is more commonly used in variable-length masking (VLSM) environments, and as the second name implies, is also the standard for specifying classless addresses under the CIDR addressing scheme. However, it is also sometimes seen in regular subnetting discussions.
If you've never subnetted before, this topic may have left you with your head spinning, despite our looking at an example. Don't worry. It will all become more clear as you become more familiar with subnetting by following the rest of this section. Remember also that I have included a whole section that shows how to subnet step by step, including determining the subnet mask.
Home - Table Of Contents - Contact Us
The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005
© Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.