I'm reading this on AWS:
What is CIDR?
Classless Inter-Domain Routing (CIDR) is an IP address allocation method that improves data routing efficiency on the internet. Every machine, server, and end-user device that connects to the internet has a unique number, called an IP address, associated with it. Devices find and communicate with one another by using these IP addresses. Organizations use CIDR to allocate IP addresses flexibly and efficiently in their networks.
What are the different IP address formats? An IP address has two parts:
The network address is a series of numerical digits pointing to the network's unique identifier The host address is a series of numbers indicating the host or individual device identifier on the network Until the early 1990s, IP addresses were allocated using the classful addressing system. The total length of the address was fixed, and the number of bits allocated to the network and host portions were also fixed.
Classful addresses An IPv4 address consists of 32 bits. Each string of numbers separated by the period consists of 8 bits, represented by 0 to 255 in numerical forms. Organizations could purchase three classes of IPv4 addresses.
Class A A Class A IPv4 address has 8 network prefix bits. For example, consider 44.0.0.1, where 44 is the network address and 0.0.1 is the host address.
Class B A Class B IPv4 address has 16 network prefix bits. For example, consider 128.16.0.2, where 128.16 is the network address and 0.2 is the host address.
Class C A Class C IPv4 address has 24 network prefix bits. For instance, consider 192.168.1.100, where 192.168.1 is the network address and 100 is the host address.
Classless addresses Classless or Classless Inter-Domain Routing (CIDR) addresses use variable length subnet masking (VLSM) to alter the ratio between the network and host address bits in an IP address. A subnet mask is a set of identifiers that returns the network address’s value from the IP address by turning the host address into zeroes.
A VLSM sequence allows network administrators to break down an IP address space into subnets of various sizes. Each subnet can have a flexible host count and a limited number of IP addresses. A CIDR IP address appends a suffix value stating the number of network address prefix bits to a normal IP address.
For example, 192.0.2.0/24 is an IPv4 CIDR address where the first 24 bits, or 192.0.2, is the network address.
I don't understand why 44.0.0.1 in a class A IPv4 address has 8 network bits. Why ist 44 8 bits? Same with 128.16 in the class B IPv4. Why is that 16 bits?
It all comes from the definition of IP address classes.
For example, according to this definition, class A is addresses between
0.0.0.0and127.255.255.255with 8 network bits and class B is addresses between128.0.0.0and191.255.255.255with 16 network bits.This is mostly historical though and not widely used anymore.
I'd focus on CIDR which is what's used these days and the notation tells you how many network bits are there.