VLSM with class B
jerry557
Member Posts: 26 ■■□□□□□□□□
in CCNA & CCENT
Im getting kind of hung on probably something very simple concerning VLSM for Class B.
If you are given a situation where it gives you an IP 172.16.0.0 /22, and you have to use VLSM to subnet, what place do you begin? Like if you need 500 hosts on your largest subnet, for example.
The examples I've seen are based on /16. So the /22 at the start confuses me. What in the problem does that change?
If you are given a situation where it gives you an IP 172.16.0.0 /22, and you have to use VLSM to subnet, what place do you begin? Like if you need 500 hosts on your largest subnet, for example.
The examples I've seen are based on /16. So the /22 at the start confuses me. What in the problem does that change?
Comments
-
pinkiaiii Member Posts: 216If you are given a situation where it gives you an IP 172.16.0.0 /22, and you have to use VLSM to subnet, what place do you begin? Like if you need 500 hosts on your largest subnet, for example.
The examples I've seen are based on /16. So the /22 at the start confuses me. What in the problem does that change?
Ok
gonna try to give some help-works for me remembering as well,if it helps
so class b address 172.16.0.0/16 has total of 65thousand hosts,if your borrow one bit to make it /17 you take 128th bit -and this creates 32xxxx hosts,if you borrow 64th bit or two bits and make it /18 you get 16+thousand hosts.Now one trick to remember that /24 gives you 254 hosts-so if you go in reverse of /24 and take /23 you get 510 hosts then /22 gives you 1020 hosts,/21 204x hosts ,/20 4000+,/19 8000+ and come back to /18 is 16thousand.
thats all from my head and its late btw now say you get mask /22 and you dont know where to start with your ip of 172.16.0.0 - so write out /22 mask 255.255.252.0 if your still following then you would notice 3 bits are left out so your subnets increment by 3 > 1+2 bits so your address increments by 172.16.0.1 to 172.16.3.255 or 254 last usable address,then it goes 172.16.6.255
now for your 500 hosts
since we know that we get 254 hosts on /24 then /23 gives us 510 hosts
so how do they increment subnet is 255.255.254.0 < the bit that is missing is magical number of some sorts thus its last bit which is one so your subnets go like 172.16.1.255,172.16.2.255
its a bit different with calculating subnets as keep forgetting but very similar,all in you just need to find technique that works for you since everyone has different ones or preferred,as this example is a bit time consuming and simpler way is just to pick magic number from subnet mask like say 240= 16 then you know that your host ranges are between (0-16,32,48,64,80,96,124,and so on.
do it in your head once you find what suits you and use :IP Calculator / IP Subnetting to check if in doubt.also get few charts with a,b,c class subnets.
also to answer your question if someone gives you /22 address 255.255.252.0 just change mask to /23 255.255.254.0 and work from there.
also almost asleep-eu time zone vlsm once you use largest subnet you go up for smaller ones,
ex you need 500hosts and 120
first 172.16.1.255 /23 -500 hosts
next find where is 120 and i know thats /25 thus next address
172.16.2.1-172.16.2.128,255>3.128 if you need 30 hosts its /27 so say 172.16.3.129-159 thus total you get
172.16.1.255 /23 500h 255.255.252.0 -magic number 1
172.16.2.128/25 120h+ 255.255.255.128 -magic number 128
172.16.2.129-159 /27 30hosts 255.255.255.192 -magic number 32
btw sorry if its a mess since reading over cant get very confusing,thus bottom part is your vlsm,also check out danscourses on youtube or site on vlsm he explains way better and takes like 10 minutes. -
GDaines Member Posts: 273 ■■■□□□□□□□Im getting kind of hung on probably something very simple concerning VLSM for Class B.
If you are given a situation where it gives you an IP 172.16.0.0 /22, and you have to use VLSM to subnet, what place do you begin? Like if you need 500 hosts on your largest subnet, for example.
Apologies, I didn't read all through the previous answer so sorry if I'm repeating.
Chris Bryant's video course on Udemy helped clarify subnetting for me, although it's still so easy to slip up (when working in the last octec I often calculate the answer as if I'm in the 3rd octet, but that's irrelevant).
Remember this:
10.x address is class A, 1st octet (/8 ) default for network bits - over 8 and you're subnetting.
172.x address is a class B, first 2 octets (/16) default for network bits, any more and you're subnetting.
192.x address is a class C, first 3 octets (/24) default for network bits, any more and again you're subnetting.
Let's work out your subnet mask using binary: 11111111.11111111.11111100.00000000 (22 ones from the /22)
Count the extra 1's above the default number (16 for a class B address) for network bits and all the 0's for host bits.
22x 1's -16 = 6 so 2 to the power of 6 = 64 possible subnets.
10x 0's = 2 to the power of 10 or 1024 but wait... deduct 2 for network and broadcast addresses, so there are 1022 possible hosts.
Now using powers of 2 you can have 256, 512, 1024, 2048 so let's look at what you need. You said 500 hosts... 512 -2 for network and broadcast addresses = 510 which is enough, so you only actually need 9 host bits or a /23 (which would give you 128 subnets).
Hope that's clear? -
pinkiaiii Member Posts: 216good point on finding amount of subnets,but memorizing powers of two is kinda hard concept for me anyways,since if its small number 2^2 it still confuses me,but say if you just write 6 (ones) or sticks etc ,then go fast 2,4,8,16,32,64 your there-thus skipping mind calculator.But as mentioned everyone has their own way,thus whichever works best.
for me personally when doing this at average pace is easy but in exam its different story thus guess one might do better with knowing powers of 2.
main glitch for me personally are border parts like /23 /15 then also easy to forget when you get your host min max x.x.255.255
since there are instances where that 255 if missed could be valid host address. -
GDaines Member Posts: 273 ■■■□□□□□□□good point on finding amount of subnets,but memorizing powers of two is kinda hard concept for me anyways
To be honest I refer to the attached all the time. When I finally go for my exam I'll leave out the text but write out all the info in boxes before I start, then I won't have to try to count up in 8's (or 4's which can be easily worked out from the chart of 8's), or 16's (again 32's and even 64's can be worked out from that one). Although the powers of 2 are easy enough, why spend time counting 2, 4, 8, 16, 32 up to whatever I need each time when I can quickly look it up on a chart - 2^12=4096 answered in 5 seconds instead of 20+ seconds counting on my fingers
-
volfkhat Member Posts: 1,072 ■■■■■■■■□□HI Jerry,
don't get frustrated. This stuff can definitely be learned. You just need sensible instruction :]
I am feeling brave... so maybe i can help you out a bit.Im getting kind of hung on probably something very simple concerning VLSM for Class B.
If you are given a situation where it gives you an IP 172.16.0.0 /22, and you have to use VLSM to subnet, what place do you begin? Like if you need 500 hosts on your largest subnet, for example.
Question: So, where do you begin?
Answer: It depends what the question is asking for :]
Let's use your example.
Let's assume they are asking for a subnet large enough to hold "500 hosts" in your subnet.
So... all you need toi do is figure out the closet "power of 2" that will put you over 500.
Or, asked another way,
2 ^ 1 = 2 (not bigger than 500. keep going)
2 ^ 2 = 4 (not bigger than 500. keep going)
2 ^ 3 = 8 (not bigger than 500. keep going)
What "power of 2" do we need? -
james43026 Member Posts: 303 ■■□□□□□□□□I like where volkhat is going with this. Most of the time, the best way to learn, is to work through something.
-
jerry557 Member Posts: 26 ■■□□□□□□□□Let me see if I get this fully....
So the address space being subnetted would be 172.16.0.0-172.16.3.255 if it is a /22 ? This would mean the total hosts could not exceed 1024 addresses in theory?
So if you need 5 networks, with each network's usable hosts as 500, 150, 60, 2, and 2.
172.16.0.0 - 172.16.1.255 /23 (512 hosts)
172.16.2.0 - 172.16.2.255 /24 (256 hosts)
172.16.3.0 - 172.16.3.63 /26 (64 hosts)
172.16.3.64 - 172.16.3.67 /30 (4 hosts)
172.16.3.68 - 172.16.3.71 /30 (4 hosts)
So basically when doing this, if the CIDR goes above 24 bits, you increment only the 4th octet? If the CIDR is 16-23, you increment the 3rd octet?
Now say network 2 needed 260 hosts. That would make this scheme unusable, correct? Since you would then have to bump up to the 512 host bit and you would run out of space for the other networks? -
Priston Member Posts: 999 ■■■■□□□□□□yes, 172.16.0.0/22 = 172.16.0.0 - 172.16.3.255
The total HOSTS could not exceed 1022 addresses.
Remember each subnet has a network address and a broadcast address.
172.16.0.0 - 172.16.1.255 /23 (510 hosts) 172.16.0.0 network address, 172.16.0.1 - 172.16.1.254 host address, 172.16.1.255 broadcast address
172.16.2.0 - 172.16.2.255 /24 (254 hosts)
172.16.3.0 - 172.16.3.63 /26 (62 hosts)
172.16.3.64 - 172.16.3.67 /30 (2 hosts)
172.16.3.68 - 172.16.3.71 /30 (2 hosts)
Yes to the other questions.A.A.S. in Networking Technologies
A+, Network+, CCNA