Internet Protocol hierarchy contains several classes of IP Addresses to be used efficiently in various situations as per the requirement of hosts per network. Broadly, the IPv4 Addressing system is divided into five classes of IP Addresses. All the five classes are identified by the first octet of IP Address.
Thanks to Tutorials Point the Original Source:
Internet Corporation for Assigned Names and Numbers is responsible for assigning IP addresses.The first octet referred here is the left most of all. The octets numbered as follows depicting dotted decimal notation or DDN of IP Address:
The number of networks and the number of hosts per class can be derived by this formula:
When calculating hosts' IP addresses, 2 IP addresses are decreased because they cannot be assigned to hosts, i.e. the first IP of a network is network number and the last IP is reserved for Broadcast IP.
0 (zero). Thus the first octet ranges from 1 – 127, i.e.
Class A addresses only include IP starting from 220.127.116.11 to 127.255.255.255.
The IP range 127.x.x.x is reserved for loopback IP addresses. IE: 127.0.0.1
The default subnet mask for Class A IP address is 255.0.0.0 which implies that Class A addressing can have 126 networks (27-2) and 16777214 hosts (224-2).
Class A IP address format is thus: 0NNNNNNN.HHHHHHHH.HHHHHHHH.HHHHHHHH
The class B IP addresses range from 18.104.22.168 to 22.214.171.124.
The default subnet mask for Class B is 255.255.0.0.
Class B has 16384 (214) Network addresses and 65534 (216-2) Host addresses.
Class B IP address format is: 10NNNNNN.NNNNNNNN.HHHHHHHH.HHHHHHHH
Class C AddressThe first octet of Class C IP address has its first 3 bits set to 110, that is:
Class C IP addresses range from 192.0.0.0 to 126.96.36.199.
The default subnet mask for Class C is 255.255.255.0.
Class C gives 2097152 (221) Network addresses and 254 (28-2) Host addresses.
Class C IP address format is: 110NNNNN.NNNNNNNN.NNNNNNNN.HHHHHHHH
Class D AddressVery first four bits of the first octet in Class D IP addresses are set to 1110, giving a range of:
Class D has IP address rage from 188.8.131.52 to 184.108.40.206. Class D is reserved for Multicasting. In multicasting data is not destined for a particular host, that is why there is no need to extract host address from the IP address, and Class D does not have any subnet mask.