Pv4 Address Formats

IP was standardized in September 1981. Its address architecture was as forward looking as could be expected given the state of computing at that time. The basic IP address was a 32-bit binary number that was compartmentalized into four 8-bit binary numbers, or octets.

To facilitate human usage, IP's machine-friendly binary addresses were converted into a more familiar number system: base 10. Each of the four octets in the IP address is represented by a decimal number, from 0 to 255, and separated by dots (.). This is known as a dotted-decimal format. Therefore the lowest possible value that can be represented within the framework of an IPv4 address is, and the highest possible value is Both of these values, however, are reserved and cannot be assigned to individual end systems. The reason for this requires an examination of the way that the IETF implemented this basic address structure in their protocol.

The dotted-decimal IPv4 address was then broken down into classes to accommodate large-, medium-, and small-sized networks. The differences between the classes were the number of bits allocated to network versus host addresses. There are five classes of IP addresses, identified by a single alphabetic character: Class A, B, C, D, and E. Each address consists of two parts, a network address and a host address. The five classes represent different compromises between the number of supportable networks and hosts.

Class A Addresses

The Class A IPv4 address was designed to support extremely large networks. As the need for very large-scale networks was perceived to be minimal, an architecture was developed that maximized the possible number of host addresses but severely limited the number of possible Class A networks that could be defined.

A Class A IP address uses only the first octet to indicate the network address. The remaining three octets enumerate host addresses. The first bit of a Class A address is always a 0. This mathematically limits the possible range of the Class A address to 127, which is the sum of 64 + 32 + 16 + 8 + 4 + 2 + 1. The leftmost bit's decimal value of 128 is absent from this equation. Therefore, there can only ever be 127 possible Class A IP networks.

The last 24 bits (that is, three dotted-decimal numbers) of a Class A address represent possible host addresses. The range of possible Class A network addresses is from to Notice that only the first octet bears a network address number. The remaining three are used to create unique host addresses within each network number. As such, they are set to zeroes when describing the range of

Understanding Internetwork Addresses network numbers.

Note Technically, is also a Class A network address. However, it is reserved for loop-back testing and cannot be assigned to a network.

Each Class A address can support 16,777,214 unique host addresses. This value is calculated by multiplying 2 to the 24th power and then subtracting 2. Subtracting 2 is necessary because IP reserved the all 0s address for identifying the network and the all 1s address for broadcasting within that network. Figure 2-2 presents the proportion of network to host octets.

Figure 2-2: Class A address architecture.

Figure 2-2: Class A address architecture.

Class B Addresses

The Class B addresses were designed to support the needs of moderate- to large-sized networks. The range of possible Class B network addresses is from to

The mathematical logic underlying this class is fairly simple. A Class B IP address uses two of the four octets to indicate the network address. The other two octets enumerate host addresses. The first 2 bits of the first octet of a Class B address are 10. The remaining 6 bits may be populated with either 1s or 0s. This mathematically limits the possible range of the Class B address space to 191, which is the sum of 128 + 32 + 16 + 8 + 4 + 2 + 1.

The last 16 bits (two octets) identify potential host addresses. Each Class B address can support 65,534 unique host addresses. This number is calculated by multiplying two to the 16th power and subtracting two (values reserved by IP). Mathematically, there can only be 16,382 Class B networks defined.

Figure 2-3 presents the proportion of network to host octets. Figure 2-3: Class B address architecture.

Figure 2-3 presents the proportion of network to host octets. Figure 2-3: Class B address architecture.

Class C Addresses

The Class C address space is, by far, the most commonly used of the original IPv4 address classes. This address space was intended to support a lot of small networks. This address class can be thought of as the inverse of the Class A address space. Whereas the Class A space uses just one octet for network numbering, and the remaining three for host numbering, the Class C space uses three octets for networking addressing and just one octet for host numbering.

The first 3 bits of the first octet of a Class C address are 110. The first 2 bits sum to a decimal value of 192 (128 + 64). This forms the lower mathematical boundary of the Class C address space. The third bit equates to a decimal value of 32. Forcing this bit to a value of 0 establishes the upper mathematical boundary of the address space. Lacking the capability to use the third digit limits the maximum value of this octet to 255 - 32, which equals 223. Therefore, the range of possible Class C network addresses is from to

The last octet is used for host addressing. Each Class C address can support a theoretical maximum of 256 unique host addresses (0 through 255), but only 254 are usable because 0 and 255 are not valid host numbers. There can be 2,097,150 different Class C network numbers.

Note In the world of IP addressing, 0 and 255 are reserved host address values. IP addresses that have all their host address bits set equal to 0 identify the local network. Similarly, IP addresses that have all their host address bits set equal to 255 are used to broadcast to all end systems within that network number.

Figure 2-4 presents the proportion of network to host octets. Figure 2-4: Class C address architecture.

Figure 2-4 presents the proportion of network to host octets. Figure 2-4: Class C address architecture.

Class D Addresses

The Class D address class was created to enable multicasting in an IP network. The Class D multicasting mechanisms have seen only limited usage. A multicast address is a unique network address that directs packets with that destination address to predefined groups of IP addresses. Therefore, a single station can simultaneously transmit a single stream of datagrams to multiple recipients. The need to create separate streams of datagrams, one for each destination, is eliminated. Routers that support multicasting would duplicate the datagram and forward as needed to the predetermined end systems. Multicasting has long been deemed a desirable feature in an IP network because it can substantially reduce network traffic.

The Class D address space, much like the other address spaces, is mathematically constrained. The first 4 bits of a Class D address must be 1110. Presetting the first 3 bits of the first octet to 1s means that the address space begins at 128 + 64 + 32, which equals 224. Preventing the fourth bit from being used means that the Class D address is limited to a maximum value of 128 + 64 + 32 + 8 + 4 + 2 + 1, or 239. Therefore, the Class D address space ranges from to

This range may seem odd because the upper boundary is specified with all four octets. Ordinarily, this would mean that the octets for both host and network numbers are being used to signify a network number. There is a reason for this! The Class D address space isn't used for internetworking to individual end systems or networks. Class D addresses are used for delivering multicast datagrams within a private network to groups of IP-addressed end systems. Therefore, there isn't a need to allocate octets or bits of the address to separate network and host addresses. Instead, the entire address space can be used to identify groups of IP addresses (Classes A, B, or C). Today, numerous other proposals are being

Understanding Internetwork Addresses developed that would allow IP multicasting without the complexity of a Class D address space. Figure 2-5 presents the proportion of network to host octets.

Figure 2-5: Class D address architecture.

Hosl portion





A Class E address has been defined, but is reserved by the IETF for its own research. Therefore, no Class E addresses have been released for use in the Internet. The first 4 bits of a Class E address are always set to 1s; therefore, the range of valid addresses is from to Given that this class was defined for research purposes, and its use is limited to inside the IETF, it is not necessary to examine it any further.

Inefficiencies in the System

The large gaps between these address classes have wasted a considerable number of potential addresses over the years. Consider, for example, a medium-sized company that requires 300 IP addresses. A single Class C address (254 addresses) is inadequate. Using two Class C addresses provides more than enough addresses but results in two separate domains within the company. This increases the size of the routing tables across the Internet: One table entry is required for each of the address spaces, even though they belong to the same organization.

Alternatively, stepping up to a Class B address provides all the needed addresses within a single domain but wastes 65,234 addresses. Too frequently, a Class B was handed out whenever a network supported more than 254 hosts. Therefore, the Class B address space approached depletion more rapidly than the other classes.

Perhaps the most wasteful practice was that address spaces were handed out on request. Any organization that wanted an address space just requested one. No attempts to verify need were made. Consequently, many organizations locked up substantial portions of the IPv4 address space as a hedge against some unseen, unspecified future need.

Fortunately, this is no longer the case. Numerous extensions to IP have been developed that are specifically designed to improve the efficiency with which the 32-bit address space can be used. Three of the more important of these are the following:

These are very different mechanisms that were designed to solve different problems. Subnet masks, both fixed and variable length, were developed to accommodate the multiple logical networks that might exist within a physical site that connects to the Internet. CIDR was developed to eliminate the inefficiency inherent in the original, rigid address classes. This enabled routers in the Internet to more efficiently aggregate many different network addresses into a single routing table entry. It is important to note that these two mechanisms are not mutually exclusive; they can and should be used together.

Note Managing the Address Space

The Internet's stability directly depends on the uniqueness of publicly used network addresses. Therefore, some mechanism was needed to ensure that addresses were, in fact, unique. This responsibility originally rested within an organization known as the InterNIC (Internet Network Information Center). This organization is now defunct and has been succeeded by the Internet Assigned Numbers Authority (IANA). IANA carefully manages the remaining supply of IPv4 addresses to ensure that duplication of publicly used addresses does not occur. Such duplication would cause instability in the Internet and compromise its capability to deliver datagrams to networks using the duplicated addresses.

Another important goal served by this careful husbandry of the address space is that the rate of depletion of the address space (which fostered the development of IPv6) has slowed considerably. Consequently, the IPv4 address space is expected to remain adequate for many years to come.

Although it is entirely possible for a network administrator to arbitrarily select unregistered IP addresses, this practice should not be condoned. Computers having such spurious IP addresses can only function properly within the confines of their domain. Interconnecting networks with spurious addresses to the Internet incurs the risk of conflicting with an organization that has legitimate claim to that address space. Duplicated addresses will cause routing problems and potentially hinder the Internet's capability to deliver datagrams to the correct network.

0 0

Post a comment