Question : when to -2 and when not

hi
ok so on tcpip subentting i have seen lots of stuff on when to use -2 and when not, can someone clarify nice and easy when to use thee -2 rule. I know that you always use -2 for the hosts but i see in some web sites were they also -2 for the valid number of subnets and then some site that dont do that, which way is correct and how do you know?

cheers

Answer : when to -2 and when not

They should never. Old-fashioned, not needed anymore.

To clarify my statement above about all-one and all-zero: This is refering to the host part of Class'd network, meaning e.g. with Class C 192.168.0.x, you cannot use
192.168.0.0
192.168.0.255

With subnetting one bit more, you cannot use
192.168.0.0
192.168.0.127
192.168.0.128
192.168.0.255

The 2^n-2 is not to be applied to the subnet, it is applied to host, for above reason. You need NEVER to exclude subnets. But it is a common misunderstanding.
"If you have 18 hosts, how much subnets can you build" is the type of question where the 2^n-2  rule comes into play. You need 18+2 host addresses (because of all-one and all-zero), that is 20, and the next fitting 2^n is 32, 5 bit.
That's the way to use the rule.
Random Solutions  
 
programming4us programming4us