Subnetting Question

in Off-Topic
I need to create 14 subnets and the largest subnet requires 500 hosts. I'm starting out with 172.16.0.0/16. I'm not sure how many bits I need to borrow to satisfy 500 hosts. Would I need to borrow 9 bits to make a /25? (2^9-2=510)
172.16.0.0/25
255.255.255.128
This is that correct?
172.16.0.0/25
255.255.255.128
This is that correct?
Currently Studying: Anything & Everything/Cisco Networking Academy For CCNA. (on hold)NetworkVeteran wrote: »There's room for those who want the easy work and those who want the challenges. You will, of course, generally be compensated in proportion to what you shoulder.
Comments
-
dustinmurphy Member Posts: 170
To have a total of over 500 hosts, you'd borrow 7 bits, making it a /23. That will give you 128 subnets(I believe) with 510 hosts each.
so...
172.16.0.0/23
255.255.254.0
Your blocks would be 2....so...
172.16.0.0/23
172.16.2.0/23
172.16.4.0/23
I'm pretty new to subnet math, but I'm pretty sure that's right...
a /25 would give you 2 (non-classful) or 512(classful) subnets with 126 hosts in each subnet.
etc....
If I'm not mistaken, this is the math for the correct answer:
172.16.0.0 is a class b subnet, so 255.255.0.0
2^7 = 128 (how many subnets)
256(8 bits)/128(total subnets) = 2 (subnet block size)
(2 (block size)*256 (hosts in each block)) -2 (for network/broadcast) = 510 (how many hosts per subnet)
Here's the math on your answer:
You wouldn't borrow 9 bits, you'd borrow 1 from a /24 or 255.255.255.0 (to make the math a bit easier)
2^1 = 2 (how many subnets)
256/2 = 128 (subnet block size)
(128 (block size)*1(since it's using the last octet))-2 (network/broadcast) = 126 hosts per subnet
Classful would give you 512 (2^9)subnets of 126 hosts per subnet.
therefore a 172.16.0.0/25 would give you 2 subnets with 126 hosts each. -
computer g33k Member Posts: 149
Thanks dustin, I think I understand now.NetworkVeteran wrote: »There's room for those who want the easy work and those who want the challenges. You will, of course, generally be compensated in proportion to what you shoulder. -
drkat Banned Posts: 703
^^
172.16.0.0/16
We need 500 hosts so... we know that 2^9 = 512 so since this is a class B network address we use the 3rd octet for working this out.
if we know we need 9 bits to cover the host requirement then we simply "turn on" 7 1's int he 3rd octet
172.16.0.0
===========
172.16.11111110.00000000 -> what it looks like in binary for the 2 last octets
128 64 32 16 8 4 2 1
1 1 1 1 1 1 1 0
172.16.0.0
255.255.254.0
2^9-2 = 510 hosts per subnet
2^7 = 128
so we have 128 subnetworks and 510 available hosts per network -
Forsaken_GA Member Posts: 4,024 ■■■■■■■■■■
You're actually approaching it the wrong way. You should be considering how many bits you need to borrow to get the requisite number of subnets.
Borrow one bit, you have 2 subnets. Borrow two, you have 4. 3 you have 8, 4 you have 16. Alright, so if you borrow 4 bits, you can make the right number of subnets. That leaves you with 12 bits for host addressing. 2^12 = 4096. So each of your subnets can support 4094 hosts, leaving you with plenty of room for growth in the subnets, and they're big enough that you can chop a single one of those up into much smaller bits if you require further subnets later on (I have no idea what the other requirements are, but I suspect that if 500 hosts is what the largest of the subnets requires, I could chop a single /20 up into enough bits to satisfy the needs of the entire question, and have all the other ones for growth) -
computer g33k Member Posts: 149
Ok, thanks guys. So for example, if I needed 20 subnets and largest subnet requires 1000 hosts. I would borrow 6 bits 2^6=32 since 20 falls in between 16 and 32. I would then be left with 10 bits for hosts 2^10-2=1022 host per subnet. Am I correct?NetworkVeteran wrote: »There's room for those who want the easy work and those who want the challenges. You will, of course, generally be compensated in proportion to what you shoulder.