0% found this document useful (0 votes)
12 views48 pages

Subnetting NOTES

The document provides an overview of subnetting, explaining its purpose in dividing large networks into smaller, manageable subnets. It details IP addressing, including the structure of IPv4 addresses, classifications of IP addresses, and the significance of subnet masks. Key concepts such as public and private IP addresses, static and dynamic IP addresses, and the necessity of subnetting for efficient IP address management are also discussed.

Uploaded by

chapterbave
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views48 pages

Subnetting NOTES

The document provides an overview of subnetting, explaining its purpose in dividing large networks into smaller, manageable subnets. It details IP addressing, including the structure of IPv4 addresses, classifications of IP addresses, and the significance of subnet masks. Key concepts such as public and private IP addresses, static and dynamic IP addresses, and the necessity of subnetting for efficient IP address management are also discussed.

Uploaded by

chapterbave
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 48

NETWORK ADMINISTRATION

CHAPTER 1: Introduction to Subnetting


Devices in computer networks use IP addresses to identify each other. An IP address consists
of two addresses: the network address and the host address. Devices having the same network
address can communicate directly.
What is Subnetting?
A subnet is a group of devices that have the same network address. If required, you can break
a subnet into small subnets. Breaking a subnet into small subnets is known as subnetting.
Subnetting does not create new subnets. It breaks existing subnets into small subnets. We use
subnetting to convert a large-sized network into many small-sized manageable networks. For
example, if a network has 1000 devices, you can divide it into two networks having 500
devices in each or four networks having 250 devices in each.
Subnetting components
Before we learn how subnetting works, we need to understand some basic terms and
components. These are IP address, network address, host address, IP classes, and default IP
subnets.
IP Addressing Overview
IP (Internet Protocol) addressing is a fundamental concept in networking that allows devices
to communicate with each other. Each device connected to a network is assigned an IP
address, which serves as a unique identifier.
IPv4 Address Format
IPv4 (Internet Protocol version 4) uses a 32-bit addressing scheme, represented as four
decimal numbers separated by dots, known as dotted decimal notation. Each number is an
octet (8 bits) and can range from 0 to 255.
Example of an IPv4 Address:
192.168.1.1

Each octet translates into binary, forming a 32-bit address:


11000000.10101000.00000001.00000001

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

| B | 128 - 191 | 255.255.0.0 | Medium-sized networks |


| C | 192 - 223 | 255.255.255.0 | Small networks |
| D | 224 - 239 | N/A | Multicast |
| E | 240 - 255 | N/A | Reserved for experimental use |

- Class A: Used by large organizations with many devices.


- Class B: Suitable for medium-sized enterprises.
- Class C: Common for small businesses and home networks.
- Class D: Used for multicast applications (e.g., streaming).
- Class E: Reserved for research purposes.
IPv4 Address Types
IPv4 addresses are classified based on usage and function:
- Public IP Addresses – Routable on the internet; assigned by ISPs.
Examples of Public IP Addresses (Routable on the Internet)
These IP addresses are assigned by Internet Service Providers (ISPs) and are used for devices
that need direct access to the internet. Some well-known examples:
- Google DNS: 8.8.8.8 and 8.8.4.4
- Cloudflare DNS: 1.1.1.1
- Facebook Servers: 157.240.1.35
- OpenDNS Servers: 208.67.222.222
- Public ISP-assigned IPs: Dynamic IPs like 102.132.163.97 (varies per user and ISP)
You can check your own public IP address by searching "What is my IP?" in Google.
Private IP Addresses – Used within local networks; not routable on the internet.
Private IP addresses are reserved for internal networking, meaning they cannot be accessed
directly from the internet. These are commonly used in homes, businesses, and organizations:
- Class A Private IP: 10.0.0.1 (Used in large networks like corporations)
- Class B Private IP: 172.16.0.1 (Typically found in enterprise setups)
- Class C Private IP: 192.168.1.1 (Common in home Wi-Fi routers)
- Link-Local Address: 169.254.1.1 (Automatically assigned when DHCP fails)
Most home routers use 192.168.x.x to manage local devices within a private network.
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.

Class Value range in the first section First address

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

Network address and host address


An IP address contains two addresses: network address and host address. Network addresses
create IP subnets. Host addresses provide identities to devices.
NETWORK ADMINISTRATION

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.

Class Value range in the first section First IP subnet

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.

Class Start address End address

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.

CHAPTER 3: The Subnet Mask and Slash Notation


An IP address consists of two addresses: the network address and the host address. A subnet
mask separates the network address from the host address in the IP address.
We use an IP address always with the subnet mask. A subnet mask defines the boundary
between the network address and the host address in the IP address. A network address is the
NETWORK ADMINISTRATION

group address. We use it to create a group of IP addresses. A group of IP addresses is known


as an IP subnet. A host address is an individual address. In an IP subnet, all addresses have
the same network address and different host addresses.
The following image shows four IP subnets having six host addresses.

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)

A 00000000 01111111 0 127

B 10000000 10111111 128 191

C 11000000 11011111 192 223

D 11100000 11101111 224 239

E 11110000 11111111 240 255

Default subnet mask


IP addresses in classes D and E have all network bits. They do not have host bits. Since they
do not have host bits and a subnet mask is used to differentiate host bits from network bits,
they do not need a subnet mask.
NETWORK ADMINISTRATION

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.

Class Default subnet mask

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.

Class Default subnet mask Slash notation

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.

In Slash notation In binary notation In decimal notation

10.10.10.10/8 00001010.00001010.00001010.00001010 10.10.10.10


11111111.00000000.00000000.00000000 255.0.0.0

172.168.1.1/16 10101100.10101000.00000001.00000001 172.168.1.1


11111111.11111111.00000000.00000000 255.255.0.

192.168.1.1/24 11000000.10101000.00000001.00000001 192.168.1.1


11111111.11111111.11111111.00000000 255.255.255.0
NETWORK ADMINISTRATION

192.168.1.1/28 11000000.10101000.00000001.00000001 192.168.1.1


11111111.11111111.11111111.11110000 255.255.255.240

Bits in the subnet mask


Bits in the subnet mask always follow a pattern. They are written from left to right. Network
bits are always written before the host bits. We cannot write a host bit between network bits.

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.

CHAPTER 4: Convert Decimal IP address in Binary and Binary in Decimal


This tutorial explains how to convert a decimal IP address in binary IP address and a binary
IP address in a decimal IP address step by step with examples. Learn the easiest method of
converting a decimal IP address and subnet mask in binary IP address and subnet mask
respectively.
An IP address and a subnet mask both collectively provide a numeric identity to an interface.
Both addresses are always used together. Without subnet mask, an IP address is an
ambiguous address and without IP address a subnet mask is just a number.
Both addresses are 32 bits in length. These bits are divided in four parts. Each part is known
as Octet and contains 8 bits. Octets are separated by periods and written in a sequence.

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

Position value 128 64 32 16 8 4 2 1

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.

Operation In Decimal In Binary

Add Use position value Set bit to 1

Skip Skip position value Set bit to 0

Let’s take an example. Convert a decimal number 117 in binary.


 Given decimal number is 117
 Calculation direction is Left to Right

Bit position Comparison Operation in Value in Operation in Value in


position value decimal decimal Binary binary

1 128 128 is greater than 117 Skip 0 Off 0

2 64 0+64 = 64 is less than 117 Add 64 On 1

3 32 0+64+32 = 96 is less than 117 Add 32 On 1

4 16 0+64+32+16 = 112 is less than Add 16 On 1


117
NETWORK ADMINISTRATION

5 8 0+64+32+16+8 = 120 is greater Skip 0 Off 0


than 117

6 4 0+64+32+16+0+4 = 116 is less Add 4 On 1


than 117

7 2 0+64+32+16+0+4+2 = 118 is Skip 0 Off 0


greater than 117

8 1 0+64+32+16+0+4+0+1 = 117 is Add 1 On 1


equivalent to 117

Once above comparison is done in rough paper: -


 To write the given number in decimal format, sum all the values of decimal field and
write the result. In this example, it would be 0+64+32+16+0+4+0+1 = 117.
 To write the given number in binary format, write all the values of binary field from
left to right. In this example, it would be 11110101.
Converting binary number in decimal number
To convert a binary number in decimal number, sum the values of all on bits. Let’s take an
example. Convert a binary number 10101010 in decimal number.
 Given binary number is 10101010
 Calculation direction is Left to Right

Bit position 1 2 3 4 5 6 7 8

position value 128 64 32 16 8 4 2 1

In binary 1 0 1 0 1 0 1 0

Bit status On Off On Off On Off On Off

If bit status is on, use position value in decimal 128 0 32 0 8 0 2 0

The binary number 10101010 is equal to the number 170 (128+0+32+0+8+0+2+0) in


decimal system.
Practice for you
 Pick any number from 0 - 255 and convert it in binary.
 Pick any combination from 00000000 - 11111111 and convert it in decimal.
Converting an IP address and subnet mask
As we know IP address and subnet mask both are built from 4 individual octets separated by
periods. We can use above methods to convert all octets individually. Once all four octets are
converted, we can merge them again separating by periods.
NETWORK ADMINISTRATION

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.

CHAPTER 5: Basic Sub netting in Computer Networks Explained


An IP subnet is a group of IP addresses. There are two types of IP subnets: default and
custom. Default IP subnets are pre-defined and known as IP classes. We create custom
subnets as per our requirements and network size. We use subnetting to create custom
subnets from default subnets.
Subnetting is a method of dividing a single IP network into small IP networks. Small
networks are easier to manage in comparison to large networks.
Let us take an example. There are two cities. The first city uses a flat design for addressing.
All addresses directly belong to the city name. They contain only two things: resource name
and city name.
The second city uses a hierarchical design for addressing. It divides the city area into blocks
and streets. Addresses contain blocks and street numbers or names. Finding an address in the
second city is much easier and faster than in the first city.

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.

Description Network 1 Network 2 Network 3

Network address 192.168.1.0 192.168.1.64 192.168.1.128

valid hosts 192.168.1.1 to 192.168.1.62 192.168.1.65 to 192.168.1.126 192.168.1.129 to 192.16

Broadcast address 192.168.1.63 192.168.1.127 192.168.1.191

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.

CHAPTER 6: Subnetting Tricks Subnetting Made Easy with Examples


This tutorial explains the easiest and fastest method of subnetting through 100+ examples.
You can use these methods to solve subnetting-related questions in less than a minute in any
exam or interview.
There are three types of subnetting questions you may be asked in an exam or interview.
1. Calculate the number of networks and host addresses in a given IP subnet.
2. Find the network ID and broadcast ID of a given IP subnet.
3. Identify the subnet mask of a given IP subnet.
Calculating networks and host addresses
In these types of questions, we need to calculate the total number of IP subnets and host
addresses we can get from a given IP subnet.
The following table lists some example IP subnets. We will calculate the total number of
subnets we can get from each subnet and the total number of host addresses and valid host
addresses in each created subnet.

10.0.0.0/10 130.0.0.0/18 192.168.1.0/26

20.12.0.0/13 140.50.60.0/20 200.0.0.0/27

78.59.12.0/16 172.168.1.0/24 210.200.0.0/28

112.15.0.0/24 180.10.20.0/28 215.0.0.0/29

122.14.25.0/28 185.0.0.0/30 220.220.10.0/30


NETWORK ADMINISTRATION

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.

We use the first octet's value to determine the IP class.

Value in the First 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.

Class Reserved network bits Default subnet mask


(Decimal notation)

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

Number of valid host addresses in each network = 2H – 2


Here, N is the number of host bits used as network bits to create additional subnets, and H is
the available host bits.

Given Address Host bits used Available host Networks Total hosts Valid hosts
as network bits (Subnets)
bits

10.0.0.0/10 2 22 4 (22) 4194304 4194302 (4194304 –


(222) 2)

20.12.0.0/13 5 19 32 (25) 524288 (219) 524286 (524288 - 2)

78.59.12.0/16 8 16 256 (28) 65536 (216) 65534 (65536 - 2)

112.15.0.0/24 16 8 65536 (216) 256 (28) 254 (256 - 2)

122.14.25.0/28 20 4 1048576 (220) 16 (24) 14 (16 - 2)

130.0.0.0/18 2 14 4 (22) 16384 (214) 16382 (16384 -2)

140.50.60.0/20 4 12 16 (24) 4096 (212) 4094 (4096 -2)

172.168.1.0/24 8 8 256 (28) 256 (28) 254 (256 -2)

180.10.20.0/28 12 4 4096 (212) 16 (24) 14 (16 -2)

185.0.0.0/30 14 2 16384 (214) 4 (22) 2 (4 -2)

192.168.1.0/26 2 6 4 (22) 64 (26) 62 (64 -2)

200.0.0.0/27 3 5 8 (23) 32 (25) 30 (32 -2)

210.200.0.0/28 4 4 16 (24) 16 (24) 14 (16 - 2)

215.0.0.0/29 5 3 32 (25) 8 (23) 6 (8 -2)

220.220.10.0/30 6 2 64 (26) 4 (22) 2 (4 -2)

Finding address type, network ID, and broadcast ID


In these types of questions, we need to find out three things: address type, network ID, and
broadcast ID from the given IP address.
Let us take some example IP addresses and find their address type, network ID, and broadcast
ID.

10.0.0.0/8 50.100.255.255/20 150.60.180.0/19 192.168.1.240/25

10.48.0.0/12 1.1.8.255/23 160.0.39.255/21 200.20.10.191/26

20.42.255.255/13 100.100.100.110/25 172.168.8.0/24 210.200.20.100/27

30.6.1.0/16 110.80.20.128/27 180.78.0.64/28 215.0.0.47/28


NETWORK ADMINISTRATION

40.60.240.0/17 120.20.30.15/30 185.0.0.26/29 220.10.10.50/29

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.

Network bits range Interesting 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

10.0.0.0/8 /8 First (1-8) X.0.0.0 X.255.255.255

10.48.0.0/12 /12 Second (9-16) 10.X.0.0 10.X.255.255

20.42.255.255/13 /13 Second (9-16) 20.X.0.0 20.X.255.255

30.6.1.0/16 /16 Second (9-16) 30.X.0.0 30.X.255.255

40.60.240.0/17 /17 Third (17-24) 40.60.X.0 40.60.X.255

50.100.255.255/20 /20 Third (17 -24) 50.100.X.0 50.100.X.255

1.1.8.255/23 /23 Third (17-24) 1.1.X.0 1.1.X.255

100.100.100.110/25 /25 Fourth (25 -32) 100.100.100.X 100.100.100.X

110.80.20.128/27 /27 Fourth (25-32) 110.80.20.X 110.80.20.X

120.20.30.15/30 /30 Fourth (25-32) 120.20.30.X 120.20.30.X


NETWORK ADMINISTRATION

150.60.180.0/19 /19 Third (17-24) 150.60.X.0 150.60.X.255

160.0.39.255/21 /21 Third (17-24) 160.0.X.0 160.0.X.255

172.168.8.0/24 /24 Third (17-24) 172.168.X.0 172.168.X.255

180.78.0.64/28 /28 Fourth (25-32) 180.78.0.X 180.78.0.X

185.0.0.26/29 /29 Fourth (25-32) 185.0.0.X 185.0.0.X

192.168.1.240/25 /25 Fourth (25-32) 192.168.1.X 192.168.1.X

200.20.10.191/26 /26 Fourth (25-32) 200.20.10.X 200.20.10.X

210.200.20.100/27 /27 Fourth (25-32) 210.200.20.X 210.200.20.X

215.0.0.47/28 /28 Fourth (25-32) 215.0.0.X 215.0.0.X

220.10.10.50/29 /29 Fourth (25-32) 220.10.10.X 220.10.10.X

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

10.0.0.0/8 /8 First(1-8) 8 8–8=0

10.48.0.0/12 /12 Second (9-16) 16 16 – 12 = 4

20.42.255.255/13 /13 Second (9-16) 16 16 – 13 = 3

30.6.1.0/16 /16 Second (9-16) 16 16 – 16 = 0

40.60.240.0/17 /17 Third (17-24) 24 24 – 17 = 7

50.100.255.255/20 /20 Third (17 -24) 24 24 - 20 = 4

1.1.8.255/23 /23 Third (17-24) 24 24 – 23 = 1

100.100.100.110/25 /25 Fourth (25 -32) 32 32 – 25 = 7

110.80.20.128/27 /27 Fourth (25-32) 32 32 – 27= 5

120.20.30.15/30 /30 Fourth (25-32) 32 32 – 30 = 2

150.60.180.0/19 /19 Third (17-24) 24 24 – 19 = 5


NETWORK ADMINISTRATION

160.0.39.255/21 /21 Third (17-24) 24 24 – 21 = 3

172.168.8.0/24 /24 Third (17-24) 24 24 – 24 = 0

180.78.0.64/28 /28 Fourth (25-32) 32 32 – 28 = 4

185.0.0.26/29 /29 Fourth (25-32) 32 32 – 29 = 3

192.168.1.240/25 /25 Fourth (25-32) 32 32 – 25 = 7

200.20.10.191/26 /26 Fourth (25-32) 32 32 – 26 = 6

210.200.20.100/27 /27 Fourth (25-32) 32 32 – 27 = 5

215.0.0.47/28 /28 Fourth (25-32) 32 32 – 28 = 4

220.10.10.50/29 /29 Fourth (25-32) 32 32 – 29 = 3

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

Given IP address Interesting octet Remainder of the subtraction Block Size

10.0.0.0/8 First 0 (20) = 1

10.48.0.0/12 Second 4 (24) = 16

20.42.255.255/13 Second 3 (23) = 8

30.6.1.0/16 Second 0 (20) = 1

40.60.240.0/17 Third 7 (27) = 128

50.100.255.255/20 Third 6 (24) = 16

1.1.8.255/23 Third 1 (21) = 2

100.100.100.110/25 Fourth 7 (27) = 128

110.80.20.128/27 Fourth 5 (25) = 32

120.20.30.15/30 Fourth 2 (22) = 4

150.60.180.0/19 Third 5 (25) = 32

160.0.39.255/21 Third 3 (23) = 8

172.168.8.0/24 Third 0 (20) = 1

180.78.0.64/28 Fourth 4 (24 ) = 16

185.0.0.26/29 Fourth 3 (23) = 8


NETWORK ADMINISTRATION

192.168.1.240/25 Fourth 7 (27) = 128

200.20.10.191/26 Fourth 6 (26) = 64

210.200.20.100/27 Fourth 5 (25) = 32

215.0.0.47/28 Fourth 4 (24) = 16

220.10.10.50/29 Fourth 3 (23) = 8

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

10.0.0.0/8 First 10 1 0-0, 1-1, 2-2, 3-3, 4-4, 5-5,

10.48.0.0/12 Second 48 16 0-15, 16-31, 32-47, 48-63

20.42.255.255/13 Second 42 8 0-7, 8-15, 16-23, 24-31, 32-

30.6.1.0/16 Second 6 1 0-0, 1-1, 2-2, 3-3, 4-4, 5-5,

40.60.240.0/17 Third 240 128 0-127, 128-255

50.100.255.255/20 Third 255 16 0-15, 16-31, 32-47,..... 224-

1.1.8.255/23 Third 8 2 0-1, 2-3, 4-5, 6-7, 8-9

100.100.100.110/25 Fourth 110 128 0-127,128-255

110.80.20.128/27 Fourth 128 32 0-31, 32-63, 64-95, 96 -127

120.20.30.15/30 Fourth 15 4 0-3, 4-7, 8-11, 12-15

150.60.180.0/19 Third 180 32 0-31, 32-63, 64-95, 96 -127

160.0.39.255/21 Third 39 8 0-7, 8-15, 16-23, 24-31, 32-

172.168.8.0/24 Third 8 1 0-0, 1-1, 2-2, 3-3, 4-4, 5-5,

180.78.0.64/28 Fourth 64 16 0-15, 16-31, 32-47, 48-63, 6

185.0.0.26/29 Fourth 26 8 0-7, 8-15, 16-23, 24-31

192.168.1.240/25 Fourth 240 128 0-127, 128-255

200.20.10.191/26 Fourth 191 64 0-63, 64-127, 128- 191


NETWORK ADMINISTRATION

210.200.20.100/27 Fourth 100 32 0-31, 32-63, 64-95, 96 -127

215.0.0.47/28 Fourth 47 16 0-15, 16-31, 32-47

220.10.10.50/29 Fourth 50 8 0-7, 8-15, 16-23, 24-31, 32-

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.

Given IP address Interesting Interesting Block Network Broadcast Type


octet octet range address address
value

10.0.0.0/8 First 10 10-10 10.0.0.0 10.255.255.255 Network

10.48.0.0/12 Second 48 48-63 10.48.0.0 10.63.255.255 Network

20.42.255.255/13 Second 42 40-47 20.40.0.0 20.47.255.255 Valid host

30.6.1.0/16 Second 6 6-6 30.6.0.0 30.6.255.255 Valid host

40.60.240.0/17 Third 240 128-255 40.60.128.0 40.60.255.255 Valid


Host

50.100.255.255/20 Third 255 240-255 50.100.240.0 50.100.255.255 Broadcast

1.1.8.255/23 Third 8 8-9 1.1.8.0 1.1.9.255 Valid host

100.100.100.110/25 Fourth 110 0-127 100.100.100.0 100.100.100.127 Valid


Host

110.80.20.128/27 Fourth 128 128-159 110.80.20.128 110.80.20.159 Network

120.20.30.15/30 Fourth 15 12-15 120.20.30.12 120.20.30.15 Broadcast

150.60.180.0/19 Third 180 160 - 191 150.60.160.0 150.60.191.255 Valid host

160.0.39.255/21 Third 39 32-39 160.0.32.0 160.0.39.255 Broadcast


NETWORK ADMINISTRATION

172.168.8.0/24 Third 8 8-8 172.168.8.0 172.168.8.255 Network

180.78.0.64/28 Fourth 64 64-79 180.78.0.64 180.78.0.79 Network

185.0.0.26/29 Fourth 26 24-31 185.0.0.24 185.0.0.31 Valid host

192.168.1.240/25 Fourth 240 128-255 192.168.1.128 192.168.1.255 Valid host

200.20.10.191/26 Fourth 191 128- 191 200.20.10.128 200.20.10.191 Broadcast

210.200.20.100/27 Fourth 100 96 -127 210.200.20.96 210.200.20.127 Valid host

215.0.0.47/28 Fourth 47 32-47 215.0.0.32 215.0.0.47 Broadcast

220.10.10.50/29 Fourth 50 48- 55 220.10.10.48 220.10.10.55 valid host

Calculating the subnet mask of a given IP address


In these types of questions, we calculate the subnet mask of a given IP address.
Let us take some example IP addresses and calculate their subnet masks.
20.10.30.0/8, 111.187.45.34/14, 162.160.46.24/20, 202.100.20.50/27
In the first step, we find the interesting octet.

Given IP address Value after slash Interesting octet

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.

Given IP address Value after slash Interesting octet Temporary mask

20.10.30.0/8 8 First X.0.0.0

111.187.45.34/14 14 Second 255.X.0.0

162.160.46.24/20 20 Third 255.255.X.0

202.100.20.50/27 27 Fourth 255.255.255.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

20.10.30.0/8 8 First 1–8 8–8=0

111.187.45.34/14 14 Second 9 – 16 16 – 14 = 2

162.160.46.24/20 20 Third 17 – 24 24 -20 = 4

202.100.20.50/27 27 Fourth 25 – 32 32 – 27 = 5

Use the following formula to calculate the interesting octet's value.


Interesting octet's value = 256 - 2Remainder of the subtraction

Given IP address Value after slash Remainder of the subtraction Calculation Step 1 Calculation step 2

20.10.30.0/8 8 0 20 = 1 256 – 1 = 255

111.187.45.34/14 14 2 22 = 4 256 – 4 = 252

162.160.46.24/20 20 4 24 = 16 256 – 16 = 240

202.100.20.50/27 27 5 25 = 32 256 – 32 = 224

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

20.10.30.0/8 8 X.0.0.0 255 255.0.0.0

111.187.45.34/14 14 255.X.0.0 252 255.252.0.0

162.160.46.24/20 20 255.255.X.0 240 255.255.240.0

202.100.20.50/27 27 255.255.255.X 224 255.255.255.224

FLSM Subnetting and VLSM Subnetting


There are two types of Subnetting: FLSM and VLSM. In FLSM, all subnets have an equal
number of host addresses and use the same subnet mask. In VLSM, subnets have a flexible
number of host addresses. They use a subnet mask based on the number of hosts.
Default IP subnets have a large number of IP addresses. Most networks do not need too many
IP addresses. If they use the default subnet, all unused IP addresses become useless. To
utilize free IP addresses, we use subnetting.
Subnetting allows us to break default IP subnets. There are two types of subnetting: FLSM
and VLSM.
FLSM stands for Fixed Length Subnet Mask. In it, we break the default IP subnet into the
same-sized subnets. For example, if the default subnet has 12 IP addresses, we can break it
into three equal-sized subnets having 4 IP addresses in each.
NETWORK ADMINISTRATION

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 are equal in size. Subnets are variable in length.

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 is easy to configure and manage. It is complex in configuration and


administration.

It wastes a lot of IP addresses. It wastes minimum IP addresses.

It is also known as classful subnetting. It is also known as classless subnetting.

It supports both classful and classless routing It supports only classless routing protocols.
protocols.

VLSM Subnetting Explained with Examples


VLSM subnetting allows us to create subnets based on our requirements and network size. It
allows us to create subnets with different subnet masks.
There are two types of subnetting: FLSM and VLSM. FLSM is easy but produces subnets
having the same number of IP addresses. The same-sized subnets do not scale all networks.
Let us take an example. We have an IP subnet having 12 IP addresses. We have two
networks. The first network has seven hosts. The second network has three hosts.
If we use FLSM, we can create the following subnets.

Subnets Hosts in each subnet

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

VLSM Subnetting example


The following image shows a network.

The above network has the following requirements.


 The development department needs 74 IP addresses.
 The production department needs 52 IP addresses.
 The administration department needs 28 IP addresses.
 Three WAN links connect these departments.
 Each WAN link needs two IP addresses.
 The given default IP subnet is 192.168.1.0/24.

VLSM Subnetting step-by-step


In the first step, we calculate and arrange our IP requirements in descending order.
Each network needs two additional IP addresses, one for the network address and another for
the broadcast address. All IP subnets reserve two IP addresses for these requirements. They
use the first IP address for the network address and the last IP address for the broadcast
address.
Since each network requires two additional IP addresses, we add two to the total host
requirement of each network. After finalizing the host requirement, we find the block size
that fulfills the host requirement.
A block size is the block of IP address we get when we convert a host bit into a network bit.
The following table lists the block sizes we can have.

Host bit(s) 1 2 3 4 5 6 7 8

Block size 2 4 8 16 32 64 128 256

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.

Segment Host requirement Actual requirement

Production 52 54

Development 74 76

Administration 28 30

Wan link 1 2 4

Wan link 2 2 4

Wan link 3 2 4

In the next step, we arrange segments in descending order.

Segment Block size Descending order

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.

Subnet Subnet1 Subnet2

Network ID 192.168.1.0 192.168.1.128

First host address 192.168.1.1 192.168.1.129

Last host address 192.168.1.126 192.168.1.254

Broadcast ID 192.168.1.127 192.168.1.255

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

Subnet mask 255.255.255.128


NETWORK ADMINISTRATION

Network ID 192.168.1.0

First hosts 192.168.1.1

Last hosts 192.168.1.126

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.

Subnet Subnet 1 Subnet 2 Subnet 3 Subnet


4

Network ID 0 64 128 192

First address 1 65 129 193

Last address 62 126 190 254

Broadcast ID 63 127 191 255

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

Subnet mask 255.255.255.192

Network ID 192.168.1.128

First hosts 192.168.1.129

Last hosts 192.168.1.190

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.

Subnet Sub 1 Sub 2 Sub 3 Sub 4 Sub 5 Sub 6 Sub 7 Sub


8

Net ID 0 32 64 96 128 160 192 224

First Host 1 33 65 95 129 161 193 225

Last Host 30 62 94 126 158 190 222 254

Broadcast ID 31 63 95 127 159 191 223 255


NETWORK ADMINISTRATION

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

Subnet mask 255.255.255.224

Network ID 192.168.1.192

First hosts 192.168.1.193

Last hosts 192.168.1.222

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 Subnet 58 Subnet


59

Network ID 224 228 232

First host 225 229 233

Last host 226 230 234

Broadcast ID 227 231 235

Assign subnet 57 to the WAN link 1.

Subnet Subnet 57

Segments Wan Link 1

Requirement 2

CIDR /30
NETWORK ADMINISTRATION

Subnet mask 255.255.255.252

Network ID 192.168.1.224

First hosts 192.168.1.225

Last hosts 192.168.1.226

Broadcast ID 192.168.1.227

Assign subnet 58 to the WAN link 2.

Subnet Subnet 58

Segments Wan Link 2

Requirement 2

CIDR /30

Subnet mask 255.255.255.252

Network ID 192.168.1.228

First hosts 192.168.1.229

Last hosts 192.168.1.230

Broadcast ID 192.168.1.231

Assign subnet 59 to the WAN link 3.

Subnet Subnet 59

Segments Wan Link 3

Requirement 2

CIDR /30

Subnet mask 255.255.255.252

Network ID 192.168.1.232

First hosts 192.168.1.233

Last hosts 192.168.1.234

Broadcast ID 192.168.1.235

The following image shows the final allocation of IP addresses.


NETWORK ADMINISTRATION

We have assigned IP addresses to all segments. The subnets 60, 61, 62, 63, and 64 are still
available for further use.

Route Summarization Advantages and Disadvantages


Routers learn routes from route advertisements. Routers advertise the routing information
they have in their routing tables. Route summarization allows routers to advertise
summarized routes.
We use subnetting to break IP subnets into small IP subnets. Subnetting provides many
benefits, but it also creates overhead. For example, if we break an IP subnet into eight IP
subnets, routers must learn and broadcast eight IP subnets instead of a single IP subnet.
Route summarization solves this issue. It allows routers to advertise contiguous networks as a
single summarized or aggregated route. They can use it to summarize subnetted routes back
to the class boundary.
For example, the following image shows a network that uses subnetted networks. All
subnetted routes are on the left side of the production router. The production router can
advertise these routes to the right side in two ways: individually and collectively. It uses the
route summarization feature to advertise them collectively.
NETWORK ADMINISTRATION

The following figure shows an example of route summarization.

Advantages of Route Summarization


Route summarization provides the following advantages.
 It reduces the size of routing tables. Routers store only summarized routes in the
routing table instead of subnetted.
 Routers need less memory and processing power as they process fewer routes.
 It requires less bandwidth as routers advertise fewer routing updates.
 It hides network problems such as a flapping route.
 It provides a better overview of the network.
 It decreases the use of resources such as Memory and CPU.
NETWORK ADMINISTRATION

 It decreases the required time to rebuild the routing tables.


Disadvantages of route summarization
The main disadvantages of route summarization are the following.
 It adds complexity to the network.
 Summarized routes are confusing. You can decode them only if you know how
subnetting works.
 Summarized routes may contain errors. For example, they may advertise a down
subnet as an up subnet.
Route summarization and flapping routes
A flapping route is a route that is going up and down, up and down. Loose connections and
short circuits are two common reasons that cause flapping.
A flapping route affects the connected router and any other router that knows about it. Every
time it goes up or down, the other routers have to incorporate the change into their routing
tables.
However, if routers know only the summarized route, they will not be affected by the
flapping route. They will affect only when all four subnets fail, causing the router performing
the summarization to stop advertising the summarized route.
Hiding a flapping route has both advantages and disadvantages. On the positive side, it
provides stability in the network. Routers change their routing table only when all routes of a
summarized route fail. On the negative side, it hides the complete picture of the network.
It can cause routers to make bad assumptions.
Let us understand it through the preceding example.
Suppose, the network 192.168.1.128/26 is down. Routers on the right side of the production
router will still receive updates concerning the summarized route (192.168.1.0/24). From
their perspective, since the production router is still advertising this route, all addresses from
192.168.1.0 through 192.168.1.255 must be available. Obviously, this is not true, and thus
other routers will still send traffic to 192.168.1.128/26 since they think it’s still reachable.

Supernetting Tutorial: – Supernetting Explained with Examples


Supernetting is also known as route summarization or aggregation. It is the opposite of
subnetting. In subnetting, we break a single subnet into many subnets. In supernetting, we
join multiple subnets into a single subnet.
The network address and block size are two main elements of supernetting. We can perform
supernetting only on the subnets having the same network address. If subnets have different
network addresses, we cannot combine them through the supernetting.
NETWORK ADMINISTRATION

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

Class 16 16 255.255.0.0 /16


B

Class 24 8 255.255.255.0 /24


C

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

Route summarization example1


192.168.1.0/25, 192.168.1.128/26, 192.168.1.192/27, 192.168.1.224/28, 192.168.1.240/30,
192.168.1.244/30, 192.168.1.248/30, 192.168.1.252/30
Route summarization example2
10.0.0.0/23, 10.0.2.0/24, 10.0.3.0/25, 10.0.3.128/26, 10.0.3.192/27, 10.0.3.224/28,
10.0.3.240/30, 10.0.3.244/30, 10.0.3.248/30, 10.0.3.252/30
In the first step, we arrange all subnets in ascending order based on their CIDR values. If the
CIDR value of two subnets is the same, we use their network addresses. We also write the
network and broadcast addresses of all subnets. We use them to identify contiguous subnets.
Supernetting Example 1

Route CIDR value Subnet Mask Network ID Broadcast ID Block Size

192.168.1.0/25 25 255.255.255.128 192.168.1.0 192.168.1.127 128

192.168.1.128/26 26 255.255.255.192 192.168.1.128 192.168.1.191 64

192.168.1.192/27 27 255.255.255.224 192.168.1.192 192.168.1.223 32

192.168.1.224/28 28 255.255.255.240 192.168.1.224 192.168.1.239 16

192.168.1.240/30 30 255.255.255.252 192.168.1.240 192.168.1.248 4

192.168.1.244/30 30 255.255.255.252 192.168.1.244 192.168.1.247 4

192.168.1.248/30 30 255.255.255.252 192.168.1.248 192.168.1.251 4

192.168.1.252/30 30 255.255.255.252 192.168.1.252 192.168.1.255 4

Supernetting Example 2

Route CIDR value Subnet Mask Network ID Broadcast ID Block Size

10.0.0.0/23 23 255.255.254.0 10.0.0.0 10.0.1.255 512

10.0.2.0/24 24 255.255.255.0 10.0.2.0 10.0.2.255 256

10.0.3.0/25 25 255.255.255.128 10.0.3.0 10.0.3.127 128

10.0.3.128/26 26 255.255.255.192 10.0.3.128 10.0.3.191 64

10.0.3.192/27 27 255.255.255.224 10.0.3.192 10.0.3.223 32

10.0.3.224/28 28 255.255.255.240 10.0.3.224 10.0.3.239 16

10.0.3.240/30 30 255.255.255.252 10.0.3.240 10.0.3.243 4

10.0.3.244/30 30 255.255.255.252 10.0.3.244 10.0.3.247 4

10.0.3.248/30 30 255.255.255.252 10.0.3.248 10.0.3.251 4


NETWORK ADMINISTRATION

10.0.3.252/30 30 255.255.255.252 10.0.3.252 10.0.3.255 4

In the second step, we add the block sizes of all contiguous networks.

Network1 = 128 + 64 + 32 + 16 + 4 + 4 + 4 + 4 = 256


Network2 = 512 + 256 + 128 + 64 + 32 + 16 + 4 + 4 + 4 + 4 = 1024
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 block size chart. The following table lists the
block sizes of all IP subnets.

CIDR Subnet mask Block Size

/8 255.0.0.0 16777216

/9 255.128.0.0 8388608

/10 255.192.0.0 4194304

/11 255.224.0.0 2097152

/12 255.240.0.0 1048576

/13 255.248.0.0 524288

/14 255.252.0.0 262144

/15 255.254.0.0 131072


NETWORK ADMINISTRATION

/16 255.255.0.0 65536

/17 255.255.128.0 32768

/18 255.255.192.0 16384

/19 255.255.224.0 8192

/20 255.255.240.0 4096

/21 255.255.248.0 2048

/22 255.255.252.0 1024

/23 255.255.254.0 512

/24 255.255.255.0 256

/25 255.255.255.128 128

/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

Let us take two more examples.


Route summarization example 3

Route summarization example 4

Let us perform route summarization for the above subnets.


In the first step, we arrange all subnets in ascending order based on their block sizes. We also
write their network and broadcast addresses.
Route summarization 3 (Router A)

Route CIDR Subnet mask Network ID Broadcast ID Block Size

172.168.1.32 28 255.255.240.0 172.168.1.32 172.168.1.47 16

172.168.1.48 28 255.255.240.0 172.168.1.48 172.168.1.63 16

172.168.1.128 28 255.255.240.0 172.168.1.128 172.168.1.143 16

172.168.1.144 28 255.255.240.0 172.168.1.144 172.168.1.159 16

172.168.1.160 28 255.255.240.0 172.168.1.160 172.168.1.175 16


NETWORK ADMINISTRATION

172.168.1.176 28 255.255.240.0 172.168.1.176 172.168.1.191 16

Route summarization 3 (Router B)

Route CIDR Subnet mask Network ID Broadcast ID Block Size

172.168.1.64 28 255.255.240.0 172.168.1.64 172.168.1.79 16

172.168.1.80 28 255.255.240.0 172.168.1.80 172.168.1.95 16

172.168.1.96 28 255.255.240.0 172.168.1.96 172.168.1.111 16

172.168.1.112 28 255.255.240.0 172.168.1.112 172.168.1.127 16

172.168.1.192 28 255.255.240.0 172.168.1.192 172.168.1.207 16

172.168.1.208 28 255.255.240.0 172.168.1.208 172.168.1.223 16

Route summarization 4 (Router A)

Route CIDR Subnet mask Network ID Broadcast ID Block Size

122.128.58.0 29 255.255.255.248 122.128.58.0 122.128.58.7 8

122.128.58.48 29 255.255.255.248 122.128.58.48 122.128.58.55 8

122.128.58.64 29 255.255.255.248 122.128.58.64 122.128.58.71 8

122.128.58.72 29 255.255.255.248 122.128.58.72 122.128.58.79 8

122.128.58.80 29 255.255.255.248 122.128.58.80 122.128.58.87 8

Route summarization 4 (Router B)

Route CIDR Subnet mask Network ID Broadcast ID Block Size

122.128.58.8 29 255.255.255.248 122.128.58.8 122.128.58.15 8

122.128.58.16 29 255.255.255.248 122.128.58.16 122.128.58.23 8

122.128.58.24 29 255.255.255.248 122.128.58.24 122.128.58.31 8

122.128.58.32 29 255.255.255.248 122.128.58.32 122.128.58.39 8

122.128.58.40 29 255.255.255.248 122.128.58.40 122.128.58.47 8

122.128.58.56 29 255.255.255.248 122.128.58.56 122.128.58.63 8

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

Summarize the subnets 172.168.1.32/28 and 172.168.1.48/28 in a single subnet


172.168.1.32/27 of block size 32.
In the second group, we have four sequential subnets: 128, 144, 160, and 176 of block size
16. The sum of all block sizes is 64. 64 is a valid block size. The network ID of the first
sequential route (128) is also in the range of block size (64) counting (0, 64, 128, 192 ……).
Thus, we can use the block size 64 to summarize these subnets. The CIDR value of block size
64 is /26. We will use it to summarize these subnets.
Summarize the subnets 172.168.1.128/28, 172.168.1.144/28, 172.168.1.160/28 and
172.168.1.176/28 in a single subnet 172.168.1.128/26 of block size 64.
Supernetting example 3 (Router B)
This router also has two groups of contiguous subnets.
In the first group, we have four contiguous subnets: 64, 80, 96, and 112 of block size 16. The
sum of block sizes is 64 (16+16+16+16). 64 is a valid block size. If we count in block size,
the network address of the first subnet is also available in the list.
172.168.1.0/26, 172.168.1.64/26, 172.168.1.128/26....
Therefore, we can summarize the subnets 172.168.1.64/28, 172.168.1.80/28,
172.168.1.96/28, and 172.168.1.112/28 in a single subnet 172.168.1.64/26 of block size 64.
In the second group, we have two contiguous subnets: 192 and 208 of block size 16. The sum
of block sizes is 32 (16+16). 32 is a valid block size. If we count in block size, the network
address of the first subnet is also available in the list.
172.168.1.0/27, 172.168.1.32/27, 172.168.1.64/27, 172.168.1.96/27, 172.168.1.128/27,
172.168.1.160/27, 172.168.1.192/27, 172.168.1.224/27....
Therefore, we can summarize the subnets 172.168.1.192/28 and 172.168.1.208/28 in a single
subnet 172.168.1.192/27 of block size 32.
Supernetting example 4 (Router A)
On this router, we have five subnets. The first two subnets (0 and 48) have no contiguous
subnets. Hence, we cannot summarize them. The router will advertise them individually.
The remaining three subnets (64, 72, and 80) are contiguous. The sum of block sizes (8+8+8)
is 24. 24 is not a valid block size. It is not available in the block size chart. We can use only
the block sizes available in the block size chart.
If we exclude one subnet, the sum of block sizes (8+8) will be 16. 16 is a valid block size.
In block size 16, 64 (the network ID of the first sequential subnet) is a valid network ID (0,
16, 32, 48, 64, 80……).
Therefore, we can summarize the subnets 122.128.58.64/29 and 122.128.58.72/29 in a single
subnet 122.128.58.64/28 of block size 16.
We cannot summarize the third subnet even if it is contiguous. The router will advertise it
independently.
NETWORK ADMINISTRATION

Supernetting example 4 (Router B)


On this router, we have six subnets. The last subnet (56) has no contiguous subnets. Hence,
we can summarize it.
The remaining five subnets (8, 16, 24, 32, and 40) are contiguous.
The sum of block sizes (8+8+8+8+8) is 40. 40 is not a valid block size. It is not available in
the block size chart. We can use only the block sizes available in the block size chart.
If we exclude one subnet, the sum of block sizes (8+8+8+8) will be 32. 32 is a valid block
size.
The following are the valid network addresses in block size 32.
122.128.58.0/27, 122.128.58.32/27, 122.128.58.64/27......
Since the network ID of the first contiguous subnet is not available in the above list, we
cannot use this block size. The next smaller block size is 16. The valid network addresses of
block size 16 are the following.
122.128.58.0/27, 122.128.58.16/27, 122.128.58.32/27, 122.128.58.48/27, 122.128.58.64/27,
122.128.58.80/27, 122.128.58.96/27......
The network addresses of the second (122.128.58.16/29) and fourth (122.128.58.32/29)
subnets are available in the above list. We can use this block size to summarize the subnets.
We will summarize the subnets 122.128.58.16/29 and 122.128.58.24/29 in the subnet
122.128.58.16/27 of a block size of 16.
We will summarize the subnets 122.128.58.32/29 and 122.128.58.40/29 in the subnet
122.128.58.32/27 of a block size of 16.
The following table lists the summarized subnets for all four routers.

Example3 (Router A) Example3 (Router B) Example4 (Router A) Example4 (Router B)

172.168.1.32/27 172.168.1.64/26 122.128.58.0/29 122.128.58.8/29

172.168.1.128/26 192.168.1.192/27 122.128.58.48/29 122.128.58.16/28

122.128.58.64/28 122.128.58.32/28

122.128.58.80/29 122.128.58.56/29

You might also like