| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
IP Subnetting: "Three-Level" Hierarchical IP Subnet Addressing The simplest division of IP addresses is into a structure containing two elements: the network ID and the host ID. In explaining this concept, I drew an analogy to the way North American phone numbers are ten digits long, but are broken down into a three-number area code and a seven-digit local number. As I mentioned in the preceding topic, subnetting adds an additional level to the hierarchy of structures used in IP addressing. To support this, IP addresses must be broken into three elements instead of two. This is done by leaving the network ID alone and dividing the host ID into a subnet ID and host ID. These subnet ID bits are used to identify each subnet within the network. Hosts are assigned to the subnets in whatever manner makes the most sense for that network. Interestingly, the analogy to telephone numbers that we used before still holds in the world of subnetting, and shows how subnetting changes the way IP addresses are interpreted. A number like (401) 555-7777 has an area code (401) and a local number (555-7777) as I said before. The local number, however, can itself be broken down into two parts: the exchange (555) and the local extension (7777). This means phone numbers really are comprised of three hierarchical components just as IP addresses are in subnetting. Of course, the number of bits in an IP address is fixed at 32. This means that in splitting the host ID into subnet ID and host ID, we reduce the size of the host ID portion of the address. In essence, we are stealing bits from the host ID to use for the subnet ID. Class A networks have 24 bits to split between the subnet ID and host ID: class B networks have 16, and class C networks only 8.
Now, remember when we looked at the sizes of each of the main classes, we saw that for each class, the number of networks and the number of hosts per network are a function of how many bits we use for each. The same applies to our splitting of the host ID. Since we are dealing with binary numbers, the number of subnets is two to the power of the size of the subnet ID field. Similarly, the number of hosts per subnet is two to the power of the size of the host ID field (less two for excluded special cases).
Let's take a brief example to see how this works. Imagine that we start with Class B network 154.71.0.0. 16 bits are for the network ID (154.71) and 16 for the host ID. In regular classful addressing there are no subnets (well, one subnet that is the whole network, but never mind about that) and 65,534 hosts total. To subnet this network, we can decide to split those 16 bits however we feel best suits the needs of our network: 1 bit for the subnet ID and 15 for the host ID, or 2 and 14, 3 and 13, and so on. Most any combination will work, as long as the total is 16, such as 5 and 11, which I illustrate in Figure 65. The more bits we steal from the host ID for the subnet ID, the more subnets we can havebut the fewer hosts we can have for each subnet. Deciding how to make this choice is one of the most important design considerations in setting up a subnetted IP network. The number of subnets is generally determined based on the number of physical subnetworks in the overall organizational network. The number of hosts per subnetwork must not exceed the maximum allowed for the particular subnetting choice we make. Choosing how to divide the original host ID bits into subnet ID bits and host ID bits is sometimes called custom subnetting and is described in more detail later in this section.
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. |