With the classic IP address, the addresses were divided into address classes. Depending on the class, there were address classes A, B and C with allocated address spaces, the host identifier comprised 24 bits, 16 bits and 8 bits. This meant 16,777,216 (24 bit), 65,534 (16 bit) or 256 (8 bit) host identifiers.
With the introduction of Classless Interdomain Routing( CIDR) in the IPv4 protocol, the class division was abolished and between one and 256 x 16,777,216 (Class A) host addresses could be assigned. There was then even more freedom with the IPv6 address, which has a scope of 128 bits.