zurück vorwärts Inhalt Stichwörter

Subnet Example #2


Subnet Example #2

Given
An organization has been assigned the network number 140.25.0.0/16 and it needs to create a set of subnets that supports up to 60 hosts on each subnet.

Defining the Subnet Mask / Extended-Prefix Length
The first step is to determine the number of bits required to define 60 hosts on each subnet. Since a block of host address can only be assigned along binary boundaries, host address blocks can only be created in powers of two.This means that it is impossible to create a block that contains exactly 60 host addresses. To support 60 hosts, the network administrator must define a minimum address block of 62 (2 6 -2) host addresses. However, this choice would only provide two unused host addresses on each subnet for future growth. Since this does not appear to be adequate to support additional growth, the network administrator elects to define a block of 126 (2 7 -2) host addresses and has 66 addresses on each subnet for future growth. A block of 126 host addresses requires 7-bits in the host-number field.

The next step is to determine the subnet mask/extended-prefix length. Since 7-bits of the 32-bit IP address are required for the host-number field, the extended-prefix must be a /25 (25 = 32-7). A 25-bit extended-network-prefix can be expressed in dotted-decimal notation as 255.255.255.128. This is illustrated in Figure 14.

ipadf14.gif (2k)

Figure 14: Example #2 - Defining the Subnet Mask/Extended-Prefix Length

Figure 14 shows that the 25-bit extended-prefix assigns 9-bits to the subnet number field. Since 2 9 = 512, nine bits allow the definition of 512 subnets. Depending on the organization's requirements, the network administrator could have elected to assign additional bits to the host-number field (allowing more hosts on each subnet) and reduce the number of bits in the subnet-number field (decreasing the total number of subnets that can be defined).

Although this example creates a rather large number of subnets, it provides an interesting example because it illustrates what happens to the dotted-decimal representation of a subnet address when the subnet-number bits extend across an octet boundary. It should be mentioned that the same type of confusion can also occur when the host-number bits extend across an octet boundary.

Defining Each of the Subnet Numbers
The 512 subnets will be numbered 0 through 511. The 9-bit binary representation of the decimal values 0 through 511 are: 0 (0000000002 ), 1 (0000000012 ), 2 (0000000102 ), 3 (0000000112 ), ..., 511 (1111111112 ). To define subnet #3, the network administrator places the binary representation of 3 (0000000112 ) into the 9-bits of the subnet-number field.
The 512 subnet numbers for this example are given below. The italicized portion of each address identifies the extended-network-prefix, while the bold digits identify the 9- bits representing the subnet-number field:

Base Net: 10001100.00011001 .00000000.00000000 = 140.25.0.0/16
Subnet #0: 10001100.00011001.00000000.00000000 = 140.25.0.0/25
Subnet #1: 10001100.00011001.00000000.10000000 = 140.25.0.128/25
Subnet #2: 10001100.00011001.00000001.00000000 = 140.25.1.0/25
Subnet #3: 10001100.00011001.00000001.10000000 = 140.25.1.128/25
Subnet #4: 10001100.00011001.00000010.00000000 = 140.25.2.0/25
Subnet #5: 10001100.00011001.00000010.10000000 = 140.25.2.128/25
Subnet #6: 10001100.00011001.00000011.00000000 = 140.25.3.0/25
Subnet #7: 10001100.00011001.00000011.10000000 = 140.25.3.128/25
Subnet #8: 10001100.00011001.00000100.00000000 = 140.25.4.0/25
Subnet #9: 10001100.00011001.00000100.10000000 = 140.25.4.128/25
 .
 .
Subnet #510: 10001100.00011001.11111111.00000000 = 140.25.255.0/25
Subnet #511: 10001100.00011001.11111111.10000000 = 140.25.255.128/25

Notice how sequential subnet numbers do not appear to be sequential when expressed in dotted-decimal notation. This can cause a great deal of misunderstanding and confusion since everyone believes that dotted-decimal notation makes it much easier for human users to understand IP addressing. In this example, the dotted-decimal notation obscures rather than clarifies the subnet numbering scheme!

Defining Hosts Addresses for Each Subnet
In this example there are 7 bits in the host-number field of each subnet address. As discussed earlier, this means that each subnet represents a block of 126 host addresses. The hosts on each subnet will be numbered 1 through 126.

The valid host addresses for Subnet #3 are given below. The italicized portion of each address identifies the extended-network-prefix, while the bold digits identify the 7-bit host-number field:

Subnet #3 : 10001100.00011001.00000001.10000000 = 140.25.1.128/25
Host #1   : 10001100.00011001.00000001.10000001 = 140.25.1.129/25
Host #2   : 10001100.00011001.00000001.10000010 = 140.25.1.130/25
Host #3   : 10001100.00011001.00000001.10000011 = 140.25.1.131/25
Host #4   : 10001100.00011001.00000001.10000100 = 140.25.1.132/25
Host #5   : 10001100.00011001.00000001.10000101 = 140.25.1.133/25
Host #6   : 10001100.00011001.00000001.10000110 = 140.25.1.134/25
 .
 .
Host #62  : 10001100.00011001.00000001.10111110 = 140.25.1.190/25
Host #63  : 10001100.00011001.00000001.10111111 = 140.25.1.191/25
Host #64  : 10001100.00011001.00000001.11000000 = 140.25.1.192/25
Host #65  : 10001100.00011001.00000001.11000001 = 140.25.1.193/25
 .
 .
Host #123: 10001100.00011001.00000001.11111011 = 140.25.1.251/25
Host #124: 10001100.00011001.00000001.11111100 = 140.25.1.252/25
Host #125: 10001100.00011001.00000001.11111101 = 140.25.1.253/25
Host #126: 10001100.00011001.00000001.11111110 = 140.25.1.254/25

Defining the Broadcast Address for Each Subnet
The broadcast address for Subnet #3 is the all 1's host address or:

10001100.00011001.00000001.11111111 = 140.25.1.255

As is true in general, the broadcast address for Subnet #3 is exactly one less than the base address for Subnet #4 (140.25.2.0).

Additional Practice with Subnetworks
Please turn to Appendix C for practice exercises to further your understanding of subnetting.

vorwärts Inhalt Stichwörter