Planning Classless IP Addressing

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

Classless IP addressing makes traditional classful IP addressing methods — restricted to the standard IP address classes in their default formats — out of date for enterprise networks. Of the five address classes, Class A, B, and C addresses, collectively known as IPv4 unicast addresses, are assigned to specific devices on an IPv4 network. Class D addresses, known as multicast addresses, are used for IP multicasting (simultaneously sending a message to more than one network destination). Class E addresses are reserved for experimental purposes.

To be able to use subnetting or supernetting, you must first understand the default formats of the unicast addresses. Unicast addresses have the following formats:

  • All 32-bit IPv4 addresses contain four octets of 8 bits each, often represented as four decimal numbers separated by dots (known as dotted decimal notation).

  • In Class A addresses, the first byte, or octet, represents the network ID, and the three remaining bytes are used for node addresses.

  • In Class B addresses, the first 2 bytes represent the network ID, and the last 2 bytes are used for nodes.

  • In Class C addresses, the first 3 bytes are used for the network ID, and the final byte is used for nodes.

Without some means of subdividing class-designated networks, all available IP addresses would have been depleted long ago. Classless IP addressing, which allows subnetting, was developed to handle this problem.

Determining the Number of Subnets and Hosts

To better use the address space, instead of using the unicast addresses in their default formats, you can use subnet addressing, which lets you "borrow" additional bits from the host part of the address to divide the network into subnets. In subnetting, the subnet mask consists of the octets assigned to the network plus the bits added for the subnet. You can use subnet mask notation to indicate these leftmost contiguous bits.

For example, for a Class B address, which has a default subnet mask of 255.255.0.0, you might allocate an additional 8 bits for subnets. That is, for a Class B address such as 131.107.65.37, you can use the following subnet mask, shown in both decimal and binary notation.

Subnet Mask in Decimal Notation Subnet Mask in Binary Notation

255.255.255.0

11111111 11111111 11111111 00000000

By using 8 host bits for subnetting, you obtain 256 (that is, 28) subnetted network IDs (subnets), supporting as many as 254 hosts per subnet. The number of hosts per subnet is 254 because 8 bits (28 minus 2) are reserved for the host ID. You subtract 2 because subnetting rules exclude the host IDs consisting of all ones or all zeros.

An alternative to subnet mask notation is the network prefix length notation. A network prefix is shorthand for a subnet mask, expressing the number of high-order bits that constitute the subnetted network ID portion of the address in the format <IP address>/<# of bits>, where # of bits defines the network/subnet part of the IP address, and the remaining bits represent the host ID portion of the address.

The following is the network prefix length notation for the Class B address in the previous example:

131.107.65.37/24

The bit notation "/24" refers to the number of high-order bits set to 1 in the binary notation for the subnet mask, leaving 8 bits for hosts (the eight bits set to 0).

Note

  • IPv6 supports only network prefix length notation. It does not support dotted decimal subnet masks. For more information about IPv6, see "Introducing IPv6 on Your Network" later in this chapter.

By contrast, if you anticipate needing only 32 subnets rather than 256, each of the 32 subnets can support as many as 2,046 hosts (211 minus 2). That subnet mask has the following decimal and binary notations.

Subnet Mask in Decimal Notation Subnet Mask in Binary Notation

255.255.248.0

11111111 11111111 11111000 00000000

The following network prefix length notation indicates the 21 bits needed to create as many as 32 subnets:

131.107.65.37/21.

Again, "/21" indicates the number of high-order bits set to 1 in binary notation, leaving 11 bits (the 11 zeros) for the host ID portion of the address.

To determine the appropriate number of subnets versus hosts for your organization’s network, consider the following:

  • More subnets. Allocating more host bits for subnetting supports more subnets but fewer hosts per subnet.

  • More hosts. Allocating fewer host bits for subnetting supports more hosts per subnet, but limits the growth in the number of subnets.

For an introduction to TCP/IP, including information about subnetting, see the Networking Collection of the Windows Server 2003 Technical Reference (or see the Networking Collection on the Web at https://www.microsoft.com/reskit).