Subnetting divides an IP network into smaller Layer 3 networks, while a virtual local area network (VLAN) logically separates devices into different Layer 2 broadcast domains. They often work together, but they operate at different layers and are not interchangeable.
How Each One Works
Subnetting divides an address range by changing the subnet mask or prefix length. For example, the network 192.168.1.0/24 can be divided into 192.168.1.0/25 and 192.168.1.128/25. Devices in different subnets require a router or Layer 3 switch to communicate.
A VLAN divides a physical switched network logically. Switch ports assigned to VLAN 10 are separated from ports assigned to VLAN 20, even when they belong to the same physical switch. Communication between VLANs requires inter-VLAN routing.
| Feature | Subnetting | VLAN |
|---|---|---|
| OSI layer | Layer 3: Network layer | Layer 2; Data link layer |
| Main basis | IP addresses and subnet masks | Switch configuration and VLAN identifiers |
| Main purpose | Organize IP address space and control routing | Logically separate broadcast traffic |
| Device commonly used | Router or Layer 3 switch | Managed switch |
| Communication across divisions | Routing between subnets | Inter-VLAN routing between VLANs |
In a well-designed network, each VLAN normally has its own subnet. For example, VLAN 10 might use 192.168.10.0/24, while VLAN 20 uses 192.168.20.0/24. The VLAN separates Ethernet frames at Layer 2; the subnet determines how IP packets are addressed and routed at Layer 3.
A common misconception is that a VLAN is simply another name for a subnet. This is incorrect: a VLAN creates logical switch separation, whereas subnetting divides IP address space.
IB Exam Technique
For A2.2 Network architecture, identify the relevant OSI layer and explain the mechanism. A strong comparison states that VLANs reduce broadcast scope through logical segmentation, while subnets support IP addressing and routing; do not merely state that both “divide a network.”