0% found this document useful (0 votes)
38 views16 pages

Cpe 372 L5

A lecture note on subnetting and how it is done
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views16 pages

Cpe 372 L5

A lecture note on subnetting and how it is done
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

05/06/2024

CPE 372
Data Communication and Computer
Networks

Lecture Five
Network Subnetting and Supernetting

Adesina Joshua Ayodele, E ng.


Department of Computer Engineering
University of Ilorin
2023/2024 Session

IPv4 Addressing
IPv4 (Internet Protocol version 4) is the fourth
version of the Internet Protocol, widely used
for identifying and addressing devices on
computer networks.
It uses a 32-bit address space, allowing for
approximately 4.3 billion unique addresses.
Expressed in dotted-decimal notation (e.g.,
192.168.1.1).

1
05/06/2024

IPv4 Addressing Structure


Expressed in dotted-decimal notation, consisting of
four octets separated by periods (e.g., 192.168.1.1).
32-Bit Address: Each octet represents 8 bits,
resulting in a total of 32 bits.
Classes: IPv4 addresses were originally divided into
five classes: A, B, C, D, and E. However, classes D and
E are reserved for special purposes, and only classes A,
B, and C are used for general addressing.

Class Categorization
Class A: Large organizations, with the first
octet reserved for network identification.
Class B: Medium-sized organizations, with the
first two octets reserved for network
identification.
Class C: Small organizations, with the first
three octets reserved for network
identification.

2
05/06/2024

Classful Addressing
Class A Addresses
◦ Format: First bit set to 0, allowing for 7 bits of network
address and 24 bits of host address.
◦ Range: 0.0.0.0 to 127.255.255.255
◦ Example: 10.0.0.0, 11.0.0.0
◦ Usage: Large organizations with millions of hosts.
◦ Network ID: First 8 bits (octet)
◦ Host ID: Last 24 bits
◦ Number of Networks: 128 (2^7)
◦ Number of hosts per network: 16,777,216 (2^24)
◦ Default subnet mask: 255.0.0.0

Classful Addressing
Class B Addresses
◦ Format: First two bits set to 10, allowing for 14 bits of network
address and 16 bits of host address.
◦ Range: 128.0.0.0 to 191.255.255.255
◦ Example: 172.16.0.0, 172.17.0.0
◦ Usage: Medium-sized organizations with thousands of hosts.
◦ Network ID: First 16 bits (2 octets)
◦ Host ID: Last 16 bits
◦ Number of networks: 16,384 (2^14)
◦ Number of hosts per network: 65,536 (2^16)
◦ Default Subnet mask: 255.255.0.0

3
05/06/2024

Classful Addressing
Class C Addresses
◦ Format: First three bits set to 110, allowing for 21 bits of
network address and 8 bits of host address.
◦ Range: 192.0.0.0 to 223.255.255.255
◦ Example: 192.168.0.0, 192.168.1.0
◦ Usage: Small organizations with up to 254 hosts.
◦ Network ID: First 24 bits (3 octets)-
◦ Host ID: Last 8 bits- Number of networks: 2,097,152 (2^21)
◦ Number of hosts per network: 256 (2^8)
◦ Default subnet mask: 255.255.255.0

IPv6 Addressing
IPv6 is the sixth version of the Internet Protocol, designed to
address the limitations of IPv4 and provide a larger address space.
IPv6 is expressed in hexadecimal notation (e.g.,
2001:0db8:85a3:0000:0000:8a2e:0370:7334).
IPv6 uses a 128-bit address space, allowing for a significantly
larger number of unique addresses compared to IPv4.
IPv6 headers are simpler compared to IPv4, improving routing
efficiency and reducing overhead.
IPv6 supports stateless address autoconfiguration, enabling
devices to automatically configure their IP addresses without the
need for DHCP servers.

4
05/06/2024

Subnetting
Subnetting involves dividing a large network into
smaller subnetworks or more manageable pieces called
subnets.
Subnetting majorly improves network efficiency,
security, performance and management.
Subnet Mask: Determines the network and host
portions of an IP address.
Example: Subnetting a Class C network (e.g.,
192.168.1.0) into smaller subnets to accommodate
multiple departments within an organization.

Why Subnet?
Organize Networks: Different
departments or floors can have their own
subnets.
Improve Security: Separates sensitive
parts of the network.
Reduce Congestion: Limits broadcast
traffic to smaller subnets.

5
05/06/2024

Subnetting for Network


Design-Benefits
Efficient Resource Allocation: Ensures optimal
use of IP addresses and reduces address wastage.
Improved Network Performance: Reduces
broadcast traffic and enhances network segmentation.
Enhanced Security: Provides isolation between
different parts of the network, improving security and
privacy.

How subnetting Works


Network and Host Parts: An IP address has two parts:
the network part and the host part.
Subnetting increases the network part and decreases
the host part.
Subnet Mask: Used to determine the network part of
an IP address. Example: 255.255.255.0.
CIDR Notation: Denotes the subnet mask with a slash
and the number of network bits, e.g., /24.

6
05/06/2024

Network Address and


Broadcast Address
Network Address: Identifies the network itself.
It is the first address in the network
range and has all host bits set to 0.

Broadcast Address: Used to communicate with


all devices on the network. It is the last
address in the network range and has all
host bits set to 1.

Subnetting for Network


Design- Principles
Determine the Subnet Size: Based on the
number of required subnets and hosts per
subnet.
Choose Subnet Masks: Subnet masks define
the size of each subnet and the number of host
addresses.
Address Allocation: Allocating IP addresses to
devices within each subnet while ensuring
efficient address utilization.

7
05/06/2024

Subnetting
implementation
Subnetting a Class C network
(192.168.1.0/24) to create four subnets
with at least 30 hosts per subnet.

Determine the Subnet


Size
Requirement: At least 30 hosts per subnet.
Formula: 2^n - 2 ≥ Number of Hosts (n = number of host bits)
Calculation: 2^5 - 2 = 30 (5 host bits)
Subnet Mask: /27 or 255.255.255.224 = 1111 1111 1111 1111 1111
1111 1110 0000

8
05/06/2024

Choose Subnet Masks-


Divide Address Space into
Subnets
Divide the original Class C network (192.168.1.0) into four
subnets:
Subnet 1: 192.168.1.0/27 (Network Address: 192.168.1.0,
Broadcast Address: 192.168.1.31)
Subnet 2: 192.168.1.32/27 (Network Address: 192.168.1.32,
Broadcast Address: 192.168.1.63)
Subnet 3: 192.168.1.64/27 (Network Address: 192.168.1.64,
Broadcast Address: 192.168.1.95)
Subnet 4: 192.168.1.96/27 (Network Address: 192.168.1.96,
Broadcast Address: 192.168.1.127)

Address Allocation
Each subnet can accommodate up to 30 hosts,
with addresses ranging from 192.168.1.1 to
192.168.1.30 (excluding network and broadcast
addresses).
Repeat the process for each subnet, assigning
unique IP addresses to hosts within the subnet.

9
05/06/2024

Supernetting
Supernetting is the process of combining
multiple smaller networks into a larger
one.

The purpose is to simplify routing and


reduces the size of routing tables.

Why Supernet?
Reduce Complexity: Easier management
of fewer, larger networks.
Efficient Routing: Reduces the number of
routes routers need to manage.

10
05/06/2024

How Supernetting
Works?
Combine Networks: Merge multiple
contiguous IP address ranges.

Supernet Mask: Fewer network bits


compared to the original smaller
networks.

Example of Supernetting
Given Networks: 192.168.0.0/24 and
192.168.1.0/24, combine into one supernet.
Calculation:
Original Subnet Masks: 255.255.255.0 (/24)
New Supernet Mask: 255.255.254.0 (/23)
Combined Range: 192.168.0.0 -
192.168.1.255

11
05/06/2024

Class Quiz
Given Network: 192.168.1.0/24,
create a subnet into smaller
subnets with 64 addresses
each.

Solution
Original Subnet Mask: 255.255.255.0 (/24)
New Subnet Mask: 255.255.255.192 (/26)
Number of Subnets: 2^2 = 4 subnets

Subnet 1: 192.168.1.0/26
Network Address: 192.168.1.0
Broadcast Address: 192.168.1.63
Valid Hosts: 192.168.1.1 to 192.168.1.62

12
05/06/2024

Solution
Subnet 2: 192.168.1.64/26
Network Address: 192.168.1.64
Broadcast Address: 192.168.1.127
Valid Hosts: 192.168.1.65 to 192.168.1.126

Other subnets are: 192.168.0.96/27,


192.168.0.128/27, 192.168.0.160/27

Understanding Subnet
Masks
A subnet mask is used to divide an IP address into the network
and host portions.
It helps determine which part of an IP address refers to the
network and which part refers to the specific device (host) within
that network.

13
05/06/2024

255.255.255.0 (/24):
Binary Representation:
11111111.11111111.11111111.00000000
Network Bits: 24 bits (all 1's)
Host Bits: 8 bits (all 0's)
Total Addresses in Network: 2^8 = 256 addresses
Usable Host Addresses: 256 - 2 (network address
and broadcast address) = 254 hosts

Subnetting Process
To create smaller subnets within a given network, we
"borrow" bits from the host portion of the address
and use them as additional network bits.
If we borrow 2 bits from the host part, we get:
New Network Bits: 24 (original) + 2 (borrowed) = 26
bits
New Host Bits: 8 (original) - 2 (borrowed) = 6 bits

14
05/06/2024

New Subnet Mask:


255.255.255.192 (/26)
Binary Representation:
11111111.11111111.11111111.11000000
In decimal: The first three octets remain
the same as the original (255.255.255).
The fourth octet has the first 2 bits set to
1 (11000000), which equals 192 in
decimal.

Subnet Calculation
Number of Subnets: 2^2 = 4 subnets
(since we borrowed 2 bits)
Number of Hosts per Subnet: 2^6 = 64
addresses per subnet
Usable Hosts per Subnet: 64 - 2 = 62
(subtracting 2 for the network and
broadcast addresses)

15
05/06/2024

Original Network:
192.168.1.0/24
Binary Representation:
11000000.10101000.00000001.000000
00 (for 192.168.1.0)

New Subnets with /26:


•Subnet 1: •Subnet 3:
•Network Address: 192.168.1.0 •Network Address: 192.168.1.128
•First Usable Address: 192.168.1.1 •First Usable Address: 192.168.1.129
•Last Usable Address: 192.168.1.62 •Last Usable Address: 192.168.1.190
•Broadcast Address: 192.168.1.63 •Broadcast Address: 192.168.1.191

•Subnet 2: •Subnet 4:
•Network Address: 192.168.1.64 •Network Address: 192.168.1.192
•First Usable Address: 192.168.1.65 •First Usable Address: 192.168.1.193
•Last Usable Address: 192.168.1.126 •Last Usable Address: 192.168.1.254
•Broadcast Address: 192.168.1.127 •Broadcast Address: 192.168.1.255

16

You might also like