Implementation of Variable Length Subnet Masking (VLSM) for Efficient IP Address Allocation

 

Introduction

Variable Length Subnet Masking (VLSM) is a powerful technique in IP address allocation that allows networks to be divided into subnets of varying sizes, catering to diverse requirements while minimizing address wastage. Unlike Fixed-Length Subnet Masking (FLSM), which creates equal-sized subnets, VLSM provides the flexibility to allocate just enough IP addresses to each subnet based on its specific needs.

In this lab report, we implement VLSM in a simulated network using Cisco Packet Tracer. The primary objective is to optimize the use of IPv4 address space by assigning appropriate subnet sizes to different network segments. This approach ensures efficient address utilization and demonstrates the practicality of VLSM in real-world scenarios, such as corporate networks and large-scale deployments.


Objectives of the Lab

  1. To understand the principles of Variable Length Subnet Masking (VLSM).
  2. To design and configure a network topology using VLSM in Cisco Packet Tracer.
  3. To analyze and validate the efficient use of IP addresses through VLSM.

Fundamentals of VLSM

  • What is VLSM?
    VLSM allows the use of different subnet masks within the same network, enabling networks to allocate IP address space more effectively.
  • Key Benefits:
    • Optimizes IP address usage.
    • Provides scalability for networks of varying sizes.
    • Reduces address wastage compared to FLSM.
  • How it Works:
    • Start with the largest subnet and assign a subnet mask.
    • Divide the remaining address space into smaller subnets as needed.


Network Design and Configuration

  • Scenario:
    A company has the following network requirements:
    • HR Department: 50 hosts.
    • IT Department: 100 hosts.
    • Admin Department: 20 hosts.
    • Guest Network: 10 hosts.
  • Given Network Address: 192.168.1.0/24.
  • Steps:
    1. Calculate subnets using VLSM.
    2. Configure the subnets in Cisco Packet Tracer.
    3. Verify connectivity.

Step 1: Calculate Subnet Sizes

For each department, determine the number of usable IP addresses needed and select the appropriate subnet mask based on the nearest power of 2:

  1. HR Department:

    • Hosts needed: 50.
    • Nearest power of 2: 26=642^6 = 64.
    • Subnet mask: /26 (Subnet size = 64, usable = 62).
  2. IT Department:

    • Hosts needed: 100.
    • Nearest power of 2: 27=1282^7 = 128.
    • Subnet mask: /25 (Subnet size = 128, usable = 126).
  3. Admin Department:

    • Hosts needed: 20.
    • Nearest power of 2: 25=322^5 = 32.
    • Subnet mask: /27 (Subnet size = 32, usable = 30).
  4. Guest Network:

    • Hosts needed: 10.
    • Nearest power of 2: 24=162^4 = 16.
    • Subnet mask: /28 (Subnet size = 16, usable = 14).



Step 3: Verify IP Allocation

Summary

  • Total Addresses Available: 256 (from 192.168.1.0/24).
  • Total Addresses Used:
    • IT: 128 (1 subnet).
    • HR: 64 (1 subnet).
    • Admin: 32 (1 subnet).
    • Guest: 16 (1 subnet).
  • Remaining Addresses: 16 (from 192.168.1.240 - 192.168.1.255)




implementation:

Network Requirements and VLSM Subnet Calculation

Network Topology Recap
  • Router 0 (R0): Connected to the 192.168.10.0/26 network (PC0 and PC1).
  • Router 1 (R1): Connected to the 192.168.10.64/27 network (PC2).
  • Router 2 (R2): Connected to the 192.168.10.96/30 network (PC3).
Given Network Address: 192.168.10.0/24

Subnet Calculation
  1. Subnet 1 (192.168.10.0/26):

    • Hosts needed: Up to 62.
    • Subnet mask: /26 (255.255.255.192).
    • Subnet size: 64 IPs.
    • Usable IP range: 192.168.10.1 - 192.168.10.62.
  2. Subnet 2 (192.168.10.64/27):

    • Hosts needed: Up to 30.
    • Subnet mask: /27 (255.255.255.224).
    • Subnet size: 32 IPs.
    • Usable IP range: 192.168.10.65 - 192.168.10.94.
  3. Subnet 3 (192.168.10.96/30):

    • Hosts needed: 2.
    • Subnet mask: /30 (255.255.255.252).
    • Subnet size: 4 IPs.
    • Usable IP range: 192.168.10.97 - 192.168.10.98.
  4. Subnet 4 (192.168.10.100/30):

    • Hosts needed: 2 (inter-router link).
    • Subnet mask: /30 (255.255.255.252).
    • Subnet size: 4 IPs.
    • Usable IP range: 192.168.10.101 - 192.168.10.102.
  5. Subnet 5 (192.168.10.104/30):

    • Hosts needed: 2 (inter-router link).
    • Subnet mask: /30 (255.255.255.252).
    • Subnet size: 4 IPs.
    • Usable IP range: 192.168.10.105 - 192.168.10.106.

3. VLSM Subnet Table


in clear 
Subnet NameCIDRSubnet MaskSubnet SizeUsable IP RangeBroadcast Address
Subnet 1 (R0-PCs)/26255.255.255.19264192.168.10.1 - 192.168.10.62192.168.10.63
Subnet 2 (R1-PC2)/27255.255.255.22432192.168.10.65 - 192.168.10.94192.168.10.95
Subnet 3 (R2-PC4)/30255.255.255.2524192.168.10.97 - 192.168.10.98192.168.10.99
Subnet 4 (R0-R1)/30255.255.255.2524192.168.10.101 - 192.168.10.102192.168.10.103
Subnet 5 (R1-R2)/30255.255.255.2524192.168.10.105 - 192.168.10.106192.168.10.107

4. Static Routing Configuration

Below are the static routes configured on each router to enable communication between the subnets:

Router 0 (R0):


Router(config)#ip route 192.168.10.64 255.255.255.224 192.168.10.102 Router(config)#ip route 192.168.10.96 255.255.255.252 192.168.10.102 Router(config)#ip route 192.168.10.104 255.255.255.252 192.168.10.102

Router 1 (R1):


Router(config)#ip route 192.168.10.0 255.255.255.192 192.168.10.101 Router(config)#ip route 192.168.10.96 255.255.255.252 192.168.10.106 Router(config)#ip route 192.168.10.104 255.255.255.252 192.168.10.106

Router 2 (R2):


Router(config)#ip route 192.168.10.0 255.255.255.192 192.168.10.105 Router(config)#ip route 192.168.10.64 255.255.255.224 192.168.10.105 Router(config)#ip route 192.168.10.100 255.255.255.252 192.168.10.105

5. Verification

To verify network connectivity, the ping command was used:

  1. From PC0 (192.168.10.2), ping PC2 (192.168.10.66).
  2. From PC0, ping PC4 (192.168.10.98).
  3. Ensure replies are received, confirming that the static routes and VLSM implementation are functioning as expected.

Post a Comment

0 Comments