top of page

VLANs vs. Subnetting: Enhancing Security through Network Segmentation

Writer: Mike SantosMike Santos

Updated: Oct 26, 2024

Introduction

In network security, segmentation is a fundamental strategy to control data flow and isolate sensitive information, protecting against potential threats. Two core techniques for segmenting a network are Virtual Local Area Networks (VLANs) and Subnetting. Both play a significant role in managing network traffic and enhancing security, making them essential concepts for anyone involved in network management or cybersecurity.


In this article, we'll break down what VLANs and Subnets are, explore their differences, and look at how they work together to bolster network security. We’ll also discuss practical use cases and analogies that make these concepts easier to understand.


Understanding VLANs: Dividing Networks Virtually

Virtual Local Area Networks (VLANs) allow network administrators to partition a single physical network into multiple isolated segments, each functioning as if it were an independent network. Think of a VLAN as a “network within a network,” where devices in one VLAN cannot directly communicate with those in another, unless explicitly allowed.


How VLANs Work:

VLANs are implemented at the data link layer (Layer 2) of the OSI model and use switches to segment the network. Each VLAN is assigned an ID, making it unique within a switch. Devices in the same VLAN can communicate directly, while communication between different VLANs requires routing.


Benefits of VLANs:

  • Enhanced Security: VLANs restrict traffic within segments, preventing unauthorized access and reducing the risk of attacks spreading across the network.

  • Improved Traffic Management: By isolating traffic, VLANs reduce network congestion and improve performance.

  • Simplified Network Design: VLANs allow logical grouping of devices based on function or department (e.g., HR, Sales), making network management more flexible.


Example and Use Case:

Consider an organization with three departments: Finance, Sales, and HR. Without VLANs, all devices share the same network, exposing sensitive data to potential eavesdropping. By creating separate VLANs for each department, the organization can isolate traffic, ensuring that Finance data stays secure and inaccessible to Sales and HR, which reduces both data leakage risks and congestion.

Analogy: Think of a VLAN as a room in an office building. Only employees with a key can enter a particular room (or VLAN), and each department has its room, protecting sensitive data and minimizing disturbances.


Understanding Subnetting: Dividing Networks Logically

Subnetting divides a large IP network into smaller, manageable segments called subnets. Each subnet has its unique range of IP addresses, allowing network traffic to be isolated and organized by function, location, or size. Subnetting operates at the network layer (Layer 3) of the OSI model.


How Subnetting Works:

Subnetting involves modifying an IP address’s subnet mask to create smaller groups of addresses. It enables logical grouping based on IP ranges, allowing traffic within a subnet to stay local and improving overall network efficiency and security.


Benefits of Subnetting:

  • Improved Security: Subnets prevent unrestricted data flow across an entire network, minimizing the spread of security breaches.

  • Efficient IP Address Allocation: Subnetting reduces waste by assigning specific IP ranges to different departments or locations.

  • Enhanced Performance: Smaller network segments result in reduced congestion, as data packets don’t need to traverse the entire network.


Example and Use Case:

Going back to our previous sample image for VLANs, the Finance Department operates across multiple teams—each with different needs, including employees' PCs, servers, printers, and mobile devices. By subnetting the Finance department’s VLAN (192.168.20.0/24), the IT administrator can allocate specific IP ranges to each group, ensuring that local traffic stays organized and controlled.


  • The Finance team’s employee PCs can be placed in Subnet A (192.168.20.0/26), allowing them to communicate within their range without overwhelming the network.

  • Critical servers are assigned to Subnet B (192.168.20.64/27), ensuring that sensitive data is isolated from the rest of the network.

  • Printers and mobile devices are placed in smaller subnets, Subnet C and Subnet D, to optimize their use while limiting unnecessary broadcast traffic.

By subnetting within the Finance VLAN, the administrator can secure and organize network traffic, improving both performance and security. For example, employees' personal devices (smartphones or laptops) might connect via a different subnet (mobile devices), ensuring that they have restricted access compared to servers or core infrastructure. This segmentation reduces congestion, enhances security, and provides granular control over who can access what within the same department.


Analogy: Think of subnetting as assigning different zip codes to different neighborhoods within the Finance Department. Each group—whether employees, servers, or devices—gets its own “neighborhood” (subnet) with specific rules and boundaries, ensuring that communication stays local and doesn’t overwhelm the broader network.


Finance Department Subnet Ranges

1. Department PCs:
  • Subnet Range: 192.168.20.0/26 (Subnet mask: 255.255.255.192)

  • IP Range: 192.168.20.1 - 192.168.20.62

  • Usable Addresses: 62 IPs

  • Purpose: This subnet is large enough to accommodate a reasonable number of PCs.


2. Department Servers:
  • Subnet Range: 192.168.20.64/27 (Subnet mask: 255.255.255.224)

  • IP Range: 192.168.20.65 - 192.168.20.94

  • Usable Addresses: 30 IPs

  • Purpose: Typically, the server subnet needs fewer IPs but should be isolated from client devices for security.


3. Department Printers:
  • Subnet Range: 192.168.20.96/28 (Subnet mask: 255.255.255.240)

  • IP Range: 192.168.20.97 - 192.168.20.110

  • Usable Addresses: 14 IPs

  • Purpose: A smaller range, suitable for a few networked printers.


4. Mobile Devices:
  • Subnet Range: 192.168.20.112/28 (Subnet mask: 255.255.255.240)

  • IP Range: 192.168.20.113 - 192.168.20.126

  • Usable Addresses: 14 IPs

  • Purpose: Enough for a limited number of mobile devices like laptops, smartphones, or tablets.


Subnetting IP Ranges: Static vs. DHCP Assignment

When managing a network with VLANs and Subnets, it's essential to determine how IP addresses will be assigned to devices—either dynamically (via DHCP) or statically. Generally, the choice between DHCP and static IP assignment depends on the type of device and its role in the network.

Here’s how we can apply this to the subnetting ranges allocated in the Finance department (VLAN2: 192.168.20.0/24):


1. Employee PCs: 192.168.20.0/26 (DHCP Assigned)
  • IP Range: 192.168.20.1 - 192.168.20.62

  • Method: DHCP Assigned

Rationale:

  • PCs are end-user devices, and the number of devices can fluctuate as users log on and off the network or new devices are introduced. Dynamic IP assignment via DHCP simplifies network management by automatically assigning and releasing IP addresses as needed.

  • By configuring a DHCP server to manage the 192.168.20.10 - 192.168.20.62 range, the process of connecting devices is streamlined, reducing manual intervention.


2. Servers: 192.168.20.64/27 (Statically Assigned)
  • IP Range: 192.168.20.65 - 192.168.20.94

  • Method: Static IP Assignment

Rationale:

  • Servers host critical services (file storage, databases, etc.), and it’s crucial for them to maintain a consistent IP address. Static IP addresses ensure that services relying on specific IPs (like DNS, web servers, or database servers) do not experience disruptions.

  • These static addresses can be manually assigned to specific servers, such as:

    • Finance File Server: 192.168.20.65

    • Finance Database Server: 192.168.20.66

    • Finance Application Server: 192.168.20.67

Having static IPs for servers ensures predictable communication within the network and with external systems.


3. Printers: 192.168.20.96/28 (Statically Assigned)
  • IP Range: 192.168.20.97 - 192.168.20.110

  • Method: Static IP Assignment

Rationale:

  • Printers, like servers, benefit from static IP addresses. Devices across the network (including PCs and mobile devices) need to reliably communicate with printers. If the printer’s IP changes, users may experience connection issues.

  • Assigning static IPs also simplifies printer configuration for end-users and administrators by ensuring that networked printers always have a consistent IP.


4. Mobile Devices: 192.168.20.112/28 (DHCP Assigned)
  • IP Range: 192.168.20.113 - 192.168.20.126

  • Method: DHCP Assigned

Rationale:

  • Mobile devices (laptops, tablets, smartphones) often connect and disconnect from the network frequently, making DHCP ideal for these devices. As with PCs, DHCP simplifies network management by automatically assigning IP addresses as devices connect to the network.

  • This DHCP pool can dynamically assign IPs to any mobile devices used by Finance department employees, ensuring that addresses are efficiently reused when devices disconnect.


Conclusion

VLANs and Subnetting’s Relevance to Network & Systems Security

VLANs and subnetting are essential for enhancing both network performance and security. By segmenting a network, VLANs isolate traffic within departments or teams, reducing the attack surface and preventing unauthorized access between different parts of the organization. Subnetting further refines this segmentation by creating smaller, more manageable IP address groups within a VLAN, providing more granular control over data flow and network access.

Security Benefits:

  • Traffic Isolation: VLANs and subnets ensure that traffic stays within the appropriate group or department, reducing the likelihood of unauthorized access.

  • Enhanced Control: Static IPs for critical devices (servers, printers) ensure consistent, reliable communication, while DHCP allows for dynamic assignment to flexible devices (PCs, mobile devices), maintaining balance between management and stability.

  • Minimized Attack Surface: By isolating segments of the network and limiting inter-VLAN communication, you significantly reduce the risk of attackers accessing sensitive data across different departments.


Together, VLANs and subnetting provide the foundation for a secure, scalable, and efficient network architecture, ensuring that your organization’s systems remain resilient against internal and external threats.

 
 
 

Comments


Abstract Background

CONTACT ME

If you would like to get in touch, please email me or send a message below.

Thank You for Reaching Out!

“Without effort, your talent is nothing more than unmet potential. Without effort, your skill is nothing more than what you could have done but didn't.”

IG Logo copy.jpg

© 2024 by Mike Santos

bottom of page