Check the class of an IP address
Result
IP (Internet Protocol) classes came about due to the limited space of a 32-bit IPV4 address. Given the limited number of available addresses, IP classes were introduced to prevent waste, especially in larger networks comprising thousands of connected devices. IP classes are used for allocating IP addresses to systems/devices that connect to a network. There are five classes of IP: A, B, C, D, and E. Each class has different components of specific ranges and is used for different scenarios.
Class A addresses: the first Octet is used as the network id. Class A is used in large networks such as large corporate entities or organizations. These networks can comprise up to 16 million hosts, but there can be only 126 class A networks on the whole internet. The range of a class A starts at 1.0.0.0 all the way up to 126.0.0.0. That said, only 40 of class A addresses are allocated to 40 companies. The remaining 86 classes are used by organizations such as the Internet Assigned Numbers Authority (IANA). These organizations assign IP addresses across the regions Asia, Europe, North America, South America, and Australia.
Class B addresses: the first two octets are used to indicate the network id. Class B is used in medium-sized networks. Class B is reserved for Hospitals, Universities, and other medium-sized organizations using Class B addresses. Class B addresses start from 128.0.0.0 to 191.0.0.0. Class B networks can comprise thousands of hosts. A Class B network can contain up to 65,000 devices. The number of class B addresses on the internet is around 16,000. Given that class B can be much smaller than class A in relation to the number of hosts. Class B can still be problematic given that not all medium-sized organizations have thousands and thousands of hosts.
Class C addresses: are used in much smaller networks such as small businesses, small organizations, or home networks. The range of a Class C address starts at 192.0.0.0 to 223.0.0.0. The first three octets are used to indicate the network ID; the remaining octet is used for the host. A class C address can accommodate up to 254 hosts on a network. Class C can comprise over 2 million networks given it has 24 network bits assigned to the network ID. Given the small size of the available hosts on a class C network and the overabundance of addresses in class B. Many organizations just need more than a few hounds available. The difference between the size of class C compared to class B has led to the practice of subnetting.
Class D addresses: are used for multicast addressing; this is a method of sending a package to many devices on the network at the same time. A class D address ranges from 24.0.0.0 to 239.0.0.0.
Class E addresses: is a special reserved range of addresses used for experimental purposes. A class E has a range of 240.0.0.0 to 255.0.0.0.