IPv4 - classful addressing

Classful IP addressing is the method for subnetting that was initially used when IPv4 was initially created. This simplified subnetting since each specific range of addresses could only have a specific subnet size. So you knew that the 15.22.5.5 address must have a subnet mask of 255.0.0.0 and 201.56.89.89 must have a subnet mask of 255.255.255.0.

Classes are defined based on the leading bits. For example, all class A addresses begin with a binary 0. All calls B addresses begin with a binary 10. Similarly, each class has been assigned a different "network portion" and "host portion" size. Class A uses 8 bits for the network portion of the address, and 24 bits for the host portion. This is defined by the subnet mask of 255.0.0.0.

Details of these leading bits and the resulting address spaces can be seen in the table below.

ClassLeading Bitsnetwork portion sizehost portion sizenumber of networksnumber of hostsstart addressend addresssubnet mask
A0824126167772140.0.0.0127.255.255.255255.0.0.0
B1016161638465534128.0.0.0191.255.255.255255.255.0.0
C1102482097152256192.0.0.0223.255.255.255255.255.255.0
D1110not definednot defined--224.0.0.0239.255.255.255not defined
E1111not definednot defined--240.0.0.0255.255.255.255not defined

This scheme was not scalable, so classless addressing was introduced.

https://networklessons.com/subnetting/what-is-subnetting