Is there a way to better calculate subnetting than this way?

SurferdudeHBSurferdudeHB Member Posts: 199 ■■■□□□□□□□
154.36.190.126 /21

Belongs to network 154.36.184.0

But for me to get this answer I had to multiply 8x till I reached the 190 range and actually made some errors multiplying till I reach the correct range.

Comments

  • EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    154.36.190.126 /21

    Belongs to network 154.36.184.0

    But for me to get this answer I had to multiply 8x till I reached the 190 range and actually made some errors multiplying till I reach the correct range.

    Normally i process this type of calculation as follows:
    24-21 = 3
    2^3 = 8
    8 x 10 = 80
    80 x 2 = 160, nearly there now, only 30 more to play with.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • tech-airmantech-airman Member Posts: 953
    154.36.190.126 /21

    Belongs to network 154.36.184.0

    But for me to get this answer I had to multiply 8x till I reached the 190 range and actually made some errors multiplying till I reach the correct range.

    SurferdudeHB,

    What class is that IP address?
  • frenchvfrenchv Member Posts: 26 ■□□□□□□□□□
    SurferdudeHB,

    What class is that IP address?

    I believe it's B
  • maumercadomaumercado Member Posts: 163
    Once you have the mask and the host ip, you could do an bit AND operation between the mask given and the host ip, and youll get your network address ip!

    Like this:
    we are only interested in the last two octets cuz in AND op 1 AND 1 = 1 the rest is 0 hence the first tow octets will remain the same

    mask 21 = 11111111.11111111.11111000.00000000
    AND
    ip addr = xxxxxxxx.xxxxxxxx.10111110.01111110 = x.x.190.126

    Net addr = xxxxxxxx.xxxxxxxx.10111000.00000000 = x.x.184.0

    Now as I stated above the first two octets are the same in the ip because of the bit AND operation giving Net address = 154.36.184.0/21

    The "hardest" part here is transforming into binaries...
  • PC509PC509 Member Posts: 804 ■■■■■■□□□□
    Well, that makes it easy for me! I've done it the hard way for so long. Everyone has their own little tweaks to it, and explains it a bit differently, and that is perfect for me. I've got other little ways for other parts, but that is good. :)

    Thanks, man!
  • tech-airmantech-airman Member Posts: 953
    frenchv wrote: »
    I believe it's B

    frenchv,

    Why do you believe it's a class B IP address?
  • frenchvfrenchv Member Posts: 26 ■□□□□□□□□□
    frenchv,

    Why do you believe it's a class B IP address?

    Initial byte: 128 - 191 is class B right?
  • tech-airmantech-airman Member Posts: 953
    frenchv wrote: »
    Initial byte: 128 - 191 is class B right?

    frenchv,

    What is the binary range of that decimal range?
  • maumercadomaumercado Member Posts: 163
    n = network
    h = host

    Class A - 0nnnnnnn hhhhhhhh hhhhhhhh hhhhhhhh

    * First bit 0; 7 network bits; 24 host bits
    * Initial byte: 0 - 127
    * 126 Class As exist (0 and 127 are reserved)
    * 16,777,214 hosts on each Class A

    Class B - 10nnnnnn nnnnnnnn hhhhhhhh hhhhhhhh

    * First two bits 10; 14 network bits; 16 host bits
    * Initial byte: 128 - 191
    * 16,384 Class Bs exist
    * 65,532 hosts on each Class B

    Class C - 110nnnnn nnnnnnnn nnnnnnnn hhhhhhhh

    * First three bits 110; 21 network bits; 8 host bits
    * Initial byte: 192 - 223
    * 2,097,152 Class Cs exist
    * 254 hosts on each Class C

    Class D - 1110mmmm mmmmmmmm mmmmmmmm mmmmmmmm

    * First four bits 1110; 28 multicast address bits\
    * Initial byte: 224 - 247
    * Class Ds are multicast addresses - see RFC 1112

    Class E - 1111rrrr rrrrrrrr rrrrrrrr rrrrrrrr

    * First four bits 1111; 28 reserved address bits
    * Initial byte: 248 - 255
    * Reserved for experimental use
  • blackninjablackninja Member Posts: 385
    The way I subnet: Takes around 30 seconds (if that) - with practice!

    I have seen some stupid subnetting questions and thought I'd offer they way I do it to try and help.

    Before you try and learn how to subnet you need to learn binary and the different classes of addresses.

    Forget magic numbers and special tables, if you know binary it's easy, trust me.

    Assumming the ip subnet zero command is in use, we will find the network address, broadbast address and address range.

    191.16.97.150 with a mask of 255.255.255.192


    Prefix notion:255.255.255.192 = /26


    In the mask you always ignore the 255 and the 0 part so we use the 192 part( 4th octet )in the mask and the address.

    192 in binary is:
    128 64 32 16 8 4 2 1
    1 1 0 0 0 0 0 0


    What ever the last one is in the mask, 64 in this case, this is the number the subnet go up by:

    Network number: 0 range: 0-62 BC Address: 63
    Network number: 64 range: 65-126 BC Address: 127
    Network number 128 range: 129-190 BC Address: 191
    Network number 192 range: 193-254 BC Address: 255
    Network number 256 (not valid as greater than 255)


    Therefore as 192 in the mask is the 4th octet we use the 4th octet in the address: 150

    From the above find what number is below 150, 150 is between 128 and 192 therefore:

    191.16.97.150 /26

    Network number 191.16.97.128 /26
    range: 191.16.97.129 - 191.16.97.190
    Broadcast Address: 191.16.97.191

    After a bit practice as soon as you see the mask, you know the multiples of the subnets.
    They can only be 128, 64, 32, 16, 8, 4, 2 or 1.. Look familiar don't they.
    Currently studying:
    CCIE R&S - using INE workbooks & videos

    Currently reading:
    Everything. Twice ;)
  • SurferdudeHBSurferdudeHB Member Posts: 199 ■■■□□□□□□□
    frenchv,

    what is the binary range of that decimal range?

    1000000 - 1011111
  • tech-airmantech-airman Member Posts: 953
    1000000 - 1011111

    SurferdudeHB,

    Do you notice the leftmost bits of "10xxxxxx."? What is the default mask for a Class B IP address?
  • KaminskyKaminsky Member Posts: 1,235
    154.36.190.126 /21

    Belongs to network 154.36.184.0

    But for me to get this answer I had to multiply 8x till I reached the 190 range and actually made some errors multiplying till I reach the correct range.

    Once you know how to do it, hit subnettingquestions .com over and over and over. Really great for ramming the theory home but also subconsciously increases your ability to do these calculations quickly as you get used to doing them over and over and you train your brain to recognise the patterns. This is where you hear "subnetting in your head".

    When I was learning subnetting I was hitting the site for an hour in the morning, an hour in the afternoon and then again in the evening. Even though I moved on to other topics, I kept doing that regime for about a month.

    The brain is best when it is recognising patterns and learning by repitition. Standard "What's the subnet and broadcast and what other IPs are in the range" type questions, I was getting done in about 10 seconds once I had trained my brain to do the math almost subliminally.

    As CCNA has questions where subnetting forms a small initial part of the answer, spending as little time calculating this will save you time on the rest of the question and therfore a lot of time overall.
    Kam.
  • tim100tim100 Member Posts: 162
    154.36.190.126 /21

    Belongs to network 154.36.184.0

    But for me to get this answer I had to multiply 8x till I reached the 190 range and actually made some errors multiplying till I reach the correct range.

    The third octet leaves 5 bits for network addresses.
    2^5 = 32 networks
    It can't be 192 so do 128 + 32 = 160
    Bit 5 = 8
    3 X 8 = 24
    160 + 24 = 184

    Network Address = 154.36.184.0
  • SurferdudeHBSurferdudeHB Member Posts: 199 ■■■□□□□□□□
    surferdudehb,

    do you notice the leftmost bits of "10xxxxxx."? What is the default mask for a class b ip address?

    255.255.0.0
  • tech-airmantech-airman Member Posts: 953
    255.255.0.0

    SurferdudeHB,

    Questions:
    1. What is the relevant octet? Hint: look past the default mask.
      1. First octet
      2. Second octet
      3. Third octet
      4. Fourth octet
    2. How much longer, in bits, is the subnet mask compared to the default mask?
    3. What is the subnet address for the IP address?
Sign In or Register to comment.