Hello everyone! How's subnetting going? Did you practice a lot? I hope you did, but even if you didn't we will go through some more examples so you can be feeling confident after reading this article. It's all about that bad boy binary!
We will move from the previous article's concept to a new one this time.
We are dealing with a class B address this time and we want to break the network into 100 individual networks. Let's revise the subnetting steps;
- Convert the number of networks to binary
- Reverse bits in subnet mask and find the increment
- Use the increment in order to find the network ranges
WARNING! If you are not familiar with the technique I strongly recommend reading the first article I posted on subnetting here, where I introduce the concept itself.
100 equals to 01100100 in binary but as we all hopefully know by now the 0 on the front doesn't affect the binary representation so we can throw it away. Thus, 7 bits in total. Off to our increment!
Be careful! It's so easy to missunderstand it with a class C address. When I started learning subnetting I had the tendency to start from the last octet and put the 1s there no matter what the subnet mask is, which is wrong. ALWAYS pick up where the 1s leave off. So we will start replacing the 0s with 1s at the 3rd octet. Now our subnet mask is 255.255.254.0 or we can type it in a fancier way, such as 18.104.22.168/23. Why /23? Because our subnet mask contains 23 1s, right?
Our increment can also be tricky if you are a beginner. Some people get confused and start counting from the last octet and they think that the increment is at the 10th position(starting all the way from the right octet) and that's wrong as well. EVERY octet is a new set of increments. Hence, the increment is 2. How? Remember, our increment is the lowest network bit converted back to a decimal number. Off to our networks ranges!
Pay attention to that picture! Many beginners get it wrong at the first time. We need to add our increment in the octet where it's at! Stop right there and read that sentence again and again. In which octet are we working on? The 3rd one, that's right and that's why I added the increment to that one. The picture above is wrong because the range limits aren't the right ones. Let's have a look at the first range. It starts from 22.214.171.124(because that's what we were given) all the way up to 126.96.36.199. If the next range starts from 188.8.131.52, where did the 184.108.40.206 go? Where did the 220.127.116.11 go or the 18.104.22.168? Do you see what I'm talking about? We excluded a big range of IP addresses which would be useful for us. That's another mistake many beginners make. The picture below is the CORRECT version;
So each one of our network ranges end with .255. That's the actual last IP address of each range. If we add 1 to .255, we get 256 but that's not valid because that value doesn't exist with 8 bits so we move to the octet on the left and we add 1 to that. Go back to the elementary school mindset. Think of it as 9+1. We can't have 10 with one digit so we write a 0 and we carry the 1. Weird analogy but I hope it helps. That's how I see it at least.
That's a small sample of our subnets. I could have written all of them but 100 networks are too damn many to write and I'm sure you are getting the idea behind it slowly slowly so there's no need to.
C'mon, you must be feeling it. Tell me you are getting it. Tell me you see how these pieces fit into place. I've got a question for you. Let's take the first network range as an example again. If you look at it carefully, you can see that the addresses 22.214.171.124 and 126.96.36.199 are included in that range. Are they usable or not? Can we assign any of those 2 IP addresses to a device? Remember what I told you? The first and last IP address of a network range, which are the network address and the Broadcast address, respectively, aren't usable. Hm, interesting.
Assignment #1: You've got the class A IP address 10.0.0.0 with the subnet mask 255.0.0.0 or /8 and I want you to break that network into 1000 networks.
In case you feel like a subnetting stud:
Assignment #2: You've got the class C address 188.8.131.52 with the subnet mask 255.255.255.0 or /24 and I want you to break that network into 15 networks.
If you have any issue with your solutions don't worry, I will post the answers on the next article. That's all for now folks. If you have any questions feel free to comment them down below or PM me. I hope this article has been informative for you and thank you for taking the time to read it. Have an amazing day and stay awesome!
Want to start making money as a white hat hacker? Jump start your White-Hat Hacking career with our 2020 Premium Ethical Hacking Certification Training Bundle from the new Null Byte Shop and get over 60 hours of training from Ethical Hacking Professionals.