Hey guys I stumped myself with my own subnetting.
How do I do the "math" for a subnet of:
172.16.22.5
255.255.254.0
I do my math like this:
for the mask as you guys know 256 - mask = hosts and then of course you minus 2 for the network/broadcast ID later on.
subnet mask
128
192
224
240
248
252
254
255
hosts per subnet
255
128
64
32
16
8
4
2
1
2 power
2^7
2^6
2^5
2^4
2^3
2^2
2^1
2^0
For hosts per subnet I use the relations trick; 255 (hosts) is to 1 (subnets), 128 is to 2, 64 is to 4, 32 is to 8, and 16 is by itself.
my formula's are:
subnets equal 2^S= subnets
hosts equals 2^H-2 = hosts
So I get this far:
Subnets = 2^S= (256-254=2) so since that's in the 7 bit I'd go 2^S= 2^7= 254 which is 2 hosts per subnet which has a relationship to 128 so its 128 subnets with two hosts per subnet...
So with 7 bits of 8 being used for subnets, I only have 1 bit left over for hosts but I've found I can't subtract 2 from well 2 like so....
Hosts = 2^H-2 so that would be with the above math 2^1-2 = 0.
So I know this won't work, I think I need to make this a /23 and make two /24 subnets but I don't know how to do the math....
Can someone please help me out; I've been subnetting for weeks and then I make this one I made and stump myself, lol!!!!

....I want to be prepared for anything...