Subnetting Tricks Subnetting Made Easy With Examples
Subnetting Tricks Subnetting Made Easy With Examples
Subnetting is one of the most complex and highly tested topics in any Cisco entry level exam and
interview. In other situation, you may use any regular method of Subnetting. But in exam and
interview, where time and accuracy matter, you should always use the easiest and the fastest
methods of Subnetting such as explained in this tutorial.
This tutorial is the fourth part of the article “IP Subnetting in Computer Network Step by
Step Explained with Examples”. Other parts of this article are following.
Network Address Broadcast Address and IP Address Explained
This tutorial is the first part of the article. It explains IP addressing and network addressing such as IP address, subnet mask,
IP address types and IP classes in detail.
https://www.computernetworkingnotes.com/ccna-study-guide/subnetting-tricks-subnetting-made-easy-with-examples.html 1/17
12/16/2019 Subnetting Tricks Subnetting Made Easy with Examples
An IP address is the combination of two addresses; network address and host address. Network
address is always written first in sequence. While reading an IP address how much portion should
be treated as network address and how much portion should be treated as host address is decided
by an another address known as Subnet mask.
An IP address is always used with Subnet mask. Without subnet mask an IP address is an
ambiguous address and vice versa.
Both IP address and Subnet mask consists 32 bits. These bits are divided in four octets. Octets are
separated by periods and written in a sequence.
A Subnet mask can be written in two ways; in full form and in abbreviated form. In full form a
decimal value of each octet is written along with IP address. In abbreviated form only the number
of network bits are written along with IP address. Following table lists some examples of both
types.
IP address with full subnet mask IP address with abbreviated subnet mask
10.0.0.0 10.0.0.0/8
255.0.0.0
172.168.1.0 172.168.1.0/16
255.255.0.0
192.168.1.0 192.198.1.0/24
255.255.255.0
There are five IP classes A, B, C, D and E. From these, only first three classes A, B and C are used in
Subnetting. Subnetting cannot be done in class D and E.
In class A, B and C first 8, 16 and 24 bits are reserved for network address respectively. In all three
classes last 2 bits are reserved for host addresses.
https://www.computernetworkingnotes.com/ccna-study-guide/subnetting-tricks-subnetting-made-easy-with-examples.html 2/17
12/16/2019 Subnetting Tricks Subnetting Made Easy with Examples
If we exclude reserved network bits and host bits from total IP bits, we will get Subnetting eligible
host bits.
To know how many Subnetting bits are required to create how many networks, we use power of 2.
For example if we want to know many networks can be created from 3 Subnetting bits, we will use
power 2 three times.
23 = 8
Power of 2
https://www.computernetworkingnotes.com/ccna-study-guide/subnetting-tricks-subnetting-made-easy-with-examples.html 3/17
12/16/2019 Subnetting Tricks Subnetting Made Easy with Examples
In each network first address and last address are always reserved for network address and
broadcast address respectively. Besides these two addresses, all remaining addresses are
considered as valid host addresses.
Subnetting Questions
A Subnetting question can be asked in three ways.
1. Find the number of networks and number of host addresses in each network
2. Find the type of given address, network ID and broadcast ID
3. Build the Subnet mask
Let’s understand the each type of Subnetting question in detail with examples.
Following table lists 15 imaginary networks. Find the number of networks, total hosts and valid
hosts in each network.
Step 1
Determine the class of the given address space.
If the value of first octet is in range 0-127, 128-191, 192-223 then it belongs to class A, B and C
respectively.
https://www.computernetworkingnotes.com/ccna-study-guide/subnetting-tricks-subnetting-made-easy-with-examples.html 4/17
12/16/2019 Subnetting Tricks Subnetting Made Easy with Examples
Subtract the given network bits from the reserved network bits. This will give us the number of host
bits used as network bits in Subnetting.
Number of host bits used in Subnetting = Total bits used in network portion – reserved bits for
network portion
Subtract the given network bits from 32 (total IP bits). This will give us the number of the host bits
remaining in host portion.
Remaining host bits in host portion = 32 – Total bits used in network portion
Given Address Total bits IP Reserved Number of host bits Available bits
space used Class network used in Subnetting in host portion
in bits
network
portion
(Value
after
slash)
10.0.0.0/10 10 A 8 10 - 8 = 2 32 – 10 = 22
20.12.0.0/13 13 A 8 13 – 8 = 5 32 – 13 = 19
78.59.12.0/16 16 A 8 16 – 8 = 8 32 – 16 = 16
112.15.0.0/24 24 A 8 24 – 8 = 16 32 – 24 = 8
122.14.25.0/28 28 A 8 28 – 8 = 20 32 – 28 = 4
130.0.0.0/18 18 B 16 18 – 16 = 2 32 – 18 = 14
140.50.60.0/20 20 B 16 20 – 16 = 4 32 – 20 = 12
172.168.1.0/24 24 B 16 24 – 16 = 8 32 – 24 = 8
180.10.20.0/28 28 B 16 28 – 16 = 12 32 – 28 = 4
185.0.0.0/30 30 B 16 30 – 16 = 14 32 – 30 = 2
192.168.1.0/26 26 C 24 26 - 24 = 2 32 – 26 = 6
https://www.computernetworkingnotes.com/ccna-study-guide/subnetting-tricks-subnetting-made-easy-with-examples.html 5/17
12/16/2019 Subnetting Tricks Subnetting Made Easy with Examples
200.0.0.0/27 27 C 24 27 – 24 = 3 32 – 27 = 5
210.200.0.0/28 28 C 24 28 – 24 = 4 32 – 28 = 4
215.0.0.0/29 29 C 24 29 – 24 = 5 32 – 29 = 3
220.220.10.0/30 30 C 24 30 – 24 = 6 32 – 30 = 2
Once we know how many bits are used in Subnetting to create the additional networks, we can use
following formulas to calculate number of networks, total hosts and valid hosts.
Here N is the number of host bits used in Subnetting and H is the available host bits.
Step 1
Find the interesting octet and make two new addresses from the given address in rough area of
worksheet as explained following: -
https://www.computernetworkingnotes.com/ccna-study-guide/subnetting-tricks-subnetting-made-easy-with-examples.html 7/17
12/16/2019 Subnetting Tricks Subnetting Made Easy with Examples
If octet comes after the interesting octet, in first address write 0 and in second address write
255.
In interesting octet write a placeholder character “X”.
Interesting octet is the octet in which given network bits separate from host bits. To find it, see
the value after slash. If value is in range 1-8, 9-16, 17-24 and 25-32 then the interesting octet is
first octet, second octet, third octet and fourth octet respectively.
https://www.computernetworkingnotes.com/ccna-study-guide/subnetting-tricks-subnetting-made-easy-with-examples.html 8/17
12/16/2019 Subnetting Tricks Subnetting Made Easy with Examples
Step 2
Based on interesting octet, subtract after slash value form the upper value of octet range.
Step 3
Use the result of subtraction in following formula to calculate the block size
https://www.computernetworkingnotes.com/ccna-study-guide/subnetting-tricks-subnetting-made-easy-with-examples.html 10/17
12/16/2019 Subnetting Tricks Subnetting Made Easy with Examples
https://www.computernetworkingnotes.com/ccna-study-guide/subnetting-tricks-subnetting-made-easy-with-examples.html 11/17
12/16/2019 Subnetting Tricks Subnetting Made Easy with Examples
Step 4
Starting from 0, calculate the block size until the value given in interesting octet does not come in
the range.
In calculation the number 0 is used as the first number. For example if we are calculating block
size 4 then it would be calculated as 0,1,2,3 instead of 1,2,3,4.
Once you got the range in block size which cover the given value in interesting octet, stop the
calculation. For example value in interesting octet is 27 and block size is 8 then the range will be
24-31 (0-7, 8-15, 16-23, 24-31).
Given Address Interesting Interesting Block Range in block size which cover
octet octet value Size the value of interesting octet
https://www.computernetworkingnotes.com/ccna-study-guide/subnetting-tricks-subnetting-made-easy-with-examples.html 12/17
12/16/2019 Subnetting Tricks Subnetting Made Easy with Examples
Step 5
Update the temporary addresses written in first step as following: -
In first address, replace the placeholder character “X” with the starting value of the range.
In second address, replace the placeholder character “X” with the ending value of the range.
After this update first address and second address will become the network address and broadcast
address of the given address respectively.
Once it’s done, you can easily determine the type of the given address.
If given address exactly matches with the network address then it’s a network address.
If given address exactly matches with the broadcast address then it’s a broadcast address.
If given address is neither a network address nor a broadcast address then it’s a valid host
address.
https://www.computernetworkingnotes.com/ccna-study-guide/subnetting-tricks-subnetting-made-easy-with-examples.html 13/17
12/16/2019 Subnetting Tricks Subnetting Made Easy with Examples
https://www.computernetworkingnotes.com/ccna-study-guide/subnetting-tricks-subnetting-made-easy-with-examples.html 14/17
12/16/2019 Subnetting Tricks Subnetting Made Easy with Examples
Step 1
Find the interesting octet as explained above.
20.10.30.0/8 8 First
111.187.45.34/14 14 Second
162.160.46.24/20 20 Third
202.100.20.50/27 27 Fourth
Step2
In rough area of worksheet, write a temporary subnet mask as following: -
Step 3
Just like we did above, based on interesting octet, subtract the given value from the upper value of
interesting octet range.
111.187.45.34/14 14 Second 9 – 16 16 – 14 = 2
202.100.20.50/27 27 Fourth 25 – 32 32 – 27 = 5
Step 4
Use the result of subtraction in following formula to get the octet value
Remainder
Octet value = 256 - 2
https://www.computernetworkingnotes.com/ccna-study-guide/subnetting-tricks-subnetting-made-easy-with-examples.html 16/17
12/16/2019 Subnetting Tricks Subnetting Made Easy with Examples
Step 5
Replace the “X” with octet value in interesting octet to build the full subnet mask
Given network Value after slash Temporary mask Octet value Subnet mask
That’s all for this for this tutorial. If you need any assistance regarding this tutorial or have any
feedback or comment about this tutorial, please mail me. If you like this tutorial, please don’t
forget to share it through your favorite social network.
Computer Networking Notes and Study Guides © 2019. All Rights Reserved.
About Privacy Policy Terms and Conditions
https://www.computernetworkingnotes.com/ccna-study-guide/subnetting-tricks-subnetting-made-easy-with-examples.html 17/17