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:
+ http://www.9tut.com/ccna-subnetting
+ http://www.9tut.com/ccna-subnetting-questions-2
+ http://www.9tut.com/ccna-subnetting-questions-3
+ http://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 ^^)
Nice Presentation
I really forgot all this subnetting but I thank for the author so much
I have recovered them all
Subnetting was so hard
Now it is easy just as the title of this presentation
great Work !!!!
nice one :) informative
awesome@_@
anu po ang ip subnetting?
Good work. Thanks a lot friends
this was one of the rare instructions that were crystal clear and easy to understand
kudos to you
Excellence. This is easy to understant than many books I have read about subnets. Thanks a lot.
easily understandable
It’s been very informative and well explained thank you
easy to lern thanks alote good job
understandable and queck lernable mater
:o
Thank you!
I don’t understand what is the subnetting mask
Thank you for providing such a good presentation.
thanks it is helpfull
HELPFUL! GOOD TUTORIAL! WELL EXPLAINED!
Very helpful, presented in a simple and understandable format. Thanks once again!
I always think subnetting for me is not that much hard but when it comes for Class A and B, I just confused a lot,.., Class A and B are similar to Class C but practicall., I always confused with it. Any one has quick and fast way to subnet Class A and B???
10.100.100.172/24
No. Of subnetwork bits= 16
Valid host/subnet= 254
As it is classles
Now there is a question having
10.10.20.10/21
No. Of subn/w bits=5 or 13
As for taking 5 its block size would be 8 and and hence total no. Of subn/w are satisfied(32)
But taking 13 block size could make out 9176 subn/w
(Its classless too)
Tell me sir what would be the answer as it is literally becoming a nightmare! :-/
10.10.20.10/21
Solve this… write its subnetwork ids…
To Ramandeep
No. Of subnetwork bits= 13 bits
Valid host/subnet= 11 bits
Awesome!! keep writing tutorials like this.
Thank you
In this article, we will teach …. perhaps is better english
VERY USEFUL NOTES……..
It help me so much!! Thank you so MUCH!!
Nice Presentation
Subnetting is the Root of Networking if We Don’t Practice Subnetting Examples it will forgot Faster then other Protocols
Try to Design Your Lab Simulations in VLSM forms otherwise You Will Forgot Sebnetting
Thanks a lot for this tutorial. :)
Thank you so much for making these tutorials available to everyone !
Excellent and Lucid way.Simple..
Thanks I liked everything in your presentation,let GOD reaching BLESS you .
thanks
I would like to thank for submit mask presentation
I wiil amember of your programing design
Please help,
Why 2001:0db8:0:130h::87c:140b is not a valid IPV6 address?
Please help,
What does it means when a question said “All of the networks are configured with the ip subnet-zero command” ?
good job
Thaank u…it is very help for me.
subnetting becomes very simple after I finished the article thanks a lot
is there any article for CIDR or summarization
Good stuff. Thanks
Excellent Tutorial
now i need “how to” crack a 11110000.11110000. 11110000.11110000/4 or another simple. issue. Thanks for your help!
Really confusing
Thanks
Thanks a lot still trying to capture it cos am not too conversant with it but now am getting it.
The loopback is 127.0.0.1 not 127.0.0.0