Assignment of Address Classes in the IP Version Four (IPV4) Specifications
Origins of Internet Protocol Version Four Addresses
The origins of the current implementation of the Internet Protocol (IP Version 4 or IPV4) and its associated classes of IP addressing can be traced to RFC 791: Internet Protocol (September 1981). As originally envisioned, these IP addresses were to be of fixed, 32-bit (4 Octets) length comprised of a Network Number and a Local Address or Host Number. The resulting range of addresses were then divided into three broad groupings or “Classes”, each based upon the bit values within the first octet:
Class A – high order bit is “0”, the remaining 7 bits are the network, and the last 24 bits are the host
Class B – high order two bits are “10”, the remaining 14 bits are the network, and the last 16 bits are the host
Class C – high order three bits are “110”, the remaining 21 bits are the network, and the last 8 bits are the host
*Note: There are two additional classes of IPV4 addressing, know as Class D & E that were specified in subsequent RFC’s. These additional classes were intended for highly specialized functions and are identified as follows:
Class D – high order four bits are “1110”, the remaining 20 bits identify the Multicast group
Class E – high order five bits are “11110”, the remaining bits are reserved for experimental use
These two specialized classes of address are outside the scope of this article and will be addressed in a later Technical Compendium article.
The Roll of Masking in Determining Address Class
Implied within RFC 791, was the concept of “Masking”, be used by Routers and Hosts. The masks were defined as follows:
- Class A mask = 255.0.0.0
- Class B mask = 255.255.0.0
- Class C mask = 255.255.255.0
*Note: These three original masks are often to as “Class A, B, C” or “Default” subnet masks. Details regarding the rolls of subnet masking are covered in the Technical Compendium articles “IP Address Construction: Dotted Decimal Notation, Subnet Masking, Creating Subnets, Special Subnet Masks and VLSM – Variable Length Subnet Masking”.
These masks were applied by default based on the value of the leading bits in the IP address. If an address started with a binary 0, then stations assumed Class A masking. The starting bits 10 indicated Class B, and 110 indicated Class C. Consequently, the class of addressing masking being used could be determined by looking at the first octet in the address as shown below:
- Class A starts with 0 and ends with 0111 1111, hence the smallest value in the first octet is decimal 0 and the largest value is 127 yielding a potential range of 0-127.
- Class B starts with 10 and ends with 1011 1111, hence the smallest value in the first octet is decimal 128 and the largest value is 191 yielding a potential range of 128-191.
- Class C starts with 110 and ends with 1101 1111, hence the smallest value in the first octet is decimal 192 and the largest value is 223 yielding a potential range of 192-223.
- Class D (Reserved Multicast) starts with 1110 and ends with 1110 1111, hence the smallest value in the first octet is decimal 224 and the largest value is 239 yielding a potential range of 224-239.
- Class E (reserved Experimental) starts with 1111 and ends with 1111 1111, hence the smallest value in the first octet is decimal 240 and the largest value is 255 yielding a potential range of 240-255.
Some practical Examples of IP addressing –
- A station with address 10.2.3.4 would be an example of a Class A address. The default mask for this station would be 255.0.0.0. The network identifier would be 10.0.0.0 (after applying the mask to the address) and the Host identifier would therefore be 2.3.4.
- A station with address 184.108.40.206 would be an example of a Class B address. The default mask for this station would be 255.255.0.0. The network identifier would be 220.127.116.11 (after applying the mask to the address) and the Host identifier would therefore be 15.3.
- A station with address 18.104.22.168 would be an example of a Class C address. The default mask for this station would be 255.255.255.0. The network identifier would be 22.214.171.124 (after applying the mask to the address) and the Host identifier would therefore be 8.
Determining The Number of Networks and Hosts in Each Class
Notice that this division of addressing into these three classes allows for the following potential number of addresses:
- Class A
- 8 bits in the Network part, 24 bits in the Host part
- 2^8 or 128 possible values in the Network part and 2^24 or 16777216 possible values in the Host part
- Class B
- 16 bits in the Network part, 16 bits in the Host par
- 2^16 or 65536 possible values in the Network part and 2^16 or 65536 possible values in the Host part
- Class C
- 24 bits in the Network part, 8 bits in the Host part
- 2^24 or 16777216 possible values in the network part and 256 values in the node part.
(Now, before you do the math on your own, let’s work through the actual number of networks and hosts or nodes in each address class. First of all, realize that the number of values in a field is determined by raising the number2 to the exponential power determined by the number of bits in the field. Consequently we find:
2, raised to the 24th power: 224 = 16777216
2, raised to the 16th power: 216 = 65536
2, raised to the 8th power: 28 = 256)
*Note: The above values represent a maximum theoretical number of Network and Host addresses. AS we are about to examine, there are a number of factors that directly effect the true number of available addresses.
Factors Affecting Availible Address Values
As previously mentioned, there are a number of factors that have an in pact upon the available number of Network and Host addresses actually available within each address class:
1. Overlapping Bit Values: Foremost among these is the simple fact that bit values used for one class may NOT be used for the subsequent class(es):
- Recall that for a Class A Network address, the Network identifier is 8 bits, however the first bit must always be zero, so that leaves only 7 bits to differentiate, so there are 2^7=128 possible class A Networks.
- For a Class B Network address, the Network identifier is 16 bits, but the first two must be 10, so that leaves only 14 bits to differentiate, so there are 2^14=16384 possible Class B Networks.
- For a Class C Network address, the Network Identifier is 24 bits, however, the first three must be 110, leaving only 21 bits to differentiate, so there are 2^21= 2,097,152 possible Class C Network addresses.
2. Reserved Broadcast Numbers: Additionally, there are two values in each set that will not be available. When the network or node portion of an IP address is set to all “1”s (ie, decimal 255 or hex FF) it indicates that this is a broadcast destination. There is also an older form of the broadcast address, from the UNIX environment, that used all “0”s. Although this form is considered obsolete it still may exist in some sites.
*Note: If you encounter a station that is still using zero’s as a broadcast address you should reconfigure it (after you confirm that it really isn’t being used by some alien system!).
Also, within the UNIX environment the configuration of a station includes specification of the correct broadcast address to use. A UNIX administrator might type “ifconfig broadcast 126.96.36.199” to specify the broadcast address for station 188.8.131.52. Other environments may allow only the use of the default values or may offer other ways of configuring the broadcast address.
Therefore, for each range of values, you must subtract 2 to arrive at the number of potential values that are available.
Summary of Actual Network and Host Values
All of this math can get more than a bit confusing, so the following chart summarizes the results of all of the mathematical manipulations and lists the available Network and Host addresses for each of the IPV4 Classes of Addressing:
|Address Class||Range||Leading Bits||Implied Mask / Host Bits / Hosts|
|Class A||000 – 127||0000 0000 – 0111 1111||255.XXX.XXX.XXX|
|0/127 Reserved, 126 Networks Possible|
|16,711,680 Hosts Possible|
|Class B||128 – 191||1000 0000 – 1011 1111||255.255.XXX.XXX|
|16,382 Networks Possible|
|65,536 Hosts Possible|
|Class C||192 – 223||1100 0000 – 1101 1111||255.255.255.XXX|
|2,097,150 Networks Possible|
|0/255 reserved, 254 Hosts Possible|
|Class D||224 – 239||1110 0000 – 1110 1111||Reserved Network Multicast|
|Class E||240 – 247||1111 0000 – 1111 0111||Reserved For Experimental|
Additional Related Topics:
There are a number of topics that are directly related to the material contained within this article. The following is a partial listing of some related topics:
1. Technical Compendium articles:
- IP Address Construction: Dotted Decimal Notation
- Subnet Masking
- Creating Subnets
- Special Subnet Masks
- VLSM – Variable Length Subnet Masking”.
- Reserved Address List
2. Request For Comments (RFC’s):
- RFC 791: Internet Protocol (September 1981)
- RFC 917: Internet Subnets (October 1984)
- RFC 940: Toward an Internet Standard Scheme for Subnetting (April 1985)
- RFC 950: Internet Standard Subnetting Procedure (Aug 1985)
- RFC 1219: On the Assignment of Subnet Numbers (April 1991)