Subnetting NOTES
Subnetting NOTES
IPv4 Classes
IPv4 addresses are categorized into five classes (A, B, C, D, and E) based on their first octet:
| Class | Range (First Octet) | Subnet Mask Default | Usage |
| A | 1 - 126 | 255.0.0.0 | Large networks |
NETWORK ADMINISTRATION
- Examples:
- Class A: 10.0.0.0 – 10.255.255.255
- Class B: 172.16.0.0 – 172.31.255.255
- Class C: 192.168.0.0 – 192.168.255.255
Static IP Addresses – Manually configured and do not change.
Dynamic IP Addresses – Assigned dynamically by DHCP (Dynamic Host Configuration
Protocol).
- Loopback Address – Used for local testing (127.0.0.1).
- Broadcast Address – Targets all devices in a network (255.255.255.255).
- Multicast Address – Used for group communication (224.0.0.0 – 239.255.255.255).
- Link-Local Addresses – Automatically assigned for local communication (169.254.0.0 –
169.254.255.255).
IP address
An IP address is a numeric identity of a device on a computer network. IP addresses are
written and used in two formats: binary and decimal. Devices use IP addresses only in binary.
Binary is complex. It uses only two numbers (0 and 1) to express all numbers, letters, and
symbols.
Humans use decimal numbers. Decimal numbers are easy to use and remember. For example,
911 is a phone number used to contact emergency services in the USA. In binary, this number
will be 1110001111.
If authorities ask you to choose and use this number in one format, which will you pick? Will
you select the number 911 or 1110001111?
You will definitely select 911. It is much easier to remember and use.
No matter which format you select, devices always process this number in binary. If you
choose decimal format, devices will convert the number into binary before use.
The same thing applies to IP addresses. We write and use them in decimal, but computers and
other networking devices process them in binary. They convert them into binary before use.
An IP address consists of 32 binary bits. It organizes binary bits into four sections. It keeps 8
bits in each. It uses a dot as a separator. The 8 bits are equal to 1 byte. We can also say an IP
address has four bytes separated by dots.
NETWORK ADMINISTRATION
From 8 binary bits, the maximum number we can make in decimal is 256. Computers start
counting from 0. Because of this, each section in an IP address can have a decimal number
from the range 0 -255.
IP classes
There are five IP classes. The decimal number in the first section indicates the IP class.
A 0-127 0.0.0.0
B 128-191 128.0.0.0
C 192-223 192.0.0.0
D 224-239 224.0.0.0
E 240-255 240.0.0.0
We can use only the IP addresses of classes A, B, and C to create IP networks. We cannot use
class D and E's IP addresses. They are reserved for various functions of network services and
research, respectively.
Classes A, B, and C allocate default sections for network and host addresses.
In class A, the first section is the network address. The remaining three sections are the host
address.
In class B, the first and second sections are the network address. The third and fourth sections
are the host address.
In class C, the first three sections are the network address. The fourth section is the host
address.
Default IP subnets
Default allocation creates default IP subnets in each class. The following table lists default IP
subnets.
A 0-127 0.0.0.0
B 128-191 128.0.0.0
C 192-223 192.0.0.0
Since classes D and E are not available for network addressing, we cannot do subnetting in
these classes.
Why is Subnetting necessary?
The major problem with default IP subnets is that they are not well-optimized. They provide
more IP addresses than a network needs. For example, a class A subnet provides 16777216 IP
addresses. Practically a network cannot have 16777216 devices in a single network. If we use
this subnet to build a network, all the unused IP addresses will waste.
Subnetting solves this problem. It allows us to create subnets of our requirements. For
example, we can break a class A subnet into 65536 subnets having 256 IP addresses in each
subnet.
NETWORK ADMINISTRATION
Key points:-
Computers and networking devices use IP addresses to identify each other on a
computer network.
There are five IP classes.
We can use only three classes: A, B, and C, to provide network addressing.
An IP address consists of two addresses: network address and host address.
Network addresses create IP subnets. An IP subnet is a group of devices having the
same network address.
Host addresses provide a unique identity to devices in IP subnets.
Default IP subnets provide more IP addresses than a typical network needs.
Subnetting allows us to break default IP subnets into small subnets.
Subnetting does not create new subnets. It breaks the existing subnet into smaller
subnets.
Network Address Basic Concepts Explained with Examples
A network address in a computer network is an IP address that represents a group of IP
addresses. The group of IP addresses is known as an IP subnet.
There are millions of IP addresses. Managing these IP addresses is a challenging task. To
make IP management easier, designers use many methods. Network addressing is one of
them. It allows designers to create IP subnets.
You can divide IP subnets into two types: default and custom. Default IP subnets are also
known as IP classes. There are five IP classes. The following table lists them.
A 0.0.0.0 127.255.255.255
B 127.0.0.0 191.255.255.255
C 192.0.0.0 223.255.255.255
D 224.0.0.0 239.255.255.255
E 240.0.0.0 255.255.255.255
Default IP subnets provide a large number of IP addresses. Many networks do not need such
a large number of IP addresses. For example, the IP subnet 1.0.0.0/8 provides 16777214 IP
addresses. No one would like to put 16777214 devices in a single network. Most networks
don't even have that many devices. If you use this IP subnet in a small network, you will
waste millions of IP addresses.
NETWORK ADMINISTRATION
Subnetting solves this issue. It allows you to create custom IP subnets based on your
requirement and network size. For example, if your network has 250 devices, you can use the
1.0.0.0/24 IP subnet. This subnet provides 254 IP addresses.
When you break a large IP subnet into small IP subnets, you lose two IP addresses per IP
subnet. These IP addresses are the network address and broadcast address.
Each IP subnet reserves two IP addresses. It reserves the first IP address for the network
address. It reserves the last IP address for the broadcast address. You cannot assign network
and broadcast addresses to devices.
A network address provides a group identity to all group members. Routers store network
addresses in routing tables and use them to make forwarding decisions.
Key points:-
An IP group is called an IP subnet.
A network address is a group address of an IP subnet.
A network address belongs to all group members.
Default IP subnets are known as IP classes.
You can create custom IP subnets from default IP subnets.
In each IP subnet, the first address is the network address, and the last is the broadcast
address.
Routers use network addresses to identify IP subnets and make forwarding decisions.
In binary, an IP address is 32 bits long. It divides these bits into four sections. In each, it
keeps 8 bits or 1 byte (8 bits = 1 byte). It uses dots to separate them.
We use IP addresses in decimal. From 8 binary bits, the maximum number we can make in
decimal is 256. IP addresses start from 0. Hence, the maximum number in decimal will be
255 (256 -1).
We use the subnet mask to separate network and host bits in an IP address. For 32 IP bits, we
use 32 subnet mask bits. Subnet mask bits and IP address bits have one-to-one relations. The
first subnet mask bit relates with the first IP bit, the second subnet mask bit with the second
IP bit, and so on til the last bit.
NETWORK ADMINISTRATION
A subnet mask bit shows the type of the related IP bit. If its value is 1, the IP bit will be a
network bit. If its value is 0, the IP bit will be a host bit.
There are five IP classes . These are A, B, C, D, and E. Only classes A, B, and C are available
for network addressing. We cannot use classes D and E for network addressing. Network
services use class D for multicast addressing. Class E is reserved for research.
Class First address (binary Last address (binary First address (decimal Last address (decimal
notation) notation) notation) notation)
Only IP addresses in classes A, B, and C have host bits and need a subnet mask. These
classes have a default subnet mask.
The following table lists default subnet masks.
A 255.0.0.0
B 255.255.0.0
C 255.255.255.0
D Not applicable
E Not applicable
Because of the default subnet masks, the first 8, 16, and 24 bits in classes A, B, and C are
always network bits.
Slash notation
Slash notation is a shorter way to write subnet masks. In this notation, instead of writing the
full subnet mask, we use only the number of bits having the value 1 after the slash with the IP
address.
For example, the default subnet mask of class A is 255.0.0.0. In binary, it is
11111111.00000000.00000000.00000000. It has 8 network bits having the value of 1. In
slash notation, we will write this subnet mask as /8.
The default subnet mask of class B has 16 network bits. In slash notation, it will be /16. The
default subnet mask of class C has 24 network bits. In slash notation, we will write it as /24.
A 255.0.0.0 /8
B 255.255.0.0 /16
C 255.255.255.0 /24
The following table lists some examples of IP addresses and their subnet mask in all three
notations.
Subnetting
Subnetting is a process of breaking an IP subnet into many small subnets. To break an IP
subnet, we convert the host bits into network bits. We start the conversion process from the
leftmost host bit.
When converting bits, we cannot skip any host bit. For example, if we want to break a subnet
into two subnets, we will convert the leftmost host bit into a network bit. If we want to break
it into four subnets, we will convert the two leftmost host bits into network bits.
Key points:-
A subnet mask is a 32 bits binary address.
IP addresses use subnet masks to separate network bits and host bits.
Subnet mask bits and IP address bits have a one-to-one association.
NETWORK ADMINISTRATION
The first subnet mask bit relates to the first IP bit, the second subnet mask bit relates
to the second IP bit, and so on til the last bit.
If the subnet mask bit's value is 1, the related IP bit belongs to the network address.
If the subnet mask bit's value is 0, the related IP bit belongs to the network address.
Subnet mask bits are written from left to right.
In a subnet, network bits are always written before the host bits.
Subnetting is a process of breaking a subnet into many subnets.
In subnetting, we convert host bits into network bits.
Subnetting always starts from the leftmost host bit and goes to the rightmost bit
without skipping any bit.
Two popular notations are used for writing these addresses, binary and decimal.
In binary notation, all four octets are written in binary format.
Examples of IP address in binary notation are following: -
00001010.00001010.00001010.00001010
10101100.10101000.00000001.00000001
NETWORK ADMINISTRATION
11000000.10101000.00000001.00000001
Examples of subnet mask in binary notation are following: -
11111111.00000000.00000000.00000000
11111111.11111111.00000000.00000000
11111111.11111111.11111111.00000000
In decimal notation, all four octets are written in decimal format. A decimal equivalent value
of the bits is used in each octet.
Examples of IP address in decimal notation are following: -
10.10.10.10
172.168.1.1
192.168.1.1
Examples of subnet mask in decimal notation are following: -
255.0.0.0
255.255.0.0
255.255.255.0
In real life you rarely need to covert an IP address and subnet mask from decimal to binary
format and vice versa. But if you are preparing for any Cisco exam, I highly recommend you
to learn this conversion. Nearly all Cisco exams include questions about IP addresses.
Learning this conversion will help you in solving IP addressing related questions more
effectively.
Understanding base value and position
Except the base value, binary system works exactly same as decimal system works. Base
value is the digits which are used to build the numbers in both systems. In binary system, two
digits (0 and 1) are used to build the numbers while in decimal system, ten digits
(0,1,2,3,4,5,6,7,8,9) are used to build the numbers.
In order to convert a number from binary to decimal and vice versa, we have to change the
base value. Once base value is changed, resulting number can be written in new system.
Since IP address and subnet mask both are built from 32 bits and these bits are divided in 4
octets, in order to convert these addresses in binary from decimal and vice versa, we only
need to understand the numbers which can be built from an octet or 8 bits.
A bit can be either on or off. In binary system on bit is written as 1 and off bit is written
as 0 in number. In decimal system if bit is on, its position value is added in number and if bit
is off, its position value is skipped in number.
Following table lists the position value of each bit in an octet.
NETWORK ADMINISTRATION
Bit position 1 2 3 4 5 6 7 8
Key points
Regardless which system we use to write the octet, it always contains all 8 bits. Bits
are always written from left to right.
A number in which all 8 bits are off is written as 00000000 in binary system. Same
number is written as 0 (0+0+0+0+0+0+0+0) in decimal system.
A number in which all 8 bits are on is written as 11111111 in binary system. Same
number is written as 255 (128+64+32+16+8+4+2+1) in decimal system.
Converting decimal number in binary number
To convert a decimal number in binary number, follow these steps: -
Compare the position value of first bit with the given number. If given number is
greater than the position value, write 0 in rough area of your worksheet. If given
number is less than or equal to the position value, write the position value.
Add the position value of the second bit in whatever you written in first step and
compare it with the position value of the second bit. If sum is greater than the position
value, skip the position value. If sum is less than or equal to the position value, add
the position value in sum.
Repeat this process until all 8 bits are compared. If sum becomes equal at any bit,
write all reaming bits as 0.
Bit position 1 2 3 4 5 6 7 8
In binary 1 0 1 0 1 0 1 0
That’s all for this tutorial. If you have any comment, suggestion and feedback about this
tutorial, please mail me. If you like this tutorial, please don’t forget to share it through your
favorite social network.
If we relate this example to computer networks, the first city uses a single IP subnet, while
the second city divides a single IP subnet into smaller IP subnets.
Let’s take another example. Due to maintenance, there is a scheduled power cut.
NETWORK ADMINISTRATION
If the city is divided into sectors, the electricity department may make a local announcement
for the affected area instead of making an announcement across the city.
Apart from these two examples, there are many other examples where you can see that small
things are easier to manage than big things. The process of breaking a big thing into small
things is known as segmentation.
Default IP classes contain a large number of IP addresses in each subnet. A class A IP subnet
includes 16777214 IP addresses. A class B IP subnet includes 65534 IP addresses, while a
class C IP subnet has 254 IP addresses.
Putting too many hosts in the same network can lead to performance-related issues, such as
broadcasts, conflicts, congestion, etc.
Example.
A company has four divisions; sales, production, development, and management. Each
division has 50 users. The company uses a class C IP subnet. Without subnetting, all
computers work in a single large network.
Computers use broadcast messages to access and provide information in the network. A
broadcast message is an announcement message in a computer network that is received by all
hosts in the network.
NETWORK ADMINISTRATION
Earlier in this tutorial, we discussed an example of an electric announcement. You can relate
that example to this example. In that example, we learned how dividing a city into sectors can
reduce announcement areas.
In this example, since all computers belong to the same network, they will receive all
broadcast messages regardless the broadcast messages they are receiving are relevant to them
or not.
Just like the second city of the first example, we can divide this network into subnets. After
this, computers will receive only the broadcasts that belong to them.
Since the company has four divisions, it can divide its network into four subnets. The
following figure shows the same network after subnetting.
Subnetting table
The following table lists IP subnets for this network.
Advantage of Subnetting
Subnetting allows us to break a single large network into small networks. Small
networks are easy to manage.
NETWORK ADMINISTRATION
Subnetting reduces network traffic by allowing only the broadcast traffic that is
relevant to the subnet.
By reducing unnecessary traffic, subnetting improves the overall performance of the
network.
By keeping a subnet’s traffic in the subnet, subnetting increases the network's
security.
Subnetting reduces the requirement for a new IP range for each section.
Disadvantage of Subnetting
Different subnets need a router to communicate with each other.
Since each subnet uses its own network address and broadcast address, more subnets
mean more waste of IP addresses.
Subnetting adds complexity to the network. An experienced network administrator is
required to manage the subnetted network.
In the first step, we determine the IP class of the given IP subnet. An IP address consists of
32 bits. These bits are divided into four sections. Sections are separated by a dot. Each
section contains 8 bits. 8 bits are equal to 1 byte or 1 octet.
0 – 127
128 – 191
192 – 223
An IP address contains network and host bits. In slash notation, we write the number of
network bits with the IP address.
A 8 255.0.0.0
B 16 255.255.0.0
C 24 255.255.255.0
If we subtract the network bits from the total IP bits, we get the host bits.
Host bits = 32 - Network bits
Each IP class has reserved network bits in all IP addresses. We cannot use reserved network
bits for subnetting. We can use only host bits for subnetting.
Given IP subnet Network bits IP Class Reserved network bits Host bits used Available host bits
(Value after the slash) as network bits 32 - network bits
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
NETWORK ADMINISTRATION
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
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
If we subtract the given network bits from the reserved network bits, we get the host bits used
in subnetting.
Number of host bits used in subnetting = Total bits used in network portion – Reserved bits
for the network portion
Once we know how many host bits are used as network bits to create additional networks, we
can use the following formulas to calculate the number of networks, total hosts, and valid
hosts.
Number of networks (subnet) = 2N
Number of total host addresses in each network = 2H
NETWORK ADMINISTRATION
Given Address Host bits used Available host Networks Total hosts Valid hosts
as network bits (Subnets)
bits
In the first step, we find the interesting octet. The interesting octet is the octet in which the
network address separates from the host address in the IP address.
If we know the number of network bits, we can easily find the octet in which network bits
separate from the host bits. For example, if an IP address has the /15 subnet mask in the slash
notation, it has 15 network bits. The number 15 comes in the second octet's range (9 - 16).
Hence, the interesting octet will be the second octet.
0-8 First
9 - 16 Second
17 - 24 Third
25 - 32 Fourth
After finding the interesting octet, we take the following steps to find the type of the IP
address.
If the octet comes before the interesting octet, we write it as it is.
If the octet comes after the interesting octet, we write 0 in the network address and
255 in the broadcast address.
In the interesting octet, we write a placeholder character X. We will calculate its value
in the next step.
Given IP address Value after slash Interesting octet Network address Broadcast Address
Subtract the number of network bits (value after slash) from the ending number of the
interesting octet's range.
Subtract it from 8 if the interesting octet is the first octet.
Subtract it from 16 if the interesting octet is the second octet.
Subtract it from 24 if the interesting octet is the third octet.
Subtract it from 32 if the interesting octet is the fourth octet.
Given IP address Value after slash Interesting octet Ending value of range Subtraction
In the next step, we calculate the block size. We use the remainder of the previous subtraction
to calculate the block size.
Block size = 2Remainder of the subtraction
In the next step, we count in block size until the interesting octet's value comes in the block
size's range. Each block size has a range of numbers. The interesting octet's value must be in
this range. For example, if the interesting octet's value is 27 and the block size is 8, the range
will be 24-31 (0-7, 8-15, 16-23, 24-31).
The block size range starts from 0 and increases in multiple of the block size. For example, if
the block size is 4, the numbers in the first range will be 0, 1, 2, and 3.
Given IP address Interesting octet Interesting octet's value Block size Range in block size which c
In the next step, we update the placeholder value. Update the placeholder value as the
following.
In the network address, replace the placeholder value with the starting value of the
range.
In the broadcast address, replace the placeholder value with the ending value of the
range.
After updating the placeholder value, you can easily determine the address type of the given
address.
If the given address exactly matches the network address, it is a network address.
If the given address exactly matches the broadcast address, it is a broadcast address.
If the given address is neither a network address nor a broadcast address, it is a valid
host address.
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
In the second step, we build a temporary subnet mask based on the interesting octet.
If the octet comes before the interesting octet, we write 255.
If the octet comes after the interesting octet, we write 0.
In the interesting octet, we write a placeholder character X.
Subtract the given network number (value after slash) from the interesting octet's range's
ending number.
NETWORK ADMINISTRATION
Given IP address Value after slash Interesting octet Interesting octet range Subtraction
111.187.45.34/14 14 Second 9 – 16 16 – 14 = 2
202.100.20.50/27 27 Fourth 25 – 32 32 – 27 = 5
Given IP address Value after slash Remainder of the subtraction Calculation Step 1 Calculation step 2
Replace the placeholder value with the interesting octet's value. It gives us the subnet mask of
the given IP address.
Given IP addressk Value after slash Temporary mask Octet value Subnet mask
VLSM stands for Variable Length Subnet Mask. In it, we break the default IP subnet into
subnets having various sizes. For example, if the default subnet has 12 IP addresses, we can
break it into two subnets where the first subnet has 8 IP addresses and the second subnet has
4 IP addresses.
Differences between FLSM Subnetting and VLSM Subnetting
The following table lists the differences between FLSM and VLSM.
FLSM (Fixed Length Subnet Masks) Subnetting VLSM (Variable Length Subnet Masks)
Subnetting
All subnets have an equal number of hosts. Subnets have a variable number of hosts.
All subnets use the same subnet mask. Subnets use different subnet masks.
It supports both classful and classless routing It supports only classless routing protocols.
protocols.
2 6
3 4
4 3
We need seven hosts in the first subnet and three in the second subnet. None of the above-
listed combinations fulfill our requirements. If we use VLSM, we can create two subnets. The
first will provide eight IP addresses. The second will provide four IP addresses. This example
shows how VLSM allows us to utilize IP addresses based on our requirements.
NETWORK ADMINISTRATION
Host bit(s) 1 2 3 4 5 6 7 8
Host bits 9 10 11 12 13 14 15 16
NETWORK ADMINISTRATION
Block size 512 1024 2048 4096 8192 16384 32768 65536
Host bits 17 18 19 20 21 22 23 24
Block size 131072 262144 524288 1048576 2097152 4194304 8388608 16777216
The block size must be greater than or equal to the actual host requirement of the network.
Actual host requirement = Host requirement + Network address + broadcast address
Block Size >= Actual host requirement
The following table lists the block sizes that meet our requirements.
Production 52 54
Development 74 76
Administration 28 30
Wan link 1 2 4
Wan link 2 2 4
Wan link 3 2 4
Development 128 1
Production 64 2
Administration 32 3
Wan link 1 4 4
Wan link 2 4 5
Wan link 3 4 6
VLSM is an extended version of FLSM. It uses the same steps FLSM uses. In FLSM, we
break the default subnet into the same-sized subnets. In VLSM, we further divide the created
subnets into small-sized subnets based on our requirements in descending order.
NETWORK ADMINISTRATION
In this example, first, we will perform FLSM from the development segment.
The development segment's block size is 128. The given IP subnet belongs to class C. In
class C, the first 24 bits are reserved network bits. We cannot use the reserved network bits.
We can use only host bits for subnetting. The default class C IP subnet has 6 (8 - 2 reserved
host bits [30 and 31] ) host bits available for subnetting. Subnetting always goes from left to
right without skipping a bit. Hence, the first host bit we can use in subnetting is the 25th. If we
convert this host bit (25th) into a network bit, we get two subnets having 128 IP addresses
each.
It fulfills the development section's requirements. We can assign the first subnet to the
development section and use the second subnet for the next VLSM subnetting.
Segment Development
Requirement 74
CIDR /25
Network ID 192.168.1.0
Broadcast ID 192.168.1.127
Our next segment is the production department. Its block size is 64. If we convert the next
host bit (26th), we get four subnets having 64 IP addresses each.
We cannot use the subnets 1 and 2. They contain the addresses we have already assigned to
the development section. We can use the subnet 3 for the production section.
Segment Production
Requirement 52
CIDR /26
Network ID 192.168.1.128
Broadcast ID 192.168.1.191
Our next segment is the administration department. Its block size is 32. If we convert the next
host bit (27th), we get eight subnets having 32 IP addresses each.
We cannot use the subnets 1, 2, 3, 4, 5, and 6. They contain the addresses we have already
assigned to the development and production sections. We can use subnet 7 for the
administration section.
Segment Administration
Requirement 28
CIDR /27
Network ID 192.168.1.192
Broadcast ID 192.168.1.223
Our remaining segments are WAN links. Their block size is 4. If we convert the next three
host bits (28, 29, and 30th), we get sixty-four subnets having 4 IP addresses each.
0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96,
100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144, 148, 152, 156, 160, 164, 168,
172, 176, 180, 184, 188, 192, 196, 200, 204, 208, 212, 216, 220, 224, 228, 232, 236, 240,
244, 248, 252, 256
We cannot use the subnets 1 to 56. They contain the addresses we have already assigned to
the development, production, and administration sections. We can use subnets 57, 58, and 59
for the WAN links.
Subnet Subnet 57
Requirement 2
CIDR /30
NETWORK ADMINISTRATION
Network ID 192.168.1.224
Broadcast ID 192.168.1.227
Subnet Subnet 58
Requirement 2
CIDR /30
Network ID 192.168.1.228
Broadcast ID 192.168.1.231
Subnet Subnet 59
Requirement 2
CIDR /30
Network ID 192.168.1.232
Broadcast ID 192.168.1.235
We have assigned IP addresses to all segments. The subnets 60, 61, 62, 63, and 64 are still
available for further use.
When matching network addresses, we need to take care of two things. The default network
address of all subnets must be the same. The default network address is the address we get
from default network bits. The following table lists the default network and host bits.
Class Default Network Default host Subnet mask in decimal Subnet mask in slash notation
bits bits notation (CIDR)
Class 8 24 255.0.0.0 /8
A
If the default network address is the same in all subnets, we can summarize them in a subnet
having the same network address. Let us take an example. We have four class C subnets.
192.168.1.0/26, 192.168.2.64/26, 192.168.3.128/26, and 192.168.4.192/26.
In class C, the network bits are the first 24 bits (or three octets). These bits must be the same
in all subnets.
192.168.1.0/26, 192.168.2.64/26, 192.168.3.128/26, and 192.168.4.192/26.
Since these subnets have different default network addresses, we can not summarize them in
a single subnet.
Let us take another example. We have four subnets.
192.168.0.0/26, 192.168.0.64/26, 192.168.0.128/26, and 192.168.0.192/26.
These subnets have the same network address (192.168.0). We can summarize them in a
single subnet 192.168.0.0/24. This subnet also has the same network address (192.168.0).
Block size
The second key element is the block size. To summarize subnets, we use a subnet having a
block size equal to or more than the sum of the block sizes of all subnets.
In the preceding example, we have four subnets having a block size of 64. To summarize
these subnets, we need a subnet of a block size of 256 (64 x 4 = 256). The block size of the
subnet 192.168.0.0/24 is 256. Hence, we can use it to summarize these subnets.
Route summarization steps
In the first step, we check the network address of all subnets. If default network bits
are the same in all subnets, we find the block size of all subnets.
In the second step, we add the block sizes of all contiguous subnets. We can
summarize only contiguous networks.
In the third step, we find a subnet that has the same network address and the block
size equal to or greater than the sum of all block sizes.
NETWORK ADMINISTRATION
Supernetting Example 2
In the second step, we add the block sizes of all contiguous networks.
/8 255.0.0.0 16777216
/9 255.128.0.0 8388608
/26 255.255.255.192 64
/27 255.255.255.224 32
/28 255.255.255.240 16
/29 255.255.255.248 8
/30 255.255.255.252 4
In the first example, the sum of all subnets' block sizes is 256. The block size of
CIDR /24 is 256.
In the next step, we count in the multiple of the block size. The network number of the first
subnet must exist in the range.
192.168.0.0/24, 192.168.1.0/24, 192.168.3.0/24.......
If the network number of the first subnet exists in the range, we use this CIDR with the
network address of the first subnet to summarize the contiguous subnets. Hence,
the 192.168.0.0/24 is the summarized subnet of the first example.
In the second example, the sum of all subnets' block sizes is 1024. The block size of
CIDR /22 is 1024.
10.0.0.0/22, 10.0.4.0/22, 10.0.8.0/22 ....
The network address of the first subnet is 10.0.0.0. Therefore, 10.0.0.0/22 is the summarized
subnet of the second example.
Route summarization on non-contiguous subnets
If a network contains non-contiguous subnets, we can not summarize all subnets in a single
subnet. In that case, we can summarize contiguous subnets and leave non-contiguous subnets
untouched.
NETWORK ADMINISTRATION
In the second step, we group all contiguous subnets. We leave the uncontiguous networks.
NETWORK ADMINISTRATION
In the third step, we find the subnet having a block size equal to or greater than the sum of the
block sizes of all contiguous subnets.
In the fourth step, we count in the block size. If the network address of the first subnet is in
the range, we use the summarized subnet.
If it is not in the range, we use the next available block size in descending order in the block
size chart and count again. We repeat the process until the network address of the first subnet
does not come in the counting range of the summarized route's block size.
Supernetting example 3 (Router A)
On Router A, we have two groups of contiguous subnets.
In the first group, we have two contiguous subnets: 32 and 48. Both have a block size of 16.
The sum of block sizes is 32 (16+16). 32 is a valid block size. A valid block size is a block
size that is available in the block size chart.
The network ID of the first sequential subnet is 32, which is a valid network ID in block size
counting (0, 32, 64,…). Block size 32 is associated with CIDR value /27. Hence, we will use
this block size for summarization.
NETWORK ADMINISTRATION
122.128.58.64/28 122.128.58.32/28
122.128.58.80/29 122.128.58.56/29