IT Education
Apr 4, 2024

IPv4 Addressing Lesson: The Class System

NGT Academy
NGT Academy

This is 3/3 of IPv4 Addressing lessons.

For the previous lessons: 

Now that you understand what IP addresses are, how to convert binary to decimal, what a network ID is, and subnet masks, let’s talk about the class system. I did this part last because it is something you need to know and now you know what a subnet mask is. 

So, what exactly is an IP class? IP classes provide a default mask based on the number that you see in the first octet. Just by looking at the number in the first octet of the IP address or network, you can tell what the class is and what the default mask is. This system was used before we ever had this thing called subnetting. Right when IPv4 was released this is how it was done. It was done strictly by classes. But then soon figured out that that wasn’t going to be enough network IDs and we had to come up with something better and that’s where subnetting came in. We will discuss subnetting in another lesson in more detail.

 We have something called a class and we have our first octet range of numbers, and then we have our default mask. These are the things associated with IP version 4 classes. Our first class is class A, and the range is 1 to 126 and that gives us a default mask of 255.0.0.0. Class B ranges from 128 to 191 and gives us a default gateway of 255.255.0.0. Class C ranges from 192 to 223 and gives us a range of 255.255.255.0. You may have wondered, what happened to 127? Good catch! 127 is reserved for the loopback. Anything that starts with 127 and the first octet is a loopback address. Meaning literally if you ping anything that starts with 127 from your computer using command prompt, you are pinging yourself. Let’s give it a try.

As you can see, I have opened the command prompt and started to ping my loopback address. To ping your loopback address, use the command “ping 127.0.0.1”. The entire range that starts with 127 is all for loopback. We can ping the first address in that range which is 127.0.0.1 and we get a reply. We could also ping any other address in that range like 127.55.67.89 and we’ll get a reply. Even though I don’t have that address, because you can’t assign that address to anything.

We have Class D with a range 224 to 239. Class D is used for multicasting. Multicasting is used a lot in networking, like with streaming video and stuff. Class E ranges from 240 - 255.255.255.254. Class E is used for experimental research. Generally, we only think about Class A, B, and C because these are the only ones that we can subnet. 

Conclusion

Those are our IP version for classes and here’s a quick recap. We learned that binary is just on and off or a mixture of ones and zeros and we saw this with the switch that can be turned on or off. We converted some binary octets into the correlating decimal format. We also looked at an IP address in binary and decimal format and turned it into binary. We also looked at how an IP address is truly 32 bits in length and composed of four binary octets with each containing 8 bits. We also learned about the binary reference chart and how to start from the right with 1 and work our way to the left to find the right subnet or network ID. Lastly, we learned about Classless Inter Domain Routing or CIDR notation for short.

Subscribe to the NGT Academy Newsletter

Subscribe to our weekly newsletter for valuable tips and advice, IT news and trends, and more to stay ahead.