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 (50) Comments
Comment pages
1 3 4 5 6 850
  1. Anonymous
    October 3rd, 2015

    First sentence after the first table: “Class A addresses begin with a 0 bit.”This is a poor explanation. 10.16.32.100 is a class A. 172.15.10.200 is a class A. I don’t understand your methodology. Forget it, i got it. “bit”.

  2. Anonymous
    October 9th, 2015

    Dear,
    I need free ccna dumps, I do hope that, you will not discourage me

  3. Baqi Bellah Durrani
    October 30th, 2015

    Really impressive but i have one Question can we go to B and C sides as well?

  4. Baqi Bellah Durrani
    October 30th, 2015

    kindly

  5. Dave
    November 10th, 2015

    i need dumps for ccna my email is davematrixba@aol.com

  6. casz
    November 15th, 2015

    thanks.

  7. Yogeshwar
    December 4th, 2015

    Excellent work…Keep It Up

  8. abhishek
    December 28th, 2015

    realy good

  9. steve
    January 6th, 2016

    The worst explanation Ive seen yet.

  10. Junito
    January 25th, 2016

    I need the latest ccna dump please my email is amadison.c ok {email not allowed} Thanks

  11. Junito
    January 25th, 2016

    I need the latest ccna dump please my email is {email not allowed} , thanks

  12. Junito
    January 25th, 2016

    I need the latest ccna dump please my email is {email not allowed}

  13. Anonymous
    February 17th, 2016

    Not bad…but the purpose behind subnetting is to create more host IDs…so you kinda have the reasoning backwards. We actually give up a portion of the network ID to increase possible hosts. A typical class C will usually fall short of host Ids so we mask the third octet to give us more bits to define hosts.

  14. jey
    February 17th, 2016

    if anyone have latest dumps kindly share me {email not allowed}

  15. Zunnu
    February 22nd, 2016

    Are full tutorial available on PDF, so it will be easier to print for study.

  16. Anonymous
    March 3rd, 2016

    Hi just completed my CCNA course.Can anyone provide me plse with a company name in London where I can acquire experience?

  17. Anonymous
    March 9th, 2016

    simply fantastic

  18. Anonymous
    March 30th, 2016

    can anyone provide me latest dumps on {email not allowed}

  19. hello!
    April 6th, 2016

    very very very well explained….

  20. Anonymous
    April 14th, 2016

    I don’t understand the concept of the off and on bit. Please explain to me. Samuel my email is {email not allowed}

  21. Jez
    May 5th, 2016

    Need lastest ccna dumps!! Going for exams next week. {email not allowed} . Thanks guys!

  22. Jez
    May 5th, 2016

    My email is just_passin_by.hotmail.com

  23. Srinath
    May 11th, 2016

    Hi all can anyone please provide latest dump please email me {email not allowed}

  24. Srinath
    May 11th, 2016

    {email not allowed}

  25. Anonymous
    May 17th, 2016

    very informative and easy to understand. Thank you

  26. Balu
    May 26th, 2016

    Impressive work…. and I have to know more about subnet can you please forward your notes on email
    And my email id is {email not allowed}

  27. Balu
    May 26th, 2016

    kittu764@ Gmail.com

  28. Anonymous
    June 6th, 2016

    hi i need CCNA dump, my email address is: {email not allowed}

  29. Anonymous
    June 14th, 2016

    Ipressive indeed. please I need CCNA Dump, my email is {email not allowed}

  30. sunny
    June 16th, 2016

    i didn’t understand the increment terminology… whats dat.. help me

  31. sunny
    June 17th, 2016

    @9tut

  32. Anonymous
    June 21st, 2016

    good job sir….

  33. Dinesh
    July 20th, 2016

    Simply the best explanation till date

  34. Subnet
    August 1st, 2016

    Hi
    In interview i got a question that
    170.4.5.0/12
    Determine network id, fhid, lhid and broadcast. Plz any body can solve this

  35. zuway
    August 5th, 2016

    is there any other way to subnet…

  36. Anonymous
    August 6th, 2016

    please I really appreciate your work here but please I’ll need need these materials so as to work with in a later time.thanks my email:{email not allowed}

  37. leonardohorattio@gmail.com
    August 6th, 2016

    please send me dump materials

  38. dropboxsale@gmail.com
    August 9th, 2016

    Send me dump materials, please.

  39. dana
    August 11th, 2016

    @SUBNET .the incriment for 170.4.5.0/12 will be 16 there fore the network ID if using subnet 0 is o and broadcast ID is 15

  40. Anonymous
    August 19th, 2016

    thanks for your article.

  41. yearry
    September 14th, 2016

    good tutorial

  42. Anonymous
    September 26th, 2016

    class A addresses when given the binary code starts with 0 bit

  43. jarisek
    September 27th, 2016

    many thanks, after so many youtube videos after your hand made i finaly got it; as you say, everything is about own practice..
    Great job!
    :-)

  44. Anonymous
    September 27th, 2016

    anyone with a ICD1 / or latest CCNA dump i can study from send to tinkbz at gmail.com no spaces fig it would show up better like this

  45. Anonymous
    October 16th, 2016

    nice job baby

  46. Taher
    October 19th, 2016

    I need the latest ccna dump please my email is({email not allowed})

  47. SYED
    October 30th, 2016

    What is the broadcast address of the network 10.5.0.0/20?

    how to go on solving this ?
    its class b, with /20 subnet with 4096hosts and 16 subnets

  48. SYED
    October 30th, 2016

    What is the broadcast address of the network 10.5.0.0/20?
    how to go on solving this ?
    its class b, with /20 subnet with 4096hosts and 16 subnets

  49. Anonymous
    November 7th, 2016

    thank you

  50. Ash
    November 17th, 2016

    I need the latest ccna dump please my email is {email not allowed}

Comment pages
1 3 4 5 6 850