Thoughts about the CCNA OCG’s Part IV (IPv4 Addressing)

Hi buddies!
Greetings from Lagos, Nigeria.
I just finished Part IV of the CCNA OCG recently, and I have to say that those chapters are so good! In order to improve my comprehension, I personally love how the authors break up the concept of IPv4 addressing in general coupled with repetitive questions.
Ok, apart from that. I have also been doing some questions about subnetting practice for days now using this book Network Bulls.
There are a few concepts that I was initially immensely puzzled about that are now obvious and they are as follows:
CLASSFUL NETWORK IDs exist and SUBNET IDs exist: I would sometimes misinterpret these two keywords. Which often led me to struggle with questions related to IP address research. “Example: Evaluate the IP address network class 10.192.20.40 /24”. Previously, because it has a prefix length of /24, I will presume that it means that 3 octets are all 1s (a Class C network typically has 3 octets, all 1s). Hence, the IP address must be a Class C network (10.192.20.40 /24). The assumption was wrong, LMAO!! Thankfully I have clarity now that the IP address is a Class A network, because the first octet is in that range (0 – 126).
Prefix Match bits arrangements vary from the arrangement of IP address bits: I haven’t really thought about this one, but the idea brought some clarification to solve subnetting issues. I made a tweet here about it here.
Determination of an IP address subnet mask based on a subnet or host requirement: At first, this one was difficult for me. Now it makes sense. I simply decide the IP class first and count the network (N) bits for that class if I am asked a question. Second, I decide the number of subnets I need to assign. Then, I choose the sum of n bits (2^n) that gives me the sum I need to assign the number of subnets. Next, to get the prefix (P) length, I add the number of n bits to the class bits, hence, (P = N + n). Lastly, to get my final answer, I convert the length of the prefix into a subnet mask. “Example: For the 172.21.0.0 network, you are designing a subnet mask. You want 10 subnets on each subnet with up to 3700 hosts. Which subnet mask should you use?” The portion of the first octet is 172, so it is a Class B, and N = 16 is Class B.” Next, 2^4 would have enough subnets to assign 10 subnets, 2^4 = 16 subnets. Then I’ll do P = N + n , P = 16 + 4, P = /20. Lastly, /20 = 255.255.240.0✅. I wrote a python script to solve this, here. You can form questions to test your subnetting skills and try the values on the script to confirm if your answer is correct.
Determining the number of subnet ID in a given IP address: Questions about it make me feel uncomfortable. Still, luckily, the feeling is gone. I just find the interesting subnet octet. Then, I define the magic number (256 – interesting subnet octet) and then divide 256 from the magic number to get the number of subnet in the IP address. “Example:How many subnets and hosts per subnet can you get from the network 192.168.129.0 255.255.255.252?” The interesting subnet octet is 252 (if the octet in the subnet mask doesn’t contain 0 or 255, it is an interesting subnet octet) . The magic number is 256 – 252 = 4, 256/4 = 64 subnets✅. OR, I pick the interesting subnet octet, count the bits that make up the interesting subnet octet, then I do a multiple of 2 with the bits as the power. “Example:How many subnets and hosts per subnet can you get from the network 192.168.129.0 255.255.255.252?” The interesting subnet octet is 252. 6 bits makes up 252, hence 2^6 = 64 subnets✅. I also wrote a python script based on the algorithm for solving it here. Someone also recently just brought to my notice this morning that there is a python library for finding the amount of subnets here. Which is fascinating! I’m glad he introduced me to the library, you can find the python script for this solution here. Though knowing how the person did it, just for fun, doesn’t hurt. He/she is after all, just like you and me, a human being.
Determining the range of subnet IDs: I previously tweeted a shortcut on how to solve the range of subnet IDs here. But, since the past 3 days that I have been solving more questions, the algorithm slowed me down as it required me to do hand written calculations. Instead the easiest way to solve it offhand is to memorize at least some of these dotted decimal number Memorize1 = (128, 192, 224, 240, 252, 254, 256) for lesser IP addresses you can memorize these numbers Memorize2 = (1, 2, 4, 8, 16, 32, 64, 128). Next, I find the interesting subnet octet (if the octet in the subnet mask doesn’t contain 0 or 255, it is an interesting subnet octet) and matching interesting host octet. Then, I determine the magic number = 256 – interesting host octet. Finally, to determine the next subnet ID, I do Next_Subnet_ID = Magic number + Memorize1 or Next_Subnet_ID = Magic number + Memorize2. “Example: What is the next subnet ID on the subnetwork 10.219.192.0 255.255.240.0?” Solution: The interesting subnet octet is the 3rd octet (.240.) because this subnet octet doesn’t contain 255. Next, I find the magic number, the magic number is256 – 240 = 16. Instead of adding 16+16+16… until I get to 192, I just jump to selecting 192, since 192 is among the number in Memorize1. Next, to get the Next_subnet_ID = 192 + 16 = 208, hence Next_subnet_id = 10.219.208.0 ✅
If you observe, on the article, I used “interesting host octet” to define octets on the host part. I also used “interest mask octet” to define octets on the subnet mask part.
So, guys I hope this article was helpful in your subnetting journey.
Get the CCNA text book here.