Home > Subnetting Tutorial – Subnetting Made Easy

Subnetting Tutorial – Subnetting Made Easy

September 28th, 2011 Go to comments

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:

Subnet_Decimal_Binary.jpg
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:

Subnet_bit_1_significance.jpg

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:

Why_256_magic.jpg

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 ^^)

Comments (198) Comments
Comment pages
1 2 3 4 850
  1. Bargavi
    March 8th, 2014

    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

  2. Ajay Phadtare
    March 18th, 2014

    great Work !!!!

  3. laryy
    March 21st, 2014

    nice one :) informative

  4. larry james cabalida
    March 21st, 2014

    awesome@_@

  5. kim jamora
    March 21st, 2014

    anu po ang ip subnetting?

  6. musthaq
    March 25th, 2014

    Good work. Thanks a lot friends

  7. adf
    April 6th, 2014

    this was one of the rare instructions that were crystal clear and easy to understand

    kudos to you

  8. Dan
    May 8th, 2014

    Excellence. This is easy to understant than many books I have read about subnets. Thanks a lot.

  9. Saad yousaf
    May 8th, 2014

    easily understandable

  10. Ysabel
    May 24th, 2014

    It’s been very informative and well explained thank you

  11. pradip
    May 27th, 2014

    easy to lern thanks alote good job

  12. pradip
    May 27th, 2014

    understandable and queck lernable mater

  13. :D
    May 29th, 2014

    :o

  14. Barno
    June 13th, 2014

    Thank you!

  15. Ali yusuf bakal
    June 24th, 2014

    I don’t understand what is the subnetting mask

  16. Kumar Gaurav Singh
    June 24th, 2014

    Thank you for providing such a good presentation.

  17. kherbek
    July 1st, 2014

    thanks it is helpfull

  18. Laurente XTIAN
    July 15th, 2014

    HELPFUL! GOOD TUTORIAL! WELL EXPLAINED!

  19. Imran
    July 19th, 2014

    Very helpful, presented in a simple and understandable format. Thanks once again!

  20. Bhuwan
    July 24th, 2014

    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???

  21. Ramandeep
    July 28th, 2014

    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! :-/

  22. Ramandeep
    July 28th, 2014

    10.10.20.10/21
    Solve this… write its subnetwork ids…

  23. Emmnaouel
    August 3rd, 2014

    To Ramandeep

    No. Of subnetwork bits= 13 bits
    Valid host/subnet= 11 bits

  24. sumit
    August 11th, 2014

    Awesome!! keep writing tutorials like this.
    Thank you

  25. In this article, we will learn how
    August 19th, 2014

    In this article, we will teach …. perhaps is better english

  26. A.N.M.NISHAD
    September 1st, 2014

    VERY USEFUL NOTES……..

  27. Anonymous
    September 5th, 2014

    It help me so much!! Thank you so MUCH!!

  28. Mohammad Mozamel
    October 8th, 2014

    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

  29. Anthony
    October 9th, 2014

    Thanks a lot for this tutorial. :)

  30. Mariyam
    November 4th, 2014

    Thank you so much for making these tutorials available to everyone !

  31. KAUSHIK
    November 12th, 2014

    Excellent and Lucid way.Simple..

  32. Eugene
    November 15th, 2014

    Thanks I liked everything in your presentation,let GOD reaching BLESS you .

  33. geteneh
    December 9th, 2014

    thanks

  34. mohammed mussa
    December 26th, 2014

    I would like to thank for submit mask presentation

  35. mohammed mussa
    December 26th, 2014

    I wiil amember of your programing design

  36. Mason
    February 21st, 2015

    Please help,

    Why 2001:0db8:0:130h::87c:140b is not a valid IPV6 address?

  37. Mason
    February 21st, 2015

    Please help,

    What does it means when a question said “All of the networks are configured with the ip subnet-zero command” ?

  38. loigie panganoron
    February 21st, 2015

    good job

  39. Tauseef Yaseen
    February 22nd, 2015

    Thaank u…it is very help for me.

  40. ameer kabir
    February 26th, 2015

    subnetting becomes very simple after I finished the article thanks a lot

  41. ameer kabir
    February 26th, 2015

    is there any article for CIDR or summarization

  42. Anonymous
    March 20th, 2015

    Good stuff. Thanks

  43. M Ali
    March 22nd, 2015

    Excellent Tutorial

  44. gary B.
    March 24th, 2015

    now i need “how to” crack a 11110000.11110000. 11110000.11110000/4 or another simple. issue. Thanks for your help!

  45. Rahul
    April 1st, 2015

    Really confusing

  46. ghoneim
    April 2nd, 2015

    Thanks

  47. Adebayo
    May 4th, 2015

    Thanks a lot still trying to capture it cos am not too conversant with it but now am getting it.

  48. shoogn
    May 11th, 2015

    The loopback is 127.0.0.1 not 127.0.0.0

Comment pages
1 2 3 4 850
Add a Comment