Designing a scalable enterprise network requires more than just connecting devices; it demands a structured approach to IP address management using Variable Length Subnet Masking (VLSM). This technique allows network engineers to allocate IP ranges efficiently, minimizing waste while accommodating diverse device requirements across different departments. In this guide, we will walk through a practical lab scenario using Cisco Packet Tracer to design a hierarchical campus network. We will cover the mathematical calculations required for VLSM, the configuration of VLANs and routing protocols, and the integration of essential services like DNS and DHCP. By following these steps, you will learn how to build a robust foundation that supports future growth and simplifies troubleshooting.
Understanding the Hierarchical Network Design
Before opening Packet Tracer, it is crucial to define the network topology. A hierarchical design typically consists of three layers: Access, Distribution, and Core. In our scenario, we will simulate a small-to-medium enterprise (SME) campus with the following requirements:
* Headquarters (HQ): Requires 50 hosts.
* Marketing Department: Requires 20 hosts.
* Engineering Department: Requires 15 hosts.
* Guest Wi-Fi: Requires 30 hosts.
* Server Farm: Requires 10 servers.
The total address space available is 192.168.0.0/16. To ensure efficiency, we must apply VLSM to carve out specific subnets from this large block without overlapping. The key rule of VLSM is to allocate the largest subnet first. This prevents fragmentation where a small subnet is needed before a large one, leaving no room for the larger requirement later.
Calculating VLSM Masks and Address Allocation
The mathematical foundation of our design lies in determining the correct mask for each department based on host count. We must account for network and broadcast addresses, meaning we subtract 2 from the required number of hosts to determine the necessary block size ($2^n – 2 \geq \text{Required Hosts}$).
- Headquarters (50 hosts): The smallest power of 2 greater than 52 is 64 ($2^6$). We need a
/26subnet mask (255.255.255.192).- Network:
192.168.0.0/26(Range:.0to.63)
- Network:
- Marketing (20 hosts): The smallest power of 2 greater than 22 is 32 ($2^5$). We need a
/27subnet mask (255.255.255.224).- Network:
192.168.0.64/27(Range:.64to.95)
- Network:
- Engineering (15 hosts): Similarly, we need 16 addresses ($2^4$). We use a
/28subnet mask (255.255.255.240).- Network:
192.168.0.96/28(Range:.96to.111)
- Network:
- Guest Wi-Fi (30 hosts): We need 32 addresses ($2^5$). Another
/27.- Network:
192.168.0.128/27(Range:.128to.159)
- Network:
- Server Farm (10 hosts): We need 16 addresses ($2^4$). Another
/28.- Network:
192.168.0.160/28(Range:.160to.175)
- Network:
Note: This calculation assumes a specific starting point. In a real-world scenario, you would verify the ISP’s assigned block and reserve addresses for loopback interfaces or management VLANs before beginning.
Configuring VLANs on Access Layer Switches
Once the IP plan is finalized, we move to Packet Tracer. Drag in three switches (categorized as Access layer) and connect them to PCs representing different departments. On each switch, you must create Virtual LANs (VLANs) corresponding to the calculated subnets.
Switch(config)# vlan 10
Switch(config-vlan)# name HQ
Switch(config-vlan)# exit
Switch(config)# vlan 20
Switch(config-vlan)# name Marketing
Assign specific ports to these VLANs based on the physical location of the devices. For instance, connect the HQ PCs to ports assigned to VLAN 10. Ensure that trunk links between switches allow traffic for all necessary VLANs using the command switchport mode trunk. This segmentation is vital for broadcast control and security isolation; a compromised guest network should not be able to scan internal server IPs.
Implementing Inter-VLAN Routing
To allow communication between these isolated segments, we need a Layer 3 device, such as a router or a Layer 3 switch acting as the Distribution/Core layer. We will configure Static Routing for simplicity in this lab, though OSPF is preferred in larger environments. On the router, create SVI (Switched Virtual Interface) interfaces for each VLAN:
Router(config)# interface GigabitEthernet0/1
Router(config-if)# no ip address
Router(config-if)# switchport access vlan 10
!
Router(config)# interface Vlan10
Router(config-if)# ip address 192.168.0.1 255.255.255.192
Router(config-if)# no shutdown
Repeat this process for VLANs 20, 30, etc., using the IP addresses calculated in the VLSM section. Finally, enable routing between these interfaces. If using a Layer 3 switch, ensure the ip routing global command is active. Verify connectivity by pinging from a Marketing PC to an HQ server; if successful, you will see a reply rather than “Destination Host Unreachable.”
Integrating DHCP and DNS Services
Hardcoding IP addresses on every device is error-prone and does not scale. We must implement the Dynamic Host Configuration Protocol (DHCP). In Packet Tracer, you can use the built-in DHCP server feature or configure a dedicated router interface as a helper.
Configure the DHCP pool for the HQ VLAN:
Router(config)# dhcpd pool HQ-Pool
Router(dhcp-config)# network 192.168.0.0 255.255.255.192
Router(dhcp-config)# default-router 192.168.0.1
Router(dhcp-config)# dns-server 8.8.8.8
The default-router command assigns the gateway (the SVI IP), and the dns-server command provides name resolution capabilities. Without DNS, users cannot access websites by name; they would be forced to use IP addresses. Test this by releasing and renewing an IP on a PC (ipconfig /release, ipconfig /renew) and checking if the hostname resolves correctly via nslookup.
Troubleshooting and Verification Steps
Even with perfect calculations, configuration errors occur. Common issues include VLAN mismatches, incorrect subnet masks causing “ping failure,” or overlapping subnets leading to routing loops. To troubleshoot:
1. Check Interface Status: Use show ip interface brief on the router to ensure interfaces are up/up and have valid IP addresses.
2. Verify Routing Table: Execute show ip route to confirm that routes for all VLAN subnets exist in the routing table. If a route is missing, static entries or dynamic protocol adjacencies must be checked.
3. Inspect ARP Tables: Run show arp on the gateway to ensure the router knows the MAC addresses of hosts in each subnet.
4. Test Connectivity: Use ping and traceroute from different segments. If a ping fails but an IP is assigned, check ACLs (Access Control Lists) or firewall rules blocking ICMP traffic.
Common Mistakes and Best Practices
Students often make specific errors during this challenge. One frequent mistake is forgetting to subtract 2 hosts for the network and broadcast addresses, leading to “too many hosts” errors when applying masks. Another error is assigning the same VLAN ID to access ports on different switches without configuring trunks correctly, which isolates segments unintentionally.
Additionally, ensure that you do not overlap subnets. For example, if you assign 192.168.0.0/24 to HQ and then try to use 192.168.0.10/30 for a small device group inside that range without proper VLSM planning, routing will fail because the router sees two definitions for overlapping address spaces. Always document your IP plan before starting the lab.
Conclusion and Student Practice Task
Designing a hierarchical network with VLSM is a critical skill for any IT professional. It combines mathematical precision with practical configuration skills. By following the steps above, you have calculated masks, segmented networks with VLANs, routed traffic between segments, and automated IP management with DHCP.
Student Practice Task:
1. Open Cisco Packet Tracer and place one router, two switches, and six PCs.
2. Draw the topology connecting PCs to Switch A and B, and both switches to the Router.
3. Calculate VLSM for three departments using the 10.0.0.0/8 address space (start with a /24 block).
4. Configure VLANs on the switches and SVIs on the router.
5. Enable DHCP and verify that PCs receive IPs automatically.
6. Attempt to ping across departments. If it fails, use the troubleshooting steps listed above to identify the misconfiguration.
This exercise prepares you for real-world scenarios where network efficiency and security are paramount. Remember that while Packet Tracer simplifies some aspects, the underlying principles of VLSM and hierarchy apply universally across all networking platforms.
Educational-use notice: This tutorial is for learning and controlled lab use only. Test carefully, use backups, and obtain authorization before making changes. Do not run unfamiliar commands on production systems. We accept no responsibility for misuse, damage, data loss, or production issues.

