Variable Length Subnet Mask (VLSM) allows a network to be divided into subnets of different sizes, using different subnet masks for each subnet. This optimizes IP address space usage by allocating exactly the required number of addresses to each subnet, rather than forcing all subnets to be the same size (as in classful or FLSM).
Example: A /24 network (256 addresses) can be subnetted into a /26 (64 addresses) for a small LAN, a /27 (32 addresses) for another, and the remaining addresses used for pointβtoβpoint links (/30). This avoids wasting addresses.
A broadcast domain is a logical division of a network where all devices can reach each other by broadcast at the data link layer. In IP networking, a subnet (or LAN) is a broadcast domain. Routers separate broadcast domains β broadcasts are not forwarded across a router. Therefore, all devices in the same subnet reside in the same broadcast domain until they encounter a router.
We will design a small network using VLSM, document the IP plan, and prepare for implementation in a simulator like Cisco Packet Tracer.
The network consists of:
Connections:
R-CENTRAL
+-----------+-----------+
| G0/0 | G0/1 | G0/2
| | |
+----+----+ +----+----+ +----+----+
| Sw1 | | Sw2 | | Sw3 |
+----+----+ +----+----+ +----+----+
| | |
+--------+---+ +----+----+ +---+--------+
| | | | | | | | | | | |
PC1 PC2 PC3 Lap1 Lap2 Lap3 Srv1 Srv2 Srv3
This topology will be built in Packet Tracer and saved as "1 - activity.pkt".
We are given the organizational IP space: 192.168.0.0/22.
Host requirements per LAN:
We must subnet this major network into smaller subnets satisfying these requirements.
Step 1: Determine the major network boundaries.
Network address: 192.168.0.0/22 β 192.168.0.0
Broadcast address: 192.168.3.255 (because /22 gives 10 host bits, 210 = 1024 addresses, so 192.168.0.0 β 192.168.3.255).
Step 2: Sort LANs by host requirement (descending).
LAN1 (300) > LAN3 (200) > LAN2 (120). We allocate from the beginning of the range.
We need a subnet that can accommodate at least 302 addresses (300 hosts + network + broadcast). Find the smallest power of two β₯ 302: 29 = 512. So host bits = 9 β prefix = 32 β 9 = /23.
Starting from 192.168.0.0:
Subnet: 192.168.0.0/23
Network: 192.168.0.0
Broadcast: 192.168.1.255
First usable: 192.168.0.1
Last usable: 192.168.1.254
Mask: 255.255.254.0
Next available address: 192.168.1.255 + 1 = 192.168.2.0.
Need β₯ 202 addresses. 28 = 256 β host bits = 8 β prefix = /24.
Subnet: 192.168.2.0/24
Network: 192.168.2.0
Broadcast: 192.168.2.255
First usable: 192.168.2.1
Last usable: 192.168.2.254
Mask: 255.255.255.0
Next available: 192.168.2.255 + 1 = 192.168.3.0.
Need β₯ 122 addresses. 27 = 128 β host bits = 7 β prefix = /25.
Subnet: 192.168.3.0/25
Network: 192.168.3.0
Broadcast: 192.168.3.127
First usable: 192.168.3.1
Last usable: 192.168.3.126
Mask: 255.255.255.128
Step 3: Verify that we fit inside the major network.
Major network: 192.168.0.0/22 (192.168.0.0 β 192.168.3.255)
Last allocated subnet broadcast: 192.168.3.127 β€ 192.168.3.255 β OK, we fit inside the major network.
| Name | Subnet | Network Address | Broadcast Address | First Usable IP | Last Usable IP | Subnet Mask |
|---|---|---|---|---|---|---|
| LAN1 (300 H) | 192.168.0.0/23 | 192.168.0.0 | 192.168.1.255 | 192.168.0.1 | 192.168.1.254 | 255.255.254.0 |
| LAN3 (200 H) | 192.168.2.0/24 | 192.168.2.0 | 192.168.2.255 | 192.168.2.1 | 192.168.2.254 | 255.255.255.0 |
| LAN2 (120 H) | 192.168.3.0/25 | 192.168.3.0 | 192.168.3.127 | 192.168.3.1 | 192.168.3.126 | 255.255.255.128 |
This table corresponds to the file "2 - Subnetting Table.txt".
We assign IPs according to these rules:
| Device | IP Address | Subnet Mask | Default Gateway |
|---|---|---|---|
| R-CENTRAL | |||
| βG0/0 | 192.168.0.1 | 255.255.254.0 | β |
| βG0/1 | 192.168.3.1 | 255.255.255.128 | β |
| βG0/2 | 192.168.2.1 | 255.255.255.0 | β |
| Switches (no IP configuration) | |||
| SW1 | (not configured at this stage) | ||
| SW2 | (not configured at this stage) | ||
| SW3 | (not configured at this stage) | ||
| PCs (LAN1) | |||
| PC1 | 192.168.0.2 | 255.255.254.0 | 192.168.0.1 |
| PC2 | 192.168.0.3 | 255.255.254.0 | 192.168.0.1 |
| PC3 | 192.168.0.4 | 255.255.254.0 | 192.168.0.1 |
| Laptops (LAN2) | |||
| Lap1 | 192.168.3.2 | 255.255.255.128 | 192.168.3.1 |
| Lap2 | 192.168.3.3 | 255.255.255.128 | 192.168.3.1 |
| Lap3 | 192.168.3.4 | 255.255.255.128 | 192.168.3.1 |
| Servers (LAN3) | |||
| Srv1 | 192.168.2.2 | 255.255.255.0 | 192.168.2.1 |
| Srv2 | 192.168.2.3 | 255.255.255.0 | 192.168.2.1 |
| Srv3 | 192.168.2.4 | 255.255.255.0 | 192.168.2.1 |
This table corresponds to the file "3 - Addressing Table.txt".
We have successfully:
This exercise demonstrates how VLSM efficiently uses IP address space in realβworld network design.