Like the title says, how do you do it?
I'll hold up 8 fingers and then start halving... 128, 64, 32, 16, 8, 4, 2... and then I subtract two from all but the last, since I learned about the /31 a year ago.
256 subtraction method, 256 - the number in the mask
so with a 255.255.255.240
256-240 = 16, then subtract 2 for the network and broadcast 16-2 = 14, 14 hosts is the correct answer,
this is only efficient for /24 networks or greater.
for /16 through /23 multiply by 256
255.255.240.0
256-240 = 16, 16x256 = 4096 - network and broadcast 4096-2 = 4094
for lager networks /9 - /15 you could always multiple by 256 twice.
Say, I like that 256 method. Nice and clean. Thanks!
Nice! I haven't heard of that method, thanks!
this also helps with subnetting,
255.255.255.192
256-192 =64
so your multiplier is 64,
subnets are .0, .64, .128, .192
I ought to write that up so that I remember it better.
Mad rep point to Mr. Ristau.
same as ristau5741