Classful addressing divides the address space for IPv4 into five address classes. Each class, coded in the first four bits of the address, defines either a different network size, i.e. number of hosts for unicast addresses (classes A, B, C), or a multicast network (class D). The fifth class (E) address is now IPv6.
Class Leading bits Size of network number bit field Size of rest bit field Number of networks
Class A 0 8 24 128 16,777,216
Class B 10 16 16 16,384 65,536
Class C 110 24 8 2,097,152 256
Class D (multicast) 1110 not defined not defined not defined not defined
Class E (reserved) 1111 not defined not defined not defined not defined
The above approach was fine however the problem was quick exhaust of the IPv4 address which was a precious resources and in 1993 IETF published the new RFCs 1518 and 1519 which describes the new way of allocation of IP address and routing method of the IP packet.