IP Subnet Calculation & Design Online DocumentationContentsInterpreting Results
Sample Output 1
Sample Output 2
Error Messages & Warnings
Errors
Warnings
Related InformationPurpose & ScopeThe purpose of this tool is to provide a way to calculate IP
subnetting which is fast, easy, and error free.
Doing such calculations manually is time consuming and susceptible to
common mathematical mistakes (especially in conversions between binary
and decimal numbers).
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 InterfaceInputs IP Address is an input that specifies the IP address for which the subnet calculation and/or design is desired.
- It can be a valid network, subnet or host address (class A, B, or C).
- 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.
- This input is required for all actions.
Address Mask is an input that specifies the classful IP address mask using which the subnet calculation can be achieved.
- It can be a valid mask or just the classful mask bits.
- 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.
- It can be a any decimal number greater than zero.
- 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.
- It can be a any decimal number greater than zero.
- 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).
- These can be valid masks or just the classful mask bits.
- 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.
ActionsCalculate All IP Subnets
- 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.
Find IP Subnet for this address
- 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.
Design IP Subnetting (maximize subnets)
- 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.
Design IP Subnetting (maximize hosts)
- 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.
Design IP Subnetting (minimize wastage)
- 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.
Calculate Subnetting using VLSM
- 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 ResultsSample Output 1Source: 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
Subnets for Fixed Length Subnet Masking
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
No. Subnet Hosts Hosts Broadcast
Address From To Address
0 150.150.0.0 150.150.0.1 150.150.31.254 150.150.31.255
1 150.150.32.0 150.150.32.1 150.150.63.254 150.150.63.255
2 150.150.64.0 150.150.64.1 150.150.95.254 150.150.95.255
3 150.150.96.0 150.150.96.1 150.150.127.254 150.150.127.255
4 150.150.128.0 150.150.128.1 150.150.159.254 150.150.159.255
5 150.150.160.0 150.150.160.1 150.150.191.254 150.150.191.255
6 150.150.192.0 150.150.192.1 150.150.223.254 150.150.223.255
7 150.150.224.0 150.150.224.1 150.150.255.254 150.150.255.255
Don't use subnet 0 (unless using ip subnet-zero command) and subnet 7.
Address space wasted by subnetting = 25.02% ( 12.52% with ip subnet-zero)
-----------------------------------------------------------------------------
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.