16
According to IPv4, the IP addressed are divided three classes, class A, class
B and class C. The rest of IP addresses are for multicast and broadcast. The bit
length of the network prefix is the same as that of the subnet mask and is denoted
as IP address/X, for example, 192.168.1.0/24. Each class has its address range as
described below.
Class A:
Address is less than 126.255.255.255. There are a total of 126 networks can
be defined because the address 0.0.0.0 is reserved for default route and
127.0.0.0/8 is reserved for loopback function.
0
Class B:
The IP address range in between 128.0.0.0 and 191.255.255.255. Each
class B network has a 16-bit network prefix followed by a 16-bit host address. There
are 16,384 (2^14)/16 networks available to be defined with a maximum of 65534
(2^16 –2) hosts per network.
10
Class C:
The IP addresses range in between 192.0.0.0 and 223.255.255.255. Each
class C network has a 24-bit network prefix followed an 8-bit host address. There
are 2,097,152 (2^21)/24 networks available to be defined with a maximum of 254
(2^8 –2) hosts per network.
110
Bit # 0 1 7 8 31
Network address Host address
Bit # 01 2 15 16 31
Network address Host address
Bit # 0 1 2 3 23 24 31
Network address Host address