| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
IP Custom Subnet Masks (Page 2 of 4) Trading Off Bit Allocations To Meet Subnetting Requirements How do we decide how to divide the classful host ID into subnet ID and host ID bits? This is the key design decision in subnetting. We must make this choice based on our requirements for the number of subnets that exist in the network, and also on the maximum number of hosts that need to be assigned to each subnet in the network. For example, suppose we have 10 total subnets for our Class B network. We need 4 bits to represent this, because 24 is 16 while 23 is only 8. This leaves 12 bits for the host ID, for a maximum of 4,094 hosts per subnet. However, suppose instead that we have 20 subnets. If so, 4 bits for subnet ID won't suffice: we need 5 bits (25=32). This means in turn that we now have only 11 bits for the host ID, for a maximum of 2,046 hosts per subnet. Step #2 of the practical subnetting example discusses these decisions in more detail. Now, what happens if we have 20 subnets and also need a maximum of 3,000 hosts per subnet? Well, we have a problem. We need 5 bits to express 20 different subnets. However, we need 12 bits to express the number 3,000 for the host ID. That's 17 bitstoo many. The solution? We might be able to shuffle our physical networks so that we only have 16. If not, we need a second Class B network. It's also important to realize that in regular subnetting, the choice of how many bits to use for the subnet ID is fixed for the entire network. You can't have subnets of different sizesthey must all be the same. Thus, the number of hosts in the largest subnet will dictate how many bits you need for the host ID. This means that in the case above, if you had a strange configuration where 19 subnets had only 100 hosts each but the 20th had 3,000, you'd have a problem. If this were the case, you could solve the problem easily by dividing that one oversized subnet into two or more smaller ones. An enhancement to subnetting called Variable Length Subnet Masking (VLSM) was created in large part to remove this restriction.
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. |