Home > Certifications > IP Networking (CCENT) > Discussions
    1 2 Previous Next 19 Replies Latest reply: Mar 14, 2015 5:53 AM by samarjitdutta RSS

    Classful vs Classless Subnetting - is there a difference ?

    Satish
      Novice question:

      Is there a difference between classful and cidr subnetting ?

      Example :
      10.0.0.0/16

      10.0.0.0                   10.1.0.0                 ---------------so on    (Lammle Book)
      10.0.0.1                   10.1.0.1
      10.0.255.254             10.1.255.254  
      10.0.255.255             10.1.255.255 

      In Classless subnetting does the second Octet stay constant and we only get
      10.0.0.0
      10.0.0.1
      10.0.255.254
      10.0.255.255

      I am confused is there a difference ?
        • 1. Re: Classful vs Classless Subnetting - is there a difference ?
          Ing_Percy

          Hi!

           

          Check the following link

          https://learningnetwork.cisco.com/thread/62328

           

          Best regards!

          • 2. Re: Classful vs Classless Subnetting - is there a difference ?
            sarah

            Satish,

             

            Accompanying the link Percy has given, this is an excellent elaborated explanation by Joshua.

             

            https://learningnetwork.cisco.com/docs/DOC-16125

            • 3. Re: Classful vs Classless Subnetting - is there a difference ?
              Satish

              Like will i be specifically asked to subnet classful or classless ?

              I mean will this be asked,or does subnetting mean classless.

              http://www.lammle.com/ip-subnet-practice-page/

               

              I am using the above link hope I am on the right path

               

              Are most routing protocols classless[sending the mask along with the IP] by default ?

              • 4. Re: Classful vs Classless Subnetting - is there a difference ?
                ciscodaze1

                You will definately need to know your subnetting cold.  You should be comfortable doing most subnetting problems, or analysing a subnet mask, in at least less than 1 minute.

                 

                Classful:  The original addressing format.  Class A,B,C.  They were fixed sizes, you had one or the other and that was it.  And that was what the router forwarded...classful ip packets. No way to include a custom subnet mask.

                 

                Classless:  This is really referring to the way routers treat the mask, and how they route packets.  In the old way, the subnet mask was not sent with the routing updates.  Now it is.  So the term refers to 1) the way we can make our mask any size we want (not just 8,16, 24), and, 2) the way routers treat the mask when forwarding packets, (including routing updates)...the custom subnet mask is included.

                 

                Classless also implies you are running a classless routing protocol, and not using auto-summary with your routing protocol.

                 

                By the way, that is an excellent practice calculator...use it till you are sick of it.

                • 5. Re: Classful vs Classless Subnetting - is there a difference ?
                  sarah

                  Yesterday I came across a post where jheinrich referred to this as slicing and dicing. Classful address have a boundary. For class A, it;s 10.0.0.0/8.


                  In binary - 11111111.00000000.00000000.00000000


                  The all 0's are the host bits. That's one network ID 10.0.0.0 accommodating 16777214 host address. Too many host allocated. Unrealistic scenario?


                  So with classless, you are slicing and dicing the host bits further to create more networks/subnets according to your requirements.


                  10.0.0.0/16


                  In binary


                  nnnnnnnn.ssssssss.hhhhhhhh.hhhhhhhh


                  Now  you have 8 subnet bits, that's a total 256 subnets each that can accommodate 65534 host ip addresses.


                  Compare that with the classful address of assigning of 16777214 host ip address to the 10.0.0.0/8 network. Would you require 16777214 host IP address all to yourself. It's wastage. By splitting it further, you will now be able to assign different networks to your different department, segmenting it.


                  Putting this here from my earlier responses

                  • We know an IPv4 address consists of 32 bits. 
                     
                  • The default mask for Class A, Class B and Class C are /8,/16,/24. This is how it is represented in binary
                  ClassPrefixRange1st Octet2nd Octet3rd Octet4th Octet
                  A/81-126 (127 loopback)11111111000000000000000000000000
                  B/16128-19111111111111111110000000000000000
                  C/24192-22311111111111111111111111100000000


                  Blue - Network bits Pink - Host bits

                  • The network bits are going to be assigned to represent your network, and these network will be able to accommodate certain number of hosts.

                  • In case of classful addressing, the total number of hosts that can be assigned to a network are fixed to the maximum total. The mask assigned to classful networks will not change. So in case of classful addressing, the mask used is always a full predefined mask with predefined number of bits of 8,16 or 24

                  ClassPrefixMaskTotal Network possibleTotal Hosts possible
                  A/8255.0.0.011677214
                  B/16255.255.0.0165534
                  C/24255.255.255.01254

                   

                  • Let’s say you need 2000 host addresses for your organization. Looking at the chart above,the choice you have is to take up class B. That means 65534-2000 = 63534 IP address wasted. While using classful addressing, that is the only choice made available to you.

                  • So to effectively solve this problem of waste of IP address, classless addressing is implemented, where you would be assigned a mask/prefix according to your requirements providing flexibility, a fluid design.

                  • Lets take class B where the default mask is 255.255.0.0 and prefix /16 and allows for 65534 host for that one single network, below is how it works while subneting

                  Ip addressPrefixMaskSubnet bitsSubnets possibleHosts per subnet
                  172.16.0.0/16255.255.0.00165534
                  172.16.0.0/17255.255.128.01232766
                  172.16.0.0/18255.255.192.02416382
                  172.16.0.0/19255.255.224.0388190
                  172.16.0.0/20255.255.240.04164094
                  172.16.0.0/21255.255.248.05322046
                  172.16.0.0/22255.255.252.06641022
                  172.16.0.0/23255.255.254.07128510
                  172.16.0.0/24255.255.255.08256254
                  172.16.0.0/25255.255.255.1289512126
                  172.16.0.0/26255.255.255.19210102462
                  172.16.0.0/27255.255.255.22411204830
                  172.16.0.0/28255.255.255.24012409614
                  172.16.0.0/29255.255.255.2481381926
                  172.16.0.0/30255.255.255.25214163842

                   

                  • The above is classless addressing.

                  • For the example we took before, now for our requirement of 2000 host address, we don’t have to anymore use a classful address of 172.16.0.0 with a default mask of /16. Instead now a class B address of 172.16.0.0/21 should accomodate you host needs of 2000 without wasting huge number of IP addresses as in case of classful, where you were using just 2000 IP addresses and wasting and not using the rest of 63534 IP addresses.

                  • So in the above do you see, as opposed to classful addressing where you had 1 single network with 65534 hosts, now with subnetting , you have 14 networks/subnets each supporting different number of maximum hosts. Isn't that a better design? You are now also able to assign different networks/subnets to different departments in you organization as per your requirements, each department having its own identity.

                  • That is classless addressing, an efficiently designed scheme.

                  • Now what is VLSM? That is further subnetting an already subnetted subnet, again one of the reasons to that is to assign different subnets to different departments in organization,

                  • ......prone to typos/errors
                  • 6. Re: Classful vs Classless Subnetting - is there a difference ?
                    sarah

                    This is the breaking up of  10.0.0.0/17. I'm putting up /17 instead of /16, as I already had this documented from an earlier post of mine.

                     

                    Mask - 255.255.128.0

                     

                    First Subnet - 10.0.0.1 - 10.0.127.254
                    Second Subnet - 10.0.128.1 - 10.0.255.254
                    Third subnet -  10.1.0.1 - 10.1.127.254

                    Fourth subnet - 10.255.128.1 - 10.255.255.254

                     

                    Solution

                     

                    1st subnet

                     

                    Subnet ID

                    10

                    0

                    0

                    0

                    Subnet ID binary

                    00000101

                    00000000

                    00000000

                    00000000

                    First host

                    10

                    0

                    0

                    1

                    First host binary

                    00000101

                    00000000

                    00000000

                    00000001

                    Last host

                    10

                    0

                    127

                    254

                    Last host binary

                    00000101

                    00000000

                    01111111

                    11111110

                    Broadcast

                    10

                    0

                    127

                    255

                    Broadcast binary

                    00000101

                    00000000

                    01111111

                    11111111

                     

                     

                    2nd subnet

                     

                     

                    Subnet ID

                    10

                    0

                    128

                    0

                    Subnet ID binary

                    00000101

                    00000000

                    10000000

                    00000000

                    First host

                    10

                    0

                    128

                    1

                    First host binary

                    00000101

                    00000000

                    10000000

                    00000001

                    Last host

                    10

                    0

                    255

                    254

                    Last host binary

                    00000101

                    00000000

                    11111111

                    11111110

                    Broadcast

                    10

                    0

                    255

                    255

                    Broadcast binary

                    00000101

                    00000000

                    11111111

                    11111111

                     

                     

                    3rd subnet

                     

                    Subnet ID

                    10

                    1

                    0

                    0

                    Subnet ID binary

                    00000101

                    00000001

                    00000000

                    00000000

                    First host

                    10

                    1

                    0

                    1

                    First host binary

                    00000101

                    00000001

                    00000000

                    00000001

                    Last host

                    10

                    1

                    127

                    254

                    Last host binary

                    00000101

                    00000001

                    01111111

                    11111110

                    Broadcast

                    10

                    1

                    127

                    255

                    Broadcast binary

                    00000101

                    00000001

                    01111111

                    11111111

                     

                     

                        -------------------------------------------------------omitted subnets in between--------------------------------

                     

                    Last subnet

                     

                    Subnet ID

                    10

                    255

                    128

                    0

                    Subnet ID binary

                    00000101

                    11111111

                    10000000

                    00000000

                    First host

                    10

                    255

                    128

                    1

                    First host binary

                    00000101

                    11111111

                    10000000

                    00000001

                    Last host

                    10

                    255

                    255

                    254

                    Last host binary

                    00000101

                    11111111

                    11111111

                    11111110

                    Broadcast

                    10

                    255

                    255

                    255

                    Broadcast binary

                    00000101

                    11111111

                    11111111

                    11111111

                    • 7. Re: Classful vs Classless Subnetting - is there a difference ?
                      Annamalai

                      Hats off sarah!! No other explanation needed

                      • 8. Re: Classful vs Classless Subnetting - is there a difference ?
                        sarah

                        Thanks Annamalai. This indeed can get tricky to understand. And best understood through an example.

                        • 9. Re: Classful vs Classless Subnetting - is there a difference ?
                          Satish

                          1.Kev  : I am using that calculator,if I perfect that am i good for the ccent ?

                           

                          Should I refer to lammle etc for classful subnetting or is the above calculator enough ?

                          Have solved all subnetting examples in lammle and odom.

                           

                          2.Sarah: Confused about your subnetting...

                           

                          First Subnet - 10.0.0.1 - 10.0.127.254
                          Second Subnet - 10.0.128.1 - 10.0.255.254
                          Third subnet -  10.1.0.1 - 10.1.127.254

                          Fourth subnet - 10.255.128.1 - 10.255.255.254

                           

                          I think according to lammle the 2nd octet varies from 0 to 255

                          and 3rd octet is 0 or 128

                           

                          like 0 paired with 0 and 128

                          1 paired with 0 and 128

                          and so on until 255

                           

                          I think your fourth octet should be

                          Network number : 10.1.128.0

                          First Host : 10.1.128.1

                          Last Host:: 10.1.255.254

                          Broadcast: 10.1.255.255

                           

                          correct me if I am wrong

                           

                          [Experts please subnet 10.0.0.0/17]

                          • 10. Re: Classful vs Classless Subnetting - is there a difference ?
                            Satish

                            Simply put is my subnetting correct 10.0.0.0/17

                             

                            1.Classful:

                            2^9 = 512 subnets , 2^17-2  = hosts per subnet

                            Network : 10.0.0.0                 

                            First Host : 10.0.0.1

                            Last address : 10.0.127.254

                            Broadcast address: 10.0.127.255

                             

                            second subnet:

                            10.0.128.0

                            10.0.128.1

                            10.0.255.254

                            10.0.255.255

                             

                            Next 2nd octet will be 1,1 paired with 0 and 128, 2nd octet varies from 0 to 255

                             

                            2. Classless: [Just these two]

                             

                            10.0.0.0                       10.0.128.0

                            10.0.0.1                       10.0.128.1

                            10.0.127.254                10.0.255.254

                            10.0.127.255                 10.0.255.254

                            • 11. Re: Classful vs Classless Subnetting - is there a difference ?
                              sarah

                              "Omitted subnets in between"...last subnet... not fourth

                              • 12. Re: Classful vs Classless Subnetting - is there a difference ?
                                Dave

                                How it was explained to me which made the most sense, at least when
                                explaining address allocation from a classful and classless sense,
                                you can look at it like the difference between a dropdown box and a
                                slider bar in a GUI.  For classful address assignment, imagine you had
                                a series of dropdown boxes.  One gave you the choice of A,B,or C. Then
                                related to that selection would be another dropdown box and if you picked
                                A then that box would give you a choice to pick numbers 1 - 126.  Then
                                in the next dropdown box you'd choose the number of bits you wanted
                                to assign to the subnet portion, which would then automatically
                                select the number of bits allocated to the host portion.  With classless,
                                subnetting is like using a slider bar.  Imagine a slider bar with 32 values
                                The bar can be moved left or right, 1 being on the far left.  If you
                                elect to set the position of the bar at 24 then, let's say that means its
                                varying the number of bits assigned to the network portion (in this case 24)
                                Eliminating 24 from 32 gives you 8 left for the host portion.  The class
                                boundary becomes irrelevant.  For instance, if you type in 192.168.0.0 and
                                slide the bar to 15 then the range of usable addresses is 192.168.0.1 to
                                192.169.255.254.  Although an address starting with 192 is a class 'c'
                                address in the classful world, in the classless world it's just a number
                                from a subnetting point of view.

                                • 13. Re: Classful vs Classless Subnetting - is there a difference ?
                                  Steven Davidson

                                  There are a bunch of good subnet calculators on the Internets and I'm sure you can find them on Bing but I personally like to use this one when  I want to validate if I've got the right numbers: http://www.subnet-calculator.com/cidr.php  You can switch between classful and classless mode.

                                  • 14. Re: Classful vs Classless Subnetting - is there a difference ?
                                    Satish

                                    Dear Steven,

                                    Used the above calculator ,its good ,written in php.

                                    One query , the number of subnets and addreses seemed same

                                    in the following calculations 10.0.0.0/17

                                    Hosts are 2^15 -2 = 32766.

                                    Subnets  = 32768, according to the site, which is confusing to me

                                    as /17 = 2^17 which would be the number of subnets which

                                    is 131072.

                                    1 2 Previous Next

                                    More Like This