| United States-English |
|
|
|
![]() |
HP-UX LAN Administrator's Guide: HP-UX 11i v2 > Chapter 6 Network
AddressingVariable-Length Subnet Addressing |
|
For the most efficient use of address space and maximum flexibility in increasing/decreasing the size of your subnets, Hewlett-Packard recommends variable-length subnet addressing. To maximize the possibilities offered with this new approach, you should utilize mirror image counting, as described in this section, to select subnet numbers. In the past, a network administrator typically assigned values to the subnet number and host address fields in numerical order. For example, within a given subnet, hosts were numbers 1, 2, 3, etc. and within a given network, the subnets were numbered 1, 2, 3, etc. The result was that some bits on the right side of the subnet field and host field were “ones and zeros” and some bits on the left side of the subnet and host fields were “all zeros” for all subnets and hosts. As shown below, the “all zeros” bits represented room for growth, and the “ones and zeros” bits represented bits already consumed by growth. In the next example. the entire host field has been allocated. As a result, only the subnet field can grow. To alleviate this restrictive situation, when you use the variable-length subnetting approach, you can, alternatively, assign subnet numbers from the left of the subnet field and work right. This is implemented using mirror-image counting. In the mirror image approach, the bits for subnet numbers are assigned left to right instead of right to left (normal situation). This would result in the following format:
This will allow for more growth bits between the subnet field and the host fields as shown below. In this case, both the host field and subnet field have considerably more growing space than before, although the combined growing space is the same. As it is difficult to predict how many hosts might end up in a subnet, or how many subnets there might eventually be, this arrangement allows for maximum flexibility in growth. In Figure 6-11 “Mirror Image Subnet and Host Field Allocation”, the boundary between the host and subnet fields is shown in the middle of the growth area. The boundary, however, could exist anywhere within the growth area. The subnet mask determines where the boundary is located. “Ones” in the subnet mask indicate subnet bits, and “zeros” indicate host bits. To minimize the amount of rework after the initial planning of your network, you should choose a subnet mask for a given subnet based on the projected growth of that subnet. As shown in Figure 6-12 “Example of Variable-Length Subnet Mask”, the subnet is projected to have a maximum size of 14 hosts. Therefore, the subnet mask should be 255.255.255.240. There are two remaining growth bits for this subnet. If the subnet grows beyond 14 hosts, you may choose to change one of the two remaining growth bits to a host bit. The new subnet mask will be 255.255.255.224. Variable-length subnet masks are assigned using the netmask parameter of the ifconfig command, SUBNET_MASK in netconf with a 32-bit subnet mask indicated in dot notation, or SAM. In the example below with a Class C IP address, the host portion has three types of assigned bits: subnet number bits, growth bits, and host bits, with a chosen subnet mask that allows for growth in both the host field and subnet field without a mask change. The example below shows how the bits might look in the host address portion of a Class C address in a network with four subnets using variable-length subnetting. In this example “g” stands for growth bits and “h” stands for host bits. The 0’s and 1’s in the host address are assigned subnet numbers. Table 6-8 Subnets with Variable-Length Subnet Mask
If hosts are added to subnet B above, so that all of its remaining “g” bits become “h” bits, the mask in subnet B also must change. Table 6-9 “Subnets with Subnet Mask (B) Modified” shows the results of these changes. Also, two additional subnets have been added, subnet E and subnet F. Table 6-9 Subnets with Subnet Mask (B) Modified
Notice that these additions caused A to change its leftmost g-bit into a subnet-bit (“s” bit). With the addition of subnet address 101 for subnet E, the old subnet address 10 of subnet A must be changed to 100 so that the proper number of bits are used to make the subnet numbers unique. Table 6-10 “Subnets with Subnet E Removed” shows the results of removing subnet E. Table 6-10 Subnets with Subnet E Removed
Notice that with this change, subnet A gains back one growth bit (“g” bit) as its old subnet address of 10 is now unique again. The following example shows four subnetworks within the 192.6.12 network along with the netconf entries necessary to configure these subnetworks with variable-length subnet masks. Note that there are four different subnet masks used in this network. Also note that the subnet numbers in the network map correspond to the mirror image subnet numbers listed in Table 6-7 “Mirror Image Counting”. The subnet numbers shown below correspond to the subnets show in the network map in Figure 6-13 “Network Map with Variable-Length Subnets”. In this example of mirror image counting, the first subnet has 6 hosts (with space allocated for a maximum of 6 hosts), the second subnet has 60 hosts (with space allocated for a maximum of 62 hosts), the third subnet has 30 hosts (with space allocated for a maximum of 30 hosts), and the fourth subnet has 14 hosts (with space allocated for a maximum of 16 hosts). Notice how the range of numbers (129-135, 65-127,193-223, and 33-47) is spread out to allow room for additional growth in each case. Table 6-11 Variable-Length Subnet Addressing in a Class C Network
Summary network information:
This sample network combines networks, subnets with variable-length subnet masks, and clusters previously described and illustrated in this chapter. Note that the subnet masks for each IP address are shown on the accompanying worksheet. Table 6-12 Network Map II Worksheet
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||