All IP addresses have a network and host portion. In classful addressing, the network portion ends on one of the separating dots in the address (on an octet boundary). Classful addressing divides an IP address into the Network and Host portions along octet boundaries.In the classful addressing system all the IP addresses that are available are divided into the five classes A,B,C,D and E, in which class A,B and C address are frequently used because class D is for Multicast and is rarely used and class E is reserved and is not currently used.
Classless addressing uses a variable number of bits for the network and host portions of the address.
IP address as a 32 bit stream of ones and zeroes, where the boundary between network and host portions can fall anywhere between bit 0 and bit 31.Classless addressing system is also known as CIDR(Classless Inter-Domain Routing).Classless addressing is a way to allocate and specify the Internet addresses used in inter-domain routing more flexibly than with the original system of Internet Protocol (IP) address classes.CIDR (Classless Internet Domain Routing), defines arbitrarily-sized subnets solely by base address and number of significant bits in the address. A CIDR address of 192.168.0.0/24 defines a block of addresses in the range 192.168.0.0 through 192.168.0.255, while 192.168.0.0/20 would define a network 16 times as large - from 192.168.0.0 through 192.168.15.255.
|<-------- 28 bits Network ------->||4 bits host|