What is the smallest subnet mask that can support 719 hosts?
dlx509
Member Posts: 21 ■□□□□□□□□□
in CCNA & CCENT
What is the smallest subnet mask that can support 719 hosts?
The answer is 255.255.252.0
can anyone here please explain to me how to get to this answer? I know that the number of host is= (2 to the power of the number of host bits-2) but I dont know how to reverse the operation.
Thank you,
The answer is 255.255.252.0
can anyone here please explain to me how to get to this answer? I know that the number of host is= (2 to the power of the number of host bits-2) but I dont know how to reverse the operation.
Thank you,
Goal for 2013:
[ ✔ ] ICND1 [ ✔ ] ICND2 [ ✔ ] Network+ [ ✔] SSCP [ ✔ ] Security+
[ ✔ ] ICND1 [ ✔ ] ICND2 [ ✔ ] Network+ [ ✔] SSCP [ ✔ ] Security+
Be so good that they can't ignore you.
Comments
-
jeremylz Member Posts: 7 ■□□□□□□□□□The max number of hosts for a common network 255.255.255.0 or /24 is 254 (256 -2 for the all zero and all 1 addresses, in this case x.x.x.11111111 and x.x.x.00000000 where the x's are 8 1's)
The max number of hosts for a /23 (255.255.254.0) network is 510 (512-2)
The max number of hosts for a /22 (255.255.252.0) network is 1022 (1024-2)
With this information, you need to just pick the smallest (highest / number) that has more hosts than is needed, which would be the /22 in this case -
dlx509 Member Posts: 21 ■□□□□□□□□□Thank you sir!
I see what you did there lol.
so the max # of host for a /24 is 254
/23 is 510
/22 is 1022
/21 is 2046
and so on.......
but I was wondering is there a formula for it? or is this one more thing I need to memorize?
So the logic behind this is: to round the # of host to the next block ( ie 256,512, etc...) then use /24 as a starting point to move left or right depending on the number of host needed.Goal for 2013:
[ ✔ ] ICND1 [ ✔ ] ICND2 [ ✔ ] Network+ [ ✔] SSCP [ ✔ ] Security+Be so good that they can't ignore you. -
pamccabe Member Posts: 315 ■■■□□□□□□□Try to memorize the powers of 2. In Jeremy's example, there are 24 network bits which leaves 8 host bits. 2 to the power of 8 is 256. However, you need to reserve two addresses. One for the subnet ID and the other is the broadcast address. So 256-2 is 254. If you had a /20 mask, that would leave 12 bits for hosts. 2 to the 12th power would be 4096, subtract two because we have a subnet ID and broadcast address that do not get assigned to hosts. That means 4094 hosts possible. memorizing the powers of two will make your subnetting go faster.
-
amclone Member Posts: 31 ■■□□□□□□□□Check out the CBTNugget subnetting section on either the ICND1 or ICND2 videos. That is how I learned how to subnet. Jeremy breaks it down and makes it easy.Working on CCNP Switch.
-
mella060 Member Posts: 198 ■■■□□□□□□□but I was wondering is there a formula for it? or is this one more thing I need to memorize?
Yep there sure is. The hosts formula is 2^n-2 where n is the number of host bits or 0's.
So if you need 719 hosts on a subnet then you apply the formula to find the minimum number of host bits you require.
8 host bits 255.255.255.0... 2^8-2 = 256-2 = 254 not enough
9 host bits 255.255.254.0... 2^9-2 = 512-2 = 510 not enough
10 host bits 255.255.252.0... 2^10-2 = 1024-2 = 1022 hosts which is plenty
So basically you need to know your network (2^n) and host (2^n-2) formulas and your powers of 2. -
Hatch1921 Member Posts: 257 ■■■■□□□□□□So the logic behind this is: to round the # of host to the next block ( ie 256,512, etc...) then use /24 as a starting point to move left or right depending on the number of host needed.
Yes... I use this method as well... my baseline numbers are /23 and /27 and when you have a particular starting point memorized, you can quickly determine which direction you need to work in. As soon as you asked for 700+ hosts.... I went to /23 for 512 host (510 usable) and just worked left of the scale and doubled it to a /22 or 1024 (1022) hosts.
Good info all around in this thread.
Hatch