VLSM Question
Johnny Johnson
Member Posts: 241 ■■■□□□□□□□
in CCNA & CCENT
I am a little confused when it comes to VLSM. Will someone go through the process of explaining why the answer to the question below should be /27 and not /26? The question is asking for 20 hosts, so I thought that you borrow 5 bits from the original /21 (2 to the power of 5 is 32, then subtract 2 to get 30 hosts).
Thanks in advance!
Thanks in advance!
Next up: 100-101 ICND1 :study:
Keep the Son in your eyes!
Keep the Son in your eyes!
Comments
-
networker050184 Mod Posts: 11,962 ModYou need 5 bits in the host portion to accommodate the hosts. So five bits there and the rest in the network is a /27.An expert is a man who has made all the mistakes which can be made.
-
Johnny Johnson Member Posts: 241 ■■■□□□□□□□networker050184 wrote: »You need 5 bits in the host portion to accommodate the hosts. So five bits there and the rest in the network is a /27.
I'm still a little confused. How did you get the 5 bits? Did you subtract /27 from /32? I was thinking we were supposed to borrow bits from the original /21, so I was borrowing 5 to get to /26, which is why I thought that /26 was the answer.Next up: 100-101 ICND1 :study:
Keep the Son in your eyes! -
markulous Member Posts: 2,394 ■■■■■■■■□□You need a /27 because you need the smallest subnet that will accommodate 20 hosts. Since we know our increments are 1, 2, 4, 8, 16, 32, 64, 128, etc, we need to use 32, which would be a /27. This would allocate 30 hosts per subnet and allow you to save a ton of addressing space.
-
networker050184 Mod Posts: 11,962 ModThe same way you got five bits. 2, 4, 8, 16, 32. You also have to have as little wast as possible so a /26 wastes space.
I'd write it out in binary to get a good feel for it before trying to do subtraction tricks.An expert is a man who has made all the mistakes which can be made. -
chopsticks Member Posts: 389Johnny Johnson wrote: »I'm still a little confused. How did you get the 5 bits? Did you subtract /27 from /32? I was thinking we were supposed to borrow bits from the original /21, so I was borrowing 5 to get to /26, which is why I thought that /26 was the answer.
My understanding is, with /21 of a Class B network, it means 5 bits have been borrowed to create 32 subnets (2^5) with 2046 hosts per subnet (2^11 - 2). Since the host-bit portion has 11 bits to play with, we can further manipulate these 11 bits into smaller subnets. Since the question has asked for 20 hosts, and (2^4 bits - 2) only gives 14 hosts which isn't enough, but (2^5 bits - 2) yields 30 hosts which is sufficient to cover 20 hosts requirement, so we are affirmative that host bit part is 5, which it gives us notation of /27:
NNNNNNNN.NNNNNNNN.SSSSSSSS.SSSHHHHH
where
N = Network Bit
S = Subnet Bit
H = Host Bit
Correct me if my understanding is wrong. -
networker050184 Mod Posts: 11,962 ModI think you are over complicating things quite a bit there chopsticks. With VLSM/CIDR just forget about the whole class thing and borrowing bits etc. When you pull that /21 out you aren't creating 32 subnets. Hell the next subnet could be a /24 or even a /32 out of there. Just use the binary at his point.
You basically have this to play with as you see fit if you have a /21:
NNNNNNNN.NNNNNNNN.NNNNNHHH.HHHHHHHHAn expert is a man who has made all the mistakes which can be made. -
chopsticks Member Posts: 389Thanks networker050184 for the pointers, let me go back to my books again. :>
Edit: I recommend OP to sign up with CBT Nuggets and watch Jeremy Cioara's nuggets on VLSM for a clearer picture (I just re-watched it) after my last post. :> -
kianm Member Posts: 8 ■□□□□□□□□□Johnny Johnson wrote: »I am a little confused when it comes to VLSM. Will someone go through the process of explaining why the answer to the question below should be /27 and not /26? The question is asking for 20 hosts, so I thought that you borrow 5 bits from the original /21 (2 to the power of 5 is 32, then subtract 2 to get 30 hosts).
Thanks in advance!
Hi OP,
The method i found easiest to work out subnetting is:
After you have found the appropriate power of 2 then:
If the question is asking you to reserve space for x hosts, reserve the bits from right to left (reserve 0s)
If the question is asking you to reserve space for x subnets, reserve the bits from left to right (reserve 1s)
So in your example question we want to reserve 5 HOST bits so we reserve five 0s in the subnet mask from right to left thus 11111111 . 11111111 . 11111111 . 11100000 = /27
Hope that helps -
dewey hafta Member Posts: 39 ■■□□□□□□□□Hi OP,
The method i found easiest to work out subnetting is:
After you have found the appropriate power of 2 then:
If the question is asking you to reserve space for x hosts, reserve the bits from right to left (reserve 0s)
If the question is asking you to reserve space for x subnets, reserve the bits from left to right (reserve 1s)
So in your example question we want to reserve 5 HOST bits so we reserve five 0s in the subnet mask from right to left thus 11111111 . 11111111 . 11111111 . 11100000 = /27Hope that helps
This is how I do it too.