Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

Network Lecture 11 Lecture Subneting

Subnetting is the process of dividing an IP network into smaller subnets for efficient address management and enhanced security. It can be implemented using Fixed Length Subnetting or Variable Length Subnet Masking (VLSM), with the latter allowing for subnets of varying sizes based on specific host requirements. The document provides detailed examples of subnetting a Class C network, including calculations for subnet masks, usable host ranges, and broadcast addresses.

Uploaded by

SYED MUJTBA
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Network Lecture 11 Lecture Subneting

Subnetting is the process of dividing an IP network into smaller subnets for efficient address management and enhanced security. It can be implemented using Fixed Length Subnetting or Variable Length Subnet Masking (VLSM), with the latter allowing for subnets of varying sizes based on specific host requirements. The document provides detailed examples of subnetting a Class C network, including calculations for subnet masks, usable host ranges, and broadcast addresses.

Uploaded by

SYED MUJTBA
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

Subnetting

 Farman Ullah
Subnetting

 Subnetting is the process of dividing an IP network into


smaller subnetworks, or subnets, to make more efficient
use of the network address

• An organization or Internet Service Provider (ISP)


allocated a block of IP addresses can systematically
divide it into smaller, manageable subnetworks. This
process, known as subnetting, creates a hierarchical
network structure.
Reason for subnetting
Maintaining large networks like Class A and Class B is
challenging for administrators.
Combining computers from different departments on a
single network reduces security.
Subnets enable granular access control, restricting traffic
between departments, enhancing security, and
protecting critical systems.
Advantages:
It improves the security
The maintenance and administration of subnets is easy

Disadvantages:
Identification of a station is difficult
Types of Subnetting
subnets can be of two types
 Fixed Length Subnetting
 Variable Length Subnetting
Fixed Length Subnetting

Fixed-length subnetting is a method of dividing a network into


smaller subnetworks where all resulting subnets have identical
characteristics:

Uniform subnet size: Each subnet contains the same number of IP


addresses.
Consistent host count: The number of hosts per subnet is identical
across all subnets.
Identical subnet mask: All subnets share the same subnet mask,
indicating the same number of bits allocated to the network portion
of the IP address.
This approach often wastes IP addresses by creating
oversized subnets for specific segments. Fixed-length
subnetting has been largely replaced by the more
efficient Variable Length Subnet Masking (VLSM).
Consider the network having IP Address 192.1.2.0. Divide this
network into two subnets.
Understanding the Network before subnetting
Given IP address: 192.1.2.0
Class: C (since the first octet is between 128 and 191)
Default subnet mask: 255.255.255.0
Subnetting Process
Determine the number of bits to borrow:

We need 2 subnets, so we need 1 bit to represent the two subnets (2^1 = 2).
We'll borrow 1 bit from the host portion of the IP address.

Calculate the new subnet mask:


The original subnet mask in binary is: 11111111.11111111.11111111.00000000
Borrowing 1 bit from the host portion, the new subnet mask becomes:
11111111.11111111.11111111.10000000
In decimal, this is: 255.255.255.128
Determine the subnet ID:
The first subnet ID is the original network address: 192.1.2.0
The second subnet ID is found by adding the subnet mask to the first subnet ID: 192.1.2.0 + 128 = 192.1.2.128

Calculate the number of hosts per subnet:


The number of remaining host bits is 7 (32 total bits - 8 network bits - 8 subnet bits).
Number of hosts per subnet = 2^7 - 2 = 126
Subnet 1:

Network address: 192.1.2.0


Subnet mask: 255.255.255.128
Usable host range: 192.1.2.1 to 192.1.2.126
Broadcast address: 192.1.2.127

Subnet 2:

Network address: 192.1.2.128


Subnet mask: 255.255.255.128
Usable host range: 192.1.2.129 to 192.1.2.254
Broadcast address: 192.1.2.255
Consider the network having IP Address 192.1.2.0. Divide this
network into 4 subnets.
Subnetting Process

Determine the number of bits to borrow:

We need 4 subnets, so we need 2 bits to represent the four subnets (2^2 = 4).
We'll borrow 2 bits from the host portion of the IP address.

Calculate the new subnet mask:


The original subnet mask in binary is: 11111111.11111111.11111111.00000000
Borrowing 2 bits from the host portion, the new subnet mask becomes:
11111111.11111111.11111111.11000000
In decimal, this is: 255.255.255.192
Determine the subnet IDs:
 The subnet ID increment is 64(since we borrowed 2 bits).
 Subnet 1: 192.1.2.0
 Subnet 2: 192.1.2.64
 Subnet 3: 192.1.2.128
 Subnet 4: 192.1.2.192

Calculate the number of hosts per subnet:


The number of remaining host bits is 6 (32 total bits - 8 network bits - 8 subnet bits).
Number of hosts per subnet = 2^6 - 2 = 62
Subnet Summary
Subnet 1:
Subnet 3:
Network address: 192.1.2.0
Subnet mask: 255.255.255.192 Network address: 192.1.2.128
Usable host range: 192.1.2.1 to 192.1.2.62 Subnet mask: 255.255.255.192
Broadcast address: 192.1.2.63 Usable host range: 192.1.2.129 to 192.1.2.190
Broadcast address: 192.1.2.191
Subnet 2:
Subnet 4:
Network address: 192.1.2.64
Subnet mask: 255.255.255.192 Network address: 192.1.2.192
Usable host range: 192.1.2.65 to 192.1.2.126 Subnet mask: 255.255.255.192
Broadcast address: 192.1.2.127 Usable host range: 192.1.2.193 to 192.1.2.254
Broadcast address: 192.1.2.255
Variable Length Subnet Masking (VLSM)

Variable Length Subnet Masking (VLSM) allows


creating subnets of varying sizes, offering greater
control over IP address allocation compared to
fixed-length subnetting.

Subnets of different sizes: Each subnet can accommodate a specific


number of hosts based on its requirements.
Unequal host counts: The number of hosts within each subnet can
vary.
Distinct subnet masks: Different subnet masks can be assigned to
different subnets to accommodate their specific needs.
In Variable Length Subnet Masking (VLSM), subnet
sizes must be powers of 2. This means you can
create subnets with sizes like 2𝑛, where 𝑛 is the
number of host bits. Therefore, subnets can have
sizes like 128, 64, 32, etc., but not arbitrary sizes
like 84 or 44.`
Consider we have a big single network having IP address
192.1.2.0. We want to do subnetting and divide this network into 3
subnets, such that first contains 126 hosts, and other two contains
62 hosts each?

Subnetting 192.1.2.0 into 3 Subnets

Understanding the Requirements


We have a Class C network: 192.1.2.0
We need 3 subnets:
Subnet 1: 126 hosts
Subnet 2: 62 hosts
Subnet 3: 62 hosts
Determining Subnet Masks
Since the subnet sizes are not powers of 2, we'll need to use
Variable Length Subnet Masking (VLSM) to accommodate the
specific host requirements.
Subnet 1:
Requires 126 hosts, so we need 7 bits for the host portion (2^7 - 2 = 126).
This leaves 25 bits for the network portion.
Subnet mask: 255.255.255.128 (25 bits in binary)

Subnet 2 and 3:
Require 62 hosts, so we need 6 bits for the host portion (2^6 - 2 = 62).
This leaves 26 bits for the network portion.
Subnet mask: 255.255.255.192 (26 bits in binary)
Creating the Subnets
Subnet 1:
Network address: 192.1.2.0
Subnet mask: 255.255.255.128
Usable host range: 192.1.2.1 - 192.1.2.126
Broadcast address: 192.1.2.127

Subnet 2:
Details Network address: 192.1.2.128
Subnet mask: 255.255.255.192
Usable host range: 192.1.2.129 - 192.1.2.190
Broadcast address: 192.1.2.191
Subnet 3:
Network address: 192.1.2.192
Subnet mask: 255.255.255.192
Usable host range: 192.1.2.193 - 192.1.2.254
Broadcast address: 192.1.2.255
Can We Make a Subnet of Any Size?
Short answer: Not exactly.

Power of 2: The number of hosts in a subnet must be a power of 2 minus 2.


This is because two IP addresses in each subnet are reserved for the network
address and broadcast address.
Example: Subnetting a Class C Network
Given:
• IP address: 192.168.1.0/24 (Class C network)
• Requirement: Divide into 4 subnets.
Step 1: Calculate the Bits to Borrow
• Class C has 8 host bits by default.
• To create 4 subnets:
2𝑛=4 ⟹ 𝑛 = 2
Borrow 2 bits from the host portion.
Step 2: Calculate the New Subnet Mask
• New subnet mask: /24 + 2 = /26.
• In dotted-decimal: 255.255.255.192.
Step 3: Calculate the Subnet Ranges
• Each subnet has 26 − 2 = 62 usable hosts.
Broadcast
Subnet Network Address First Usable IP Last Usable IP
Address
1 192.168.1.0/26 192.168.1.1 192.168.1.62 192.168.1.63
2 192.168.1.64/26 192.168.1.65 192.168.1.126 192.168.1.127

3 192.168.1.128/26 192.168.1.129 192.168.1.190 192.168.1.191

4 192.168.1.192/26 192.168.1.193 192.168.1.254 192.168.1.255

You might also like