Home > Subnetting Tutorial – Subnetting Made Easy

Subnetting Tutorial – Subnetting Made Easy

September 28th, 2011 Go to comments

In this article, we will learn how to subnet and make subnetting an easy task.

The table below summarizes the possible network numbers, the total number of each type, and the number of hosts in each Class A, B, and C network.

  Default subnet mask Range
Class A 255.0.0.0 (/8) 1.0.0.0 – 126.255.255.255
Class B 255.255.0.0 (/16) 128.0.0.0 – 191.255.255.255
Class C 255.255.255.0 (/24) 192.0.0.0 – 223.255.255.255

Table 1 – Default subnet mask & range of each class

Class A addresses begin with a 0 bit. Therefore, all addresses from 1.0.0.0 to 126.255.255.255 belong to class A (1=0000 0001; 126 = 0111 1110).
The 0.0.0.0 address is reserved for default routing and the 127.0.0.0 address is reserved for loopback testing so they don’t belong to any class.
Class B addresses begin with a 1 bit and a 0 bit. Therefore, all addresses from 128.0.0.0 to 191.255.255.255 belong to class B (128=1000 0000; 191 = 1011 1111).
Class C addresses begin with two 1 bits and a 0 bit. Class C addresses range from 192.0.0.0 to 223.255.255.255 (192 = 1100 0000; 223 = 1101 1111).

Class D & E are used for Multicast and Research purposes and we are not allowed to subnet them so they are not mentioned here.

Note: The number behind the slash notation (/) specifies how many bits are turned on (bit 1). For example:

+ “/8″ equals “1111 1111.0000 0000.0000 0000.0000 0000″ -> 8 bits are turned on (bit 1)
+ “/12″ equals “1111 1111.1111 0000.0000 0000.0000 0000″ -> 12 bits are turned on (bit 1)
+ “/28″ equals “1111 1111.1111 1111.1111 1111.1111 0000″ -> 28 bits are turned on (bit 1)
+ “/32″ equals “1111 1111.1111 1111.1111 1111.1111 1111″ -> 32 bits are turned on (bit 1) and this is also the maximum value because all bits are turned on.

The slash notation (following with a number) is equivalent to a subnet mask. If you know the slash notation you can figure out the subnet mask and vice versa. For example, “/8″ is equivalent to “255.0.0.0″; “/12″ is equivalent to “255.240.0.0″; “/28″ is equivalent to “255.255.255.240″; “/32″ is equivalent to “255.255.255.255″.

Class_A_B_C_network_host_portions.jpg

The Network & Host parts of each class by default

From the “default subnet mask” shown above, we can identify the network and host part of each class. Notice that in the subnet mask, bit 1 represents for Network part while bit 0 presents for Host part (255 equals to 1111 1111 and 0 equals to 0000 0000 in binary form).

What is “subnetting”?

When changing a number in the Network part of an IP address we will be in a different network from the previous address. For example, the IP address 11.0.0.1 belongs to class A and has a default subnet mask of 255.0.0.0; if we change the number in the first octet (a block of 8 bits, the first octet is the leftmost 8 bits) we will create a different network. For example, 12.0.0.1 is in a different network from 11.0.0.1. But if we change a number in the Host part, we are still in the same Network. For example, 11.1.0.1 is in the same network of 11.0.0.1.

The problem here is if we want to create 300 networks how can we do that? In the above example, we can only create different networks when changing the first octet so we can create a maximum of 255 networks because the first octet can only range from 1 to 255 (in fact it is much smaller because class A only range from 1 to 126). Now we have to use a technique called “subnetting” to achieve our purpose.

“Subnetting” means we borrow some bits from the Host part to add to the Network part. This allows us to have more networks than using the default subnet mask. For example, we can borrow some bits in the next octet to make the address 11.1.0.1 belong to a different network from 11.0.0.1.

How to subnet?

Do you remember that I said “in the subnet mask, bit 1 represents for Network part while bit 0 presents for Host part”? Well, this also means that we can specify how many bits we want to borrow by changing how many bit 0 to bit 1 in the subnet mask.

Let’s come back to our example with the IP 11.0.0.1, we will write all numbers in binary form to reveal what a computer really sees in an IP address.

Class_A_binary_form.jpg

Now you can clearly see that the subnet mask will decide which is the Network part, which is the Host part. By borrowing 8 bits, our subnet mask will be like this:

Class_A_subnet_binary_form.jpg

After changing the second octet of the subnet mask from all “0″ to all “1″, the Network part is now extended. Now we can create new networks by changing number in the first or second octet. This greatly increases the number of networks we can create. With this new subnet mask, IP 11.1.0.1 is in different network from IP 11.0.0.1 because “1″ in the second octet now belongs to the Network part.

So, in conclusion we “subnet” by borrowing bit “0″ in the Host portion and converting them to bit “1″. The number of borrowed bits is depended on how many networks we need.

Note: A rule of borrowing bits is we can only borrow bit 0 from the left to the right without skipping any bit 0. For example, you can borrow like this: “1111 1111. 1100 0000.0000 0000.0000 0000″ but not this: “1111 1111. 1010 0000.0000 0000.0000 0000″. In general, just make sure all your bit “1″s are successive on the left and all your bit “0″s are successive on the right.

In the next part we will learn how to calculate the number of sub-networks and hosts-per-subnet

Comments (198) Comments
Comment pages
1 2 3 4 850
  1. Manoj
    September 29th, 2011

    WOW… I am taking exam this Saturday and a nice tut regarding subnet..
    Very much thanks…. best tut with sentences and words which even a person without ccna knowledge can understand…

  2. gcs
    October 1st, 2011

    @9tut
    thank you very much

  3. Cisco craze
    October 2nd, 2011

    @9tut::

    really great work but do add a portion of how to summarize different length subnets to 1 big network

  4. beginner
    October 3rd, 2011

    would you mind to explain the zero subnet

  5. Reza
    October 4th, 2011

    /28 is equivalent to “255.255.255.240″ not to “255.255.240″ !

    please correct it

    thanks :)

  6. kien
    October 4th, 2011

    /28 is equivalent to “255.255.255.240″ not to “255.255.240.0″ !

    please correct it

    thanks :)

  7. beginner
    October 5th, 2011

    thanks)))

  8. Cisco craze
    October 10th, 2011

    @begineer::

    this means that u’ll not count the subnet 0,,,for example if/29 is being used so have

    0,8,16,24,32,40,48,56,64…and soo on

    So u have to start with 8 and its your first subnet ..may this help

  9. nikunj
    October 15th, 2011

    @9tut …hey guys…i am going to give exam in next month. please send me latest dumps

    nikunj_ec09@yahoo.com

    nec.nikunj@gmail.com

  10. Anonymous
    October 19th, 2011

    request any one of you to share the latest dump i am going to write the CCNA exam next week or suggest from where can i get the latest dumps

    Email Address:
    alqamri_ahmed@gmail.com

  11. adam
    October 30th, 2011

    hello guys,,
    im preparing for CCNA exam after 2 week anybody can help me to get the last dumps kindly send me an email

    EMAIL ADDRESS : april1980_17@hotmail.com

    thank you

  12. Aber
    October 31st, 2011

    Your solution to Exercise 3 is not making sense to me…for the /30 mask…. I come up with 64 subnets and 2 hosts per subnet???

  13. Aber
    October 31st, 2011

    For .252 mask you are borrowing 6bits from the host portion not 2… unless i’m missing something??

  14. xallax
    November 1st, 2011

    @aber
    /30 means 255.255.255.252

    increment is
    256 – 252 = 4 (number of IPs used by each subnetwork)

    number of subnets on a class C subnetwork?
    256/4 = 64

  15. pallavi
    November 21st, 2011

    hi frnds…..

    plz send me latest dumps. i m giving papers in this month only.

  16. Sajan
    December 16th, 2011

    @ 9tut
    In exercise 3
    I think the following change is required “The number of newly created subnets = 2^6 = 64″

  17. stevie
    December 30th, 2011

    Hi everyone, i am sitting the exam on 4th january and would like to prepare with the latest material. if u have the latest dump, please help. my email is stevie_kabs@yahoo.com

  18. srinivasan
    January 11th, 2012

    Hi friends i am doing CCNA if u have latest dumps plz sent to my mail ID srinivasan1587@gmail.com plz help me thanks in advance

  19. shady
    January 23rd, 2012

    9tut
    thank for allah becouse there is page like you

  20. Jose
    January 26th, 2012

    H friends, i am preparing to sit the exam in two weeks time and to get the latest materials. Please send me the latest dump If you have. Here is my Email: josessemaganda@gmail.com

  21. Anonymous
    January 26th, 2012

    Hello to all…First and foremost..This is a great site…love it….it is so difficult to remember all, especially if you dont utilize on a regular basis…tutorials are so informative..

    I too am preparing for my ccna in two weeks, if someone could kindly help with the latest dumpz…good luck to all…
    email ctevas48@yahoo.com

  22. edos
    February 6th, 2012

    I too am preparing for my ccna in two weeks, if someone could kindly help with the latest dumpz…good luck to all…
    email: edos4all@yahoo.co.uk

  23. aleks
    February 7th, 2012

    i still have trouble subnetting..

  24. rigan
    February 13th, 2012

    this is the easiest process to learning sub-netting
    Fantastic !!!!!!!!!!!!!!!

  25. Villa
    February 14th, 2012

    Great help here

  26. NoName
    February 17th, 2012

    Thanks, this is the better tutorial for learning sub-netting

  27. Danni
    February 20th, 2012

    Could someone send me the latest CCNA dumps
    dmurdo1@yahoo.com
    please got the exam next month

  28. khanz
    February 21st, 2012

    reallly great…9 tut rockz

  29. aleks
    February 25th, 2012

    this is what i hated part of the exam most…

  30. Christie
    February 27th, 2012

    Very nicely explained..thanks 9tut!!

  31. Rooooone
    March 10th, 2012

    hey guys…i am going to give exam in next month. please send me latest dumps to

    cec_sisisan_66@yahoo.com

  32. juliet
    March 10th, 2012

    wow…it’s really interesting. i love 9tut. please do more tutorials

  33. Gurmeet
    March 12th, 2012

    @9tut …hey guys…i am going to give exam in next month. please send me latest dumps

  34. Gurmeet
    March 12th, 2012

    @9tut …hey guys…i am going to give exam in next month. please send me latest dumps

    gurmeetsinghsudan@yahoo.com

  35. anji
    March 13th, 2012

    plz..tell me how to download full version of software vch is used to open .vce files(dumps).. earlier i downloaded from http://www.examscollections.com but it is opening only 5 questions from the dump…if u knw plz send me the process..
    anjinaluvala@gmail.com

  36. Kenny
    March 19th, 2012

    Guys you are fantastic here. Please help me know how to get the dumps. my mail is rkenny08r@gmail.com. Thanks

  37. theja
    March 19th, 2012

    tomorrow i’m having d CCNA xam
    from 2 days i’m struggling here in 9tut
    nw i got confidence dat ” I CAN GET GOOD MARKS”
    Thank you “9TUT”

  38. MzeeNyani
    March 26th, 2012

    Nice work guys

  39. ripstop
    April 5th, 2012

    hey guys im taking icnd1 in 5 days can someone please send me the latest dump for icnd and 2 ty

  40. ripstop
    April 5th, 2012

    my email is dphill796@gmail.com

  41. Anonymous
    April 11th, 2012

    Plz send lastest dump i’m taking exam by Sunday

  42. Anonymous
    April 11th, 2012
  43. richa
    April 17th, 2012

    guys do tell what is subnet zero mask.
    n how it differ from other subnetting

  44. Anonymous
    April 21st, 2012

    Please send the latest dump. My email address is britishgirl64@hotmail.com
    Thanks!

  45. David
    April 27th, 2012

    Thanks for the good job done. Kindly send the latest dumps to me. dvdchigozie@yahoo.com

  46. Ansar
    May 1st, 2012

    Hello guys I am going to write the ccna exam in 2 weeks pls send me the latest dumps to ansarbasha.901@gmail.com

  47. Akiii
    May 12th, 2012

    Hi,
    I have problem in IP symmetrization, I can’t done it!!!
    Pls give some quick way solution for exam,because 2next day I have exam!!!!!

  48. Akiii
    May 12th, 2012

    Hi,
    I have problem in IP summarization, I can’t done it!!!
    Pls give some quick way solution for exam,because 2next day I have exam!!!!!

  49. Amon
    May 18th, 2012

    Check out examcollections.com for all latest dumps.

  50. Servo
    May 27th, 2012

    @richa
    there’s no such thing as “subnet-zero mask”. subnet-zero is always considered first block of network or subnet, example, if you have an “address”/28, your block size is 16, so your second subnet is 16.., your first subnet is zero which is also called a “subnet-zero”. if you have a Class C address with /25 to /30, the first block or first subnet is called “subnet-zero”

Comment pages
1 2 3 4 850
Add a Comment