Windows 7 / Networking

Configure IPv4 and IPv6 addressing

Server administrators must be familiar with the basic principles of the IPv4 and IPv6 address spaces. This section reviews those principles, and describes the usual process for designing IPv4 and IPv6 addressing strategies.

This objective covers how to:

  • Configure IP address options
  • Configure subnetting
  • Configure supernetting
  • Configure interoperability between IPv4 and IPv6
  • Configure ISATAP
  • Configure Teredo

IPv4 addressing

The IPv4 address space, as you probably know, consists of 32-bit addresses, notated as four 8-bit decimal values from 0 to 255, separated by periods, as in the example 192.168.43.100. This is known as dotted-decimal notation, and the individual 8-bit decimal values are called octets or bytes.

Each address consists of network bits, which identify a network, and host bits, which identify a particular device on that network. To differentiate the network bits from the host bits, each address must have a subnet mask.

A subnet mask is another 32-bit value consisting of binary 1 bits and 0 bits. When compared to an IP address, the bits corresponding to the 1s in the mask are the network bits, and the bits corresponding to the 0s are the host bits. Thus, if the 192.168.43.100 address mentioned earlier has a subnet mask of 255.255.255.0 (which in binary form is 11111111.11111111.11111111.00000000), the first three octets (192.168.43) identify the network and the last octet (100) identifies the host.

IPv4 classful addressing

Because the subnet mask associated with IP addresses can vary, so can the number of bits used to identify the network and the host.

The original Internet Protocol (IP) standard defines three classes of IP addresses, which provide support for networks of different sizes.

The number of networks and hosts supported by each of the address classes are listed in Table-1.

TABLE-1 IPv4 address classes

IP ADDRESS CLASS		    CLASS A	CLASS B	  CLASS C
First bit values (binary)	    0           10	  110
First byte value (decimal)	    0-127	128-191	  192-223
Number of network identifier bits   8           16	  24
Number of host identifier bits	    24          16	  8
Number of possible networks	    126         16,384	  2,097,152
Number of possible hosts	    16,777,214  65,534	  254
Note: In addition to Classes A, B, and C, the IP standard also defines two additional address classes, Class D and Class E. Class D addresses begin with the bit values 1110, and Class E addresses begin with the values 11110. The Internet Assigned Numbers Authority (IANA) has allocated Class D addresses for use as multicast identifiers. A multicast address identifies a group of computers on a network, all of which possess a similar trait. Multicast addresses enable TCP/IP applications to send traffic to computers that perform specific functions (such as all the routers on the network), even if they're located on different subnets. Class E addresses are defined as experimental and are as yet unused.

The "First bit value" row in the table specifies the values that the first one, two, or three bits of an address in each class must have. Early TCP/IP implementations used these bit values instead of a subnet mask to determine the class of an address. The binary values of the first bits of each address class limit the possible decimal values for the first byte of the address. For example, because the first bit of Class A addresses must be 0, the possible binary values of the first byte in a Class A address range from 00000000 to 01111111, which in decimal form are values ranging from 1 to 127. Thus, when you see an IP address in which the first byte is a number from 1 to 127, you know that this is a Class A address.

In a Class A address, the network identifier is the first 8 bits of the address and the host identifier is the remaining 24 bits. Thus, there are only 126 possible Class A networks (network identifier 127 is reserved for diagnostic purposes), but each network can have up to 16,777,214 network interface adapters on it. Class B and Class C addresses devote more bits to the network identifier, which means that they support a greater number of networks, but at the cost of having fewer host identifier bits. This trade-off reduces the number of hosts that can be created on each network.

The values Table-1 for the number of hosts supported by each address class might appear low. For example, an 8-bit binary number can have 256 (that is, 28) possible values, not 254, as shown in the table for the number of hosts on a Class C address. The value 254 is used because the original IP addressing standard states that you can't assign the "all zeros" or "all ones" addresses to individual hosts. The "all zeros" address identifies the network, not a specific host and the "all ones" identifier always signifies a broadcast address. You cannot assign either value to an individual host. Therefore, to calculate the number of possible network or host addresses you can create with a given number of bits, you use the formula 2x -2, where x is the number of bits.

[Contents] [Next]