Subnetting Tutorial – Subnetting Made Easy
In the previous examples, we have to write all subnet masks and IP addresses in binary numbers to find out the results. It is a boring and time-consuming task. In this part I will show you a shortcut to subnet without using a calculator or rough paper!
Subnetting – The quick & easy way
One important thing we should notice is that a valid subnet mask must have all bit “1”s and “0”s successive, in which bit “1”s must be on the left; bit “0”s must be on the right. Therefore we only have 8 situations:
Table 2 – lists all valid subnet masks
This is a very important table to do subnet quickly! Please take some time to learn it by heart. Make sure you remember the right-most bit “1” position (the least significant bit 1, which are in red in the above table) and their equivalent decimal values.
In most cases, this table is used to quickly convert a number from decimal to binary value without any calculation. For example, you can quickly convert the 4th octet of the subnet mask 255.255.255.248 to 11111000. Or if you are given a subnet of /29 you will know it equals to 255.255.255.248 (by thinking “/24 is the default subnet mask of class C so /29 will have the right-most bit “1” at 5th position).
Try to practice with these questions:
+ “/28” in binary form?
+ “255.255.224.0” in binary form?
+ “255.192.0.0” in slash notation form?
+ “/26” in binary form?
+ “255.128.0.0” in binary form?
+ “248.0.0.0” in slash notation form?
(Please try to solve by yourself before reading the solution)
Answers:
+ /28 -> 1111 1111.1111 1111.1111 1111.1111 0000
+ 255.255.224.0 -> 1111 1111.1111 1111.1110 0000.0000 0000
+ 255.192.0.0 -> /10
+ /26 -> 1111 1111.1111 1111.1111 1111.1100 0000
+ 255.128.0.0 -> 1111 1111.1000 0000.0000 0000.0000 0000
+ 248.0.0.0 -> /5
How to find out the increment number?
The increment is the heart of subnetting; if you can find out the increment, you can find all the information to solve a subnetting question. So it is usually the first thing you must find out in a subnetting question.
The increment number is the number specifying how “big” your subnets are. Let’s take an example of the increment number! Did you remember the subnets in “Exercise 3” in the previous part? By changing bits in the Network part, we found out 4 subnets:
+ First subnet: 198.23.16.0/30 (the 4th octet is 00000000)
+ Second subnet: 198.23.16.4/30 (the 4th octet is 00000100)
+ Third subnet: 198.23.16.8/30 (the 4th octet is 00001000)
+ Fourth subnet: 198.23.16.12/30 (the 4th octet is 00001100)
In this case the increment is 4 (in the 4th octet) because the “difference” between two successive subnets is 4 (from 0 -> 4; from 4 -> 8; from 8 -> 12)
There are 2 popular ways to find out the increment number:
1) Use the formula:
Increment = 256 – x |
In which “x” is the first octet (counting from the left) which is smaller than 255 in a subnet mask. For example:
+ In a subnet mask of 255.224.0.0 -> x = 224
+ In a subnet mask of /29 -> x = 248 (because /29 = 255.255.255.248)
+ In a subnet mask of 1111 1111.1111 1100.0000 0000.0000 0000 -> x = 252
In the case you see a subnet mask of 255.255.255.255 (which is very rare in CCNA), x = 255
Note: Also remember which octet “x” belongs to because we have to plus the increment to that octet.
Now let’s solve Exercise 3 again by using this formula:
Exercise 3 one again (with the formula 256 – x):
Your company has just been assigned the network 198.23.16.0/28. How many subnets and hosts-per-subnet you can create with a subnet mask of 255.255.255.252?
The subnet mask is 255.255.255.252 -> x = 252 (x belongs to 4th octet)
Therefore the Increment = 256 – 252 = 4
The initial network 198.23.16.0/28 is also the first subnet, so:
+ The first subnet: 198.23.16.0/30
+ The second subnet: 198.23.16.4/30 because the increment is 4 so we plus the network address with it to get the next network address (0 + 4 = 4)
+ The third subnet: 198.23.16.8/30 (4 + 4 = 8)
+ The fourth subnet: 198.23.16.12/30 (8 + 4 = 12)
Note: We know there are only 4 subnets because we borrow 2 bits.
2) Learn by heart the decimal value of the rightmost bit “1” in the subnet mask:
Another way to find the increment value is to write “x” in binary: 11110000. Consider the rightmost bit “1”, the decimal value of this bit is the increment value. In this case it equals to 16.
The table below summarizes the decimal values of bit “1” depending on its position. To use this method, you should learn by heart this table:
Table 3 – How to find out increment based on the “least-significant” (rightmost) bit 1
Now let’s solve Exercise 3 again by using this method:
Exercise 3 one again (with the “decimal value of the rightmost bit 1” method):
Your company has just been assigned the network 198.23.16.0/28. How many subnets and hosts-per-subnet you can create with a subnet mask of 255.255.255.252?
First use Table 2 to convert 252 to 1111 1100. The decimal value of the rightmost bit “1” is 4 (according to Table 3) -> The Increment is 4.
After finding out the increment we can deduce 4 subnets it creates.
The initial network 198.23.16.0/28 is also the first subnet, so:
+ The first subnet: 198.23.16.0/30
+ The second subnet: 198.23.16.4/30 because the increment is 4 so we plus the network address with it to get the next network address (0 + 4 = 4)
+ The third subnet: 198.23.16.8/30 (4 + 4 = 8)
+ The fourth subnet: 198.23.16.12/30 (8 + 4 = 12)
Note: We should only choose one method to use and try to practice, practice & practice more with it. Practice until you can solve any subnetting questions within 20 seconds!
Maybe you will ask why 256 can help you find the increment. In fact, by using the formula Increment = 256 – x you are trying to separate the rightmost bit “1” from other bits:
256 – x = 255 – x + 1
In which “255 – x” will convert all bit “0”s to bit “1”s and all bit “1”s to “0”s while “+1” part will make our result have only one bit “1” left. For example, if x = 240 then:
So in fact we can say two above methods are the same!
Now you learned all necessary things to become a subnetting guru. Please take some time to practice as much as possible, only practice makes perfect! Below lists some subnetting questions you can practice with:
+ https://www.9tut.com/ccna-subnetting
+ https://www.9tut.com/ccna-subnetting-questions-2
+ https://www.9tut.com/ccna-subnetting-questions-3
+ https://www.9tut.com/ccna-subnetting-questions-4
+ http://www.9tut.net/icnd1/subnetting
+ http://www.9tut.net/icnd2/icnd2-subnetting
(Please try solving them before reading the answers ^^)
Hello help im new here my ip is 200.0.1.16/30 ?
network class C 255.255.255.0 (/24) 192.0.0.0 – 223.255.255.255
200.0.1.16/30
255.255.255.252 = 1111 1111.1111 1111.1111 1111.1111 1100 (= /30)
+ First subnet: 200.0.1.16/30 (the 4th octet is 00000000)
+ Second subnet: 200.0.1.20/30 (the 4th octet is 00000100)
+ Third subnet: 200.0.1.24/30 (the 4th octet is 00001000)
+ Fourth subnet: 200.0.1.28/30 (the 4th octet is 00001100)
Hey Ali
I think this is incorrect on your math:
200.0.1.16
255.255.255.252
1st subnet = 200.0.1.0
2nd subnet = 200.0.1.4
3rd subnet = 200.0.1.8
4th subnet = 200.0.1.12
5th subnet = 200.0.1.16
Don’t forget 0 (zero) is a number
0 1 2 3 = 4
4 5 6 7 = 4
8 9 10 11 = 4
12 13 14 15 = 4
hello, I did many exercice but one of them from CISCO is not understable for me
You are implementing a VLSM network. You are using the Class B network of 172.16.0.0/16 and need to create 256 networks from this. The fifth network will then be subnetted into /30 networks.
What is the subnet ID of the fourth /30 network?
A. 172.16.4.12/30
B. 172.16.4.4/30
C. 172.16.4.6/30
D. 172.16.4.8/30
E. 172.16.4.14/30
F. 172.16.4.10/30
if we can give the solution and explanation it will be very helpful and useful
Hello Seb
The answer is A.
Because if you VLSM 172.16.0.0 /16 and have 256 networks the fifth network will be 172.16.4.0 /24 and then if you subnet this with a /30 mask you’ll get this. 172.16.4.0 /30 network address
172.16.4.1/30 first usable host address
172.16.4.2/30 second usable host address
172.16.4.3/30 broadcast address
172.16.4.4/30 network address
172.16.4.5/30 first usable host address
172.16.4.6/30 second usable host address
172.16.4.7/30 broadcast address
172.16.4.8/30 network address
172.16.4.9/30 first usable host address
172.16.4.10/30 second usable host address
172.16.4.11/30 broadcast address
172.16.4.12/30 network address
172.16.4.13/30 first usable host address
172.16.4.14/30 second usable host address
172.16.4.15/30 broadcast address
and so on.
KINDLY SHARE THE WINDOWS SEVER TUTORIAL
subnet mask in the example is inccorect. it should be 255.0.0.0 for 8 bit. your example was 255.255.0.0 and you gave 2 by the power of 8.
172.20.43.0/25
how many subnets and what will be the each subnet first and last ip and network and broadcast ip?