Introduction of address classes
Expansion of the network had to ensure compatibility with the existing address space and the Internet Protocol (IP) packet structure, and avoid the renumbering of the existing networks. The solution was to expand the definition of the network number field to include more bits, allowing more networks to be designated, each potentially having fewer hosts. All existing network numbers at the time were smaller than 64, they only used the 5 least-significant bits of the network number field. Thus it was possible to use the most-significant 3 bits of an address to introduce a set of address classes and preserve the existing network numbers in one of these classes.
The first class, designated as Class A, contained all addresses in which the most significant bit is zero. The network number for this class is given by the next 7 bits, therefore accommodating 128 networks in total, including the zero network, and including the existing IP networks already allocated. A Class B network was a network in which all addresses had the two most-significant bits set to 1 and 0. For these networks, the network address was given by the next 14 bits of the address, thus leaving 16 bits for numbering host on the network for a total of 65,536 addresses per network. Class C was defined with the 3 high-order bits set to 1, 1, and 0, and designating the next 21 bits to number the networks, leaving each network with 256 local addresses.
This addressing scheme is illustrated in the following table:
|Size of Network
Number Bit field
|Size of Rest
|Start address||End address|
|Class A||0||8||24||128 (27)||16,777,216 (224)||0.0.0.0||127.255.255.255|
|Class B||10||16||16||16,384 (214)||65,536 (216)||18.104.22.168||22.214.171.124|
|Class C||110||24||8||2,097,152 (221)||256 (28)||192.0.0.0||126.96.36.199|
|Class D (multicast)||1110||not defined||not defined||not defined||not defined||188.8.131.52||184.108.40.206|
|Class E (reserved)||1111||not defined||not defined||not defined||not defined||240.0.0.0||255.255.255.255|
The number of addresses usable for addressing specific hosts in each network is always 2N – 2 (where N is the number of rest field bits, and the subtraction of 2 adjusts for the use of the all-bits-zero host portion for network address and the all-bits-one host portion as a broadcast address. Thus, for a Class C address with 8 bits available in the host field, the number of hosts is 254.
Today, IP addresses are associated with a subnet mask. This was not required in a classful network because the mask was implicitly derived from the IP address itself. Any network device would inspect the first few bits of the IP address to determine the class of the address.
In the following table:
- n indicates a binary slot used for network ID.
- H indicates a binary slot used for host ID.
- X indicates a binary slot (without specified purpose)
Class A 0. 0. 0. 0 = 00000000.00000000.00000000.00000000 127.255.255.255 = 01111111.11111111.11111111.11111111 0nnnnnnn.HHHHHHHH.HHHHHHHH.HHHHHHHH Class B 128. 0. 0. 0 = 10000000.00000000.00000000.00000000 220.127.116.11 = 10111111.11111111.11111111.11111111 10nnnnnn.nnnnnnnn.HHHHHHHH.HHHHHHHH Class C 192. 0. 0. 0 = 11000000.00000000.00000000.00000000 18.104.22.168 = 11011111.11111111.11111111.11111111 110nnnnn.nnnnnnnn.nnnnnnnn.HHHHHHHH Class D 224. 0. 0. 0 = 11100000.00000000.00000000.00000000 22.214.171.124 = 11101111.11111111.11111111.11111111 1110XXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX Class E 240. 0. 0. 0 = 11110000.00000000.00000000.00000000 255.255.255.255 = 11111111.11111111.11111111.11111111 1111XXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX Sumber : IP classes)