IP Subet Calculation
IP Subet Calculation
html
Related Information
Host/Subnet Quantities Table
While the tool is useful, it doesn't teach IP subnetting. It is highly recommended that users understand the
mechanics behind IP subnetting by reading other sources like "Internetworking with TCP/IP" by Comer.
This tool is for calculations only, and doesn't implement limitations and rules imposed by various RFCs. For
practical purposes, users must understand these limitations and rules. For example, the network 10.0.0.0
should not be advertised on internet and should be used internally, however the tool doesn't distinguish this
network address from others.
User Interface
Inputs
IP Address is an input that specifies the IP address for which the subnet calculation and/or design is desired.
Ending zeros can be omitted, e.g. a network address 132.50.0.0 can be entered as 132.50 (or even
132.50.0).
Decimal numbers and dots typed in style of in IP address are the only valid characters.
Address Mask is an input that specifies the classful IP address mask using which the subnet calculation can be
achieved.
So, for a class B network address 132.50.0.0 a mask of 255.255.255.0 or just 8 (bits of classful mask,
not 24 bits which should be for classless mask) can be used.
Also ending zeros can be omitted, e.g. an address mask 255.255.255.0 can be entered as 255.255.255
only.
Decimal numbers and dots typed in style of in IP address mask are the only valid characters.
This input is required for actions "Calculate All IP Subnets" and "Find IP Subnet for this address".
Minimum Subnets is an input that specifies the minimum number of subnets that must be available in the
subnet design.
This input is required for actions "Design IP Subnetting (maximize subnets)", "Design IP Subnetting
(maximize hosts)", and "Design IP Subnetting (minimize wastage)".
Minimum Hosts/Subnet is an input that specifies the minimum number of hosts that must be available in
every subnet of the subnet design.
This input is required for actions "Design IP Subnetting (maximize subnets)", "Design IP Subnetting
(maximize hosts)", and "Design IP Subnetting (minimize wastage)".
VLSM Masks are inputs that specify the classful IP address masks for calculation of subnetting which
incorporates variable length subnet masking (VLSM).
So, for a network address 132.50.0.0 a mask of 255.255.255.0 or just 8 (bits of classful mask, not 24
bits which should be for classless mask) can be used.
Also ending zeros can be omitted, e.g. an address mask 255.255.255.0 can be entered as 255.255.255
only.
Decimal numbers and dots typed in style of in IP address mask are the only valid characters.
At least one of these inputs is required for action "Calculate Subnetting using VLSM". Others not
specified will be taken as zero.
Actions
This action extracts network address and class from the IP Address (which can be network, subnet or
host address).
Then it calculates all possible subnets using the given Address Mask or classful mask bits.
This action extracts host address from the given IP Address (which can be network, subnet, or host
address).
Then it calculates the subnet address that contains this host address using the given Address Mask or
classful mask bits.
This action extracts network address and class from the IP Address (which can be network, subnet or
host address).
Then it calculates the classful mask bits from Minimum Subnets and Minimum Hosts/Subnets such that
maximum subnets are available while minimum hosts/subnet requirement is met.
Finally, it calculates all possible subnets using the classful mask bits.
This action extracts network address and class from the IP Address (which can be network, subnet or
host address).
Then it calculates the classful mask bits from Minimum Subnets and Minimum Hosts/Subnets such that
maximum hosts/subnet are available while minimum subnets requirement is met.
Finally, it calculates all possible subnets using the classful mask bits.
This action extracts network address and class from the IP Address (which can be network, subnet or
host address).
Then it calculates the classful mask bits from Minimum Subnets and Minimum Hosts/Subnets such that
address space wastage is minimum while minimum subnets and minimum hosts/subnet requirements
are met.
Finally, it calculates all possible subnets using the classful mask bits.
This action extracts network address and class from the IP Address (which can be network, subnet or
host address).
Then it sorts given VLSM Masks or classful mask bits in order of decreasing hosts/subnet.
Finally, it calculates all possible subnets, sub-subnets, and sub-sub-subnets using the given VLSM
Masks or classful mask bits.
Note that this calculation applies to VLSM of class A, B, and C IP addresses only and is not meant for
IP Classless calculations.
Interpreting Results
Sample Output 1
Source: This output is obtained by using IP Address 150.150.10.10, Address Mask 255.255.224.0 (or 3
classful mask bits), and action "Calculate All IP Subnets". The action "Find IP Subnet for this address" will
give the same output except that only one subnet will be shown which contains this IP Address (subnet 0 in
this case).
Action "Design IP Subnetting (maximize subnets)" will give exactly the same output if Minimum Subnets
between 1 and 6, and Minimum Hosts/Subnet between 4096 and 8192 is used. Action "Design IP Subnetting
(maximize hosts)" will give exactly the same output if Minimum Subnets between 4 and 6, and Minimum
Hosts/Subnet between 1 and 8192 is used. Action "Design IP Subnetting (minimize wastage)" will give
exactly the same output if Minimum Subnets between 1 and 6, and Minimum Hosts/Subnet between 4096
and 8192 is used.
-----------------------------------------------------------------------------
IP Class: B IP Address: 150.150.10.10
Mask Bits: 3 Subnet Mask: 255.255.224.0
Subnets: 6+1 IP Major Net: 150.150.0.0
Hosts/Subnet: 8190 Major Net Bcast: 150.150.255.255
Understanding: Top four lines show the basic information like the IP address and subnet mask (or mask bits)
given by user, the extracted IP class, network address (Major Net), and network broadcast address. Also given
are number of subnets [ = 2^(mask bits) -2 ] and hosts/subnet [ = 2^(32 -16 -mask bits) -2 for class B]. The
+1 in front of subnets should be added if ip subnet-zero command is used on Cisco router.
The table that follows shows info about each subnet including subnet number, subnet address, first host
address in subnet, last host address in subnet, and subnet's broadcast address.
Note that even though all subnets are shown, subnet zero should not be used as its subnet address matches the
major net address (some older versions of Unix also used an all zero broadcast which is another factor in the
problem). However, this restriction is waived if ip subnet-zero command is used. Also the last subnet (7 in
this case) shouldn't be used as its broadcast address is the same as major net broadcast address.
Finally, address space wastage is given. Address space is wasted because subnet zero and the last subnet can't
be used, and also because the first address and the last address of the subnet can't be used (first address
identifies the subnet itself, and last address is its broadcast address). This is also the reason for -2 in the above
two formulae. However, using ip subnet-zero command helps bring wastage down as the subnet 0 becomes
usable with this. Note that wastage due to subnetting is at its minimum when number of subnets and
hosts/subnet are the same.
Sample Output 2
Source: This output is obtained by using IP Address 150.150.10.10, VLSM Mask bits 2, 3, and 5, and action
"Calculate Subnetting using VLSM."
-----------------------------------------------------------------------------
IP Class: B IP Address: 150.150.10.10
Mask1 Bits: 2 Subnet Mask1: 255.255.192.0
Mask2 Bits: 3 Subnet Mask2: 255.255.224.0
Mask3 Bits: 5 Subnet Mask3: 255.255.248.0
Understanding: Top four lines show the basic information like the IP Address and VLSM Mask bits entered
by user, and the IP class and masks calculated.
The table that follows shows subnet information similar to SAMPLE OUTPUT 1. It also shows that the major
net is divided in 4 subnets due to the mask bits 2. Each of the subnets is divided in 2 sub-subnets due to mask
bits 3 (or we can say the major net is divided in 8 subnets). Each sub-subnet is divided into 4 sub-sub-subnets
due to mask bits 5 (or we can say that the major net is divided into 32 subnets).
Once this division is understood, a network planner can use a subnet in one portion of the network with more
users, and a sub-subnet out of another subnet in some portion of the network with less users. Note that if a
subnet has been used in one portion of the network, its sub-subnets or sub-sub-subnets shouldn't be used in
other portions of the network. Good planning should lead to logically easy route summarizations.
Address is missing.
IP Address input has not been specified. It is required for all actions.
up. If it does show up, then user may have pressed too many spaces in some input box, or Web is just
going crazy, or in worst case CGI server is out of mind.
Mask is missing.
Address Mask input has not been provided by user when action "Find IP Subnet for this address" or
"Calculate All IP Subnets" is chosen. This input is required for specified actions.
No Action selected.
None of the possible actions has been selected by user. An action must be selected for achieving
results.
Warnings
No Subnetting Used.
The inputs and action are such that number of bits in classful mask is zero. For example, class C IP
Address 200.200.200.0 and Address Mask 255.255.255.0, with action "Calculate All IP Subnets" will