Ivy Consultants Inc.

Consulting Services for Security, Networking, Wi-Fi and Windows Server

Objective
To demonstrate a method of quickly calculating subnets in a TCP/IP environment.
A method of learning subnetting in five minutes

In order to make this demonstration as easy as possible, assume that we’re dealing with a Class C address.
Also assume that we’re using a subnet mask of 255.255.255.240

The only usable subnet masks are:
l 255.255.255.192 Binary 1100 0000
l 255.255.255.224 Binary 1110 0000
l 255.255.255.240 Binary 1111 0000
l 255.255.255.248 Binary 1111 1000
l 255.255.255.252 Binary 1111 1100
l 255.255.255.254 Binary 1111 1110

240 decimal is 1111 0000 in binary
128 64 32 16 8 4 2 1
| | | | | | | |
1 1 1 1 0 0 0 0

Count from the rightmost “1” position
128 64 32 16 8 4 2 1
| | | | | | | |
1 1 1 1 0 0 0 0
Double the value with each value counted to the left as below.
(1 – 2 – 4 – 8)

Double this amount (8 in this example) equals 16 and subtract 2. The result
is the number of subnets available (in this case, 14)
Repeat the exact same procedure for the “0” values to obtain the number
of hosts available (also 14 in this case)

To calculate for 255.255.255.224
128 64 32 16 8 4 2 1
| | | | | | | |
1 1 1 0 0 0 0 0
This results in 6 subnets (2n-2) and 30 hosts per subnet (same formula)

Calculating a Class B Address
Calculate the subnets for 255.255.240.0 in the same way.
For hosts, you need to count all of the “0” values from both the third and
fourth octet.
(14 subnets, 4094 hosts/subnet)

A class B address requires you to
count the “0” values in the 3rd and
4th octets (255.255.240.0 is below):
11111111.11111111.11110000.00000000
Count these “0” values ^^^^ ^^^^^^^
(2048*2=4096-2=4094 available hosts)