Advanced Network Architecture and Security Integration
Advanced Segmentation Implementation
The Art of Efficient Subnetting
You already know how to carve a large IP address block into smaller, equal-sized pieces. But in the real world, networks rarely have uniform needs. Your user department might need 500 addresses, the server farm might need 60, and the point-to-point links connecting your core routers only need two each. Using a single subnet size for all these is incredibly wasteful.
This is where comes in. VLSM is a strategy, not a different technology. It's the practice of subnetting a subnet, allowing you to create network segments of different sizes from a single parent block. This maximizes address efficiency, tailoring each subnet to its specific requirement.
The core principle of VLSM is simple: start with your largest requirement and work your way down to the smallest. This prevents you from allocating a small block in the middle of a range you'll later need for a larger subnet.
Let's plan an IP scheme for a small office with the network block 192.168.10.0/24. The requirements are:
- Engineering: 100 hosts
- Sales: 50 hosts
- Management: 20 hosts
- Router Links: Two links, each needing 2 hosts
To accommodate 100 hosts, we need 7 host bits (), which means a /25 mask. For 50 hosts, we need 6 host bits (), a /26 mask. For 20 hosts, we need 5 host bits (), a /27 mask. Finally, for point-to-point links, we need 2 host bits (, leaving 2 usable IPs), which is a /30 mask.
| Department | Hosts Needed | Hosts Available | Network Address | Mask | Prefix |
|---|---|---|---|---|---|
| Engineering | 100 | 126 | 192.168.10.0 | 255.255.255.128 | /25 |
| Sales | 50 | 62 | 192.168.10.128 | 255.255.255.192 | /26 |
| Management | 20 | 30 | 192.168.10.192 | 255.255.255.224 | /27 |
| Router Link 1 | 2 | 2 | 192.168.10.224 | 255.255.255.252 | /30 |
| Router Link 2 | 2 | 2 | 192.168.10.228 | 255.255.255.252 | /30 |
Notice how we allocated the blocks sequentially without any overlap. We met every requirement while using the address space far more efficiently than if we had used a single /25 mask for every department.
Mapping Subnets to VLANs
Now that we have our logical subnet plan, we need to implement it on the network hardware. This is done using Virtual LANs, or VLANs. The universally accepted best practice is to maintain a one-to-one mapping between a subnet and a VLAN. Engineering gets its own VLAN and its own subnet. Sales gets its own VLAN and subnet. This keeps things clean, secure, and manageable.
This segmentation happens within a hierarchical network design. End-user devices like laptops and printers connect to access layer switches. These switches connect upstream to distribution layer switches, which aggregate traffic and handle routing between the different segments.
For VLANs to span multiple switches, the links between them must be configured as trunks. A trunk link carries traffic for multiple VLANs simultaneously. To keep track of which frame belongs to which VLAN, the standard adds a small tag to the Ethernet frame. This tag contains the VLAN ID.
One VLAN on a trunk is special: the native VLAN. Traffic on the native VLAN is the only traffic that travels untagged across the trunk. This creates a potential security risk. An attacker could send specially crafted, double-tagged frames to hop from their own VLAN to another, bypassing security controls. For this reason, it's a best practice to change the native VLAN from the default (VLAN 1) to an unused VLAN, and to not assign any user devices to it.
Routing Between VLANs
By design, devices in different VLANs cannot communicate with each other. They are in separate broadcast domains. To allow communication—say, for a user in the Sales VLAN to access a server in the Engineering VLAN—you need a Layer 3 device, a router, to forward traffic between them.
There are two primary methods for this: Router-on-a-Stick (ROAS) and Switch Virtual Interfaces (SVIs).
Router-on-a-Stick
noun
A configuration where a single physical interface on a router connects to a switch trunk port. The router uses logical sub-interfaces, one for each VLAN, to route traffic between them.
ROAS works well for smaller networks but has limitations. All inter-VLAN traffic has to travel up to the router and back down again, which can create a bottleneck at the single physical link. Here's a glimpse of the router configuration:
interface GigabitEthernet0/1.10
description Gateway for Sales VLAN
encapsulation dot1Q 10
ip address 192.168.10.129 255.255.255.192
!
interface GigabitEthernet0/1.20
description Gateway for Engineering VLAN
encapsulation dot1Q 20
ip address 192.168.10.1 255.255.255.128
A more modern and scalable approach is using on a multilayer (Layer 3) switch. An SVI is a virtual Layer 3 interface created for a specific VLAN on that switch. The switch can route traffic between its configured SVIs at hardware speed, which is much faster than sending it to an external router.
Each SVI acts as the default gateway for the devices in its corresponding VLAN and subnet.
# Enable IP routing globally on the switch
ip routing
# SVI for Sales VLAN
interface Vlan10
ip address 192.168.10.129 255.255.255.192
no shutdown
# SVI for Engineering VLAN
interface Vlan20
ip address 192.168.10.1 255.255.255.128
no shutdown
The main trade-off is cost and complexity. Layer 3 switches are more expensive than Layer 2 switches, and configuring routing adds another layer of management. However, for any network of significant size, the performance benefits of SVIs far outweigh the costs of a ROAS bottleneck.
Let's test your understanding of these concepts.
A network administrator is given the address block 10.10.0.0/16 and needs to create a subnet for a department that requires 500 host IP addresses. What is the most efficient subnet mask to use for this department?
What is the universally accepted best practice when organizing network segments?
Properly designing a segmented network is a balancing act. It improves performance by shrinking broadcast domains and enhances security by isolating traffic. But it also introduces complexity in routing and management. By mastering VLSM and the interplay between VLANs, trunks, and Layer 3 gateways, you can build networks that are efficient, scalable, and secure.