🌐Subnetting

 

📖 Definition

Subnetting is the process of dividing a large IP network into smaller logical networks called subnets.
It is done by borrowing bits from the host portion of an IP address and using them as network bits.

Subnetting helps in organizing networks efficiently and improves network management.

 

🧠 Simple Meaning

Subnetting means breaking a large network into smaller manageable networks.

Example:

Instead of using one large network for an entire organization, it can be divided into multiple smaller networks for different departments such as:

  • HR Department
  • Finance Department
  • IT Department
  • Sales Department

Each department can have its own subnet.

 

🏗 How Subnetting Works

An IPv4 address consists of two parts:

1️⃣ Network Portion – Identifies the network
2️⃣ Host Portion – Identifies the device within that network

During subnetting:

  • Some bits from the host portion are borrowed
  • These bits become subnet bits
  • The network is divided into multiple smaller networks

 

🔢 Example of Subnetting

Consider the network:

192.168.1.0/24

This network contains:

  • 256 total IP addresses
  • 254 usable host addresses

If we divide it into two subnets, each subnet will have:

  • 128 IP addresses
  • 126 usable hosts

Example subnets:

SubnetNetwork AddressHost RangeBroadcast Address
Subnet 1192.168.1.0192.168.1.1 – 192.168.1.126192.168.1.127
Subnet 2192.168.1.128192.168.1.129 – 192.168.1.254192.168.1.255

 

🌐 Why Subnetting is Used

Subnetting is used to:

  • Divide large networks
  • Reduce network congestion
  • Improve security
  • Improve network performance
  • Use IP addresses efficiently

 

📊 Real-Life Example

A company has one network:

192.168.10.0/24

Departments:

  • IT
  • HR
  • Finance
  • Sales

Using subnetting, the network can be divided into four smaller networks so each department has its own subnet.

 

🎯 Advantages of Subnetting

  • Better network organization
  • Efficient IP address utilization
  • Reduced broadcast traffic
  • Improved network performance
  • Enhanced network security

 

🚀Benefits of Subnetting 

Subnetting provides several advantages in network design and management. By dividing a large network into smaller subnets, organizations can improve performance, security, and efficient utilization of IP addresses.

 

1️⃣ Efficient IP Address Allocation

One of the most important benefits of subnetting is efficient use of IP addresses.

Without subnetting, a large block of IP addresses may be wasted. By dividing the network into smaller subnets, IP addresses can be assigned according to the actual number of hosts required.

Example

Network: 192.168.1.0/24
Total IP addresses = 256

If an organization has three departments:

  • HR → 50 devices
  • IT → 70 devices
  • Finance → 30 devices

Subnetting allows the network administrator to divide the IP addresses so each department receives only the required number of addresses instead of wasting the entire network.

 

2️⃣ Reduced Network Congestion

In a large network, broadcast traffic increases and can slow down network performance.

Subnetting reduces broadcast domains because each subnet has its own broadcast address. As a result, broadcast traffic remains within that subnet only.

This helps improve network performance.

 

3️⃣ Improved Network Security

Subnetting allows administrators to separate departments or services into different subnets.

Example:

  • Finance subnet
  • HR subnet
  • Guest network

Using routers or firewalls, access between these networks can be controlled, which improves overall security.

 

4️⃣ Better Network Management

Smaller networks are easier to manage compared to one large network.

Network administrators can easily:

  • Monitor traffic
  • Troubleshoot problems
  • Manage devices

Each subnet can be managed independently.

 

5️⃣ Improved Network Performance

When a network is divided into smaller subnets:

  • Broadcast traffic is reduced
  • Network traffic becomes organized

This improves the overall speed and efficiency of the network.

 

6️⃣ Logical Network Organization

Subnetting helps organize networks according to departments, floors, or locations.

Example:

DepartmentSubnet
IT192.168.1.0/26
HR192.168.1.64/26
Finance192.168.1.128/26
Sales192.168.1.192/26

This logical organization makes network design cleaner and easier to maintain.


 

🧠 Types of Subnetting

Subnetting can be classified mainly into two types based on how the subnet masks are used to divide a network.

 

1️⃣ Fixed Length Subnet Mask (FLSM)

📖 Definition

FLSM (Fixed Length Subnet Mask) is a subnetting method where all subnets have the same subnet mask and the same number of hosts.

This means every subnet created from the network has equal size.

 

🔹 Example

Network: 192.168.1.0/24

If we divide it using /26, we get 4 equal subnets.

SubnetNetwork AddressHost RangeBroadcast
1192.168.1.0192.168.1.1 – 192.168.1.62192.168.1.63
2192.168.1.64192.168.1.65 – 192.168.1.126192.168.1.127
3192.168.1.128192.168.1.129 – 192.168.1.190192.168.1.191
4192.168.1.192192.168.1.193 – 192.168.1.254192.168.1.255

Each subnet contains the same number of hosts.

 

🔹 Characteristics

  • Same subnet mask for all subnets
  • Same number of hosts in each subnet
  • Easy to design and calculate

 

❌ Limitation

It may cause IP address wastage when different departments require different numbers of hosts.

 

2️⃣ Variable Length Subnet Mask (VLSM)

📖 Definition

VLSM (Variable Length Subnet Mask) is a subnetting technique where subnets are created with different subnet masks based on host requirements.

This allows more efficient use of IP addresses.

 

🔹 Example

Network: 192.168.1.0/24

Host requirements:

DepartmentHosts Needed
IT120
HR50
Finance25
Sales10

Using VLSM:

DepartmentSubnet
IT192.168.1.0/25
HR192.168.1.128/26
Finance192.168.1.192/27
Sales192.168.1.224/28

Each subnet is created according to the required host size.

 

🔹 Characteristics

  • Different subnet masks
  • Flexible network design
  • Efficient IP utilization

 

📊 Comparison Between FLSM and VLSM

FeatureFLSMVLSM
Subnet SizeSameDifferent
Subnet MaskFixedVariable
IP UtilizationLess efficientMore efficient
FlexibilityLowHigh

 

🎯 Summary

There are two types of subnetting:

1️⃣ FLSM (Fixed Length Subnet Mask) – all subnets are equal in size.
2️⃣ VLSM (Variable Length Subnet Mask) – subnets have different sizes based on host requirements.

 

📡VLSM Overview (Variable Length Subnet Mask)

 

📖 What is VLSM?

VLSM (Variable Length Subnet Mask) is a subnetting technique that allows a network to be divided into subnets of different sizes based on the number of hosts required.

Unlike traditional subnetting, where all subnets have the same size, VLSM allows more flexibility and efficient use of IP addresses.

 

🧠 Simple Meaning

VLSM means creating subnets of different sizes according to the requirement of hosts.

Example:

If a company has departments with different numbers of devices:

  • IT → 120 hosts
  • HR → 50 hosts
  • Finance → 25 hosts
  • Sales → 10 hosts

Instead of assigning the same subnet size to every department, VLSM allows assigning larger subnets to large departments and smaller subnets to small departments.

 

🏗 How VLSM Works

In VLSM, subnetting is performed in such a way that:

1️⃣ The largest network requirement is allocated first.
2️⃣ Then the remaining networks are assigned smaller subnet sizes.

This ensures efficient IP address utilization.

 

🔢 Example

Network: 192.168.1.0/24

Host requirements:

DepartmentHosts Needed
IT120
HR50
Finance25
Sales10

Using VLSM:

DepartmentSubnet
IT192.168.1.0/25
HR192.168.1.128/26
Finance192.168.1.192/27
Sales192.168.1.224/28

Each subnet is created based on the required number of hosts.

 

🎯 Advantages of VLSM

  • Efficient use of IP addresses
  • Flexible subnet sizes
  • Reduces IP wastage
  • Improves network design
  • Supports hierarchical addressing

 

📊 Traditional Subnetting vs VLSM

FeatureTraditional SubnettingVLSM
Subnet SizeSame sizeDifferent sizes
IP UtilizationLess efficientMore efficient
FlexibilityLowHigh


 

🔢Calculating subnets, FVH, LVH, Broadcast address

 

🧮 STEP-1. Power of 2 Calculation

Choose the value of 2ⁿ (power of 2) such that the result is greater than or equal to the required number of hosts.

 

🧩 STEP-2. New Subnet Mask

The power value (n) represents the number of host bits (0s) in the subnet mask.
Use this to determine the new CIDR/subnet mask.

 

🌐 STEP-3. Network Address

The Network Address is the starting address of the subnet, represented using the given or newly calculated CIDR notation.

 

🖥️ STEP-4. First Valid Host (FVH)

The first usable host address is obtained by adding 1 to the last octet of the network address.

 

📏 STEP-5. Block Size

The block size is calculated using the formula:

Block Size = 256 − (value of the last octet of the new subnet mask)

 

➡️ STEP-6. Next Subnet Address

The next subnet address is obtained by adding the block size to the last octet of the current network address.

 

📡 STEP-7. Broadcast Address

The broadcast address is found by subtracting 1 from the next subnet address.

 

👥 STEP-8. Last Valid Host (LVH)

The last usable host address is obtained by subtracting 1 from the broadcast address.

 

🏢 EXAMPLE PROBLEM (SUBNETTING IN FOUR DEPARTMENTS)

 

🧩 VLSM Subnetting Example

📋 Department Requirements

  • 🖥️ IT Department = 120 Systems
  • ⚙️ Operations Department = 50 Systems
  • 🏢 Admin Department = 25 Systems
  • 🛠️ Support Department = 10 Systems

 

🌐 Given Network Information

  • Network Address = 192.168.50.0/24
  • Default Subnet Mask = 255.255.255.0 = 11111111.11111111.11111111.00000000 = /24

 

🖥️ 1️⃣ IT Department = 120 Systems

🔢 Host Calculation
2⁷ = 128 − 2 = 126 Valid Host Addresses

🧱 New Subnet Mask = 11111111.11111111.11111111.10000000 = 255.255.255.128 = /25

🌐 Network Address = 192.168.50.0/25

👤 First Valid Host (FVH) = 192.168.50.1/25

👤 Last Valid Host (LVH) = 192.168.50.126/25

📢 Broadcast Address = 192.168.50.127/25

📏 Block Size = 256 − 128 = 128

➡️ Next Subnet Address = 192.168.50.128/25

 

⚙️ 2️⃣ Operations Department = 50 Systems

🔢 Host Calculation
2⁶ = 64 − 2 = 62 Valid Host Addresses

🧱 New Subnet Mask = 11111111.11111111.11111111.11000000 = 255.255.255.192 = /26

🌐 Network Address = 192.168.50.128/26

👤 First Valid Host (FVH) = 192.168.50.129/26

👤 Last Valid Host (LVH) = 192.168.50.190/26

📢 Broadcast Address = 192.168.50.191/26

📏 Block Size = 256 − 192 = 64

➡️ Next Subnet Address = 192.168.50.192/26

 

🏢 3️⃣ Admin Department = 25 Systems

🔢 Host Calculation
2⁵ = 32 − 2 = 30 Valid Host Addresses

🧱 New Subnet Mask = 11111111.11111111.11111111.11100000 = 255.255.255.224 = /27

🌐 Network Address = 192.168.50.192/27

👤 First Valid Host (FVH) = 192.168.50.193/27

👤 Last Valid Host (LVH) = 192.168.50.222/27

📢 Broadcast Address = 192.168.50.223/27

📏 Block Size = 256 − 224 = 32

➡️ Next Subnet Address = 192.168.50.224/27

 

🛠️ 4️⃣ Support Department = 10 Systems

🔢 Host Calculation
2⁴ = 16 − 2 = 14 Valid Host Addresses

🧱 New Subnet Mask = 11111111.11111111.11111111.11110000 = 255.255.255.240 = /28

🌐 Network Address = 192.168.50.224/28

👤 First Valid Host (FVH) = 192.168.50.225/28

👤 Last Valid Host (LVH) = 192.168.50.238/28

📢 Broadcast Address = 192.168.50.239/28

📏 Block Size = 256 − 240 = 16

➡️ Next Subnet Address = 192.168.50.240/28

 

⭐ Important Note in VLSM

 

📌 In VLSM (Variable Length Subnet Mask), subnetting is always performed first for the subnet that requires the highest number of hosts.

This approach ensures that larger networks receive sufficient IP addresses, and the remaining address space can then be efficiently divided among smaller subnets.

 

In simple words:
Always arrange the subnets in descending order of host requirements and allocate IP addresses starting from the largest subnet to the smallest subnet.