An IP address is a unique identifier for each device that connects to the internet. It’s like your home address, but it identifies your computer instead of where you live. There are classless networks and classful networks. There are five different types of IP addresses in a classful network, and they all have their own uses.
TCP/IP defines five classes of IP addresses. Each class has a range of valid IP addresses. An IPv4 address consists of four octets, each ranging from 0 to 255. The first octet determines the class of the network and thus how many networks are available for a specific number of hosts. The five classes are:
This type of IPv4 address ranges from 1-126 in the first octet, so there can be up to 126 class A networks with 16 million hosts per network (2^24). The 127th number is reserved for loopback testing within a host machine and cannot be used as an actual network number.
This type of IPv4 address ranges from 128-191 in the first octet, so there can be up to 191 class B networks with 65 thousand hosts per network (2^16). The 192nd number is reserved for future use and cannot be used as an actual network number.
This type of IPv4 address ranges from 192-223 in the first octet, so there can only be 223 class C networks with 254 hosts per network (2^8). The 224th number is reserved for future use and cannot be used as an actual network number.
If the first octet is 224 or above (224 through 239), it’s a class D address. This means that there are no subnets in use on this particular network. This range also includes multicast addresses used by routers to send messages to multiple devices at once.
This type of IPv4 address ranges from 240-255 in the first octet than it belongs to Class E, and these IP addresses are reserved for experimental and research purposes.