Configuring Network Segmentation with VLANs
When to Use
- Segmenting an enterprise network into isolated security zones (corporate, servers, DMZ, guest, IoT)
- Meeting compliance requirements (PCI-DSS, HIPAA, SOC 2) that mandate network isolation for sensitive data
- Reducing blast radius of security incidents by preventing lateral movement between network segments
- Isolating high-risk devices (IoT, BYOD, legacy systems) from critical infrastructure
- Implementing defense-in-depth by combining VLANs with firewall rules and access control lists
Do not use VLANs as the sole security control without Layer 3 filtering, for isolating networks that require air-gapping, or without proper switch hardening against VLAN hopping attacks.
Prerequisites
- Managed switches supporting 802.1Q VLAN trunking (Cisco Catalyst, HP Aruba, Juniper EX, etc.)
- Layer 3 switch or firewall for inter-VLAN routing and access control
- Network design document specifying VLAN assignments, IP subnets, and traffic flow requirements
- Console or SSH access to switches with privileged configuration mode
- Understanding of 802.1Q trunking, STP, and inter-VLAN routing concepts
Workflow
Step 1: Design the VLAN Architecture
# Define VLANs based on security zones and function
VLAN Plan:
VLAN 10 - CORPORATE (10.10.10.0/24) - Employee workstations
VLAN 20 - SERVERS (10.10.20.0/24) - Internal servers
VLAN 30 - DMZ (10.10.30.0/24) - Internet-facing servers
VLAN 40 - GUEST (10.10.40.0/24) - Guest WiFi
VLAN 50 - IOT (10.10.50.0/24) - IoT/OT devices
VLAN 60 - VOIP (10.10.60.0/24) - VoIP phones
VLAN 100 - MANAGEMENT (10.10.100.0/24) - Switch/AP management
VLAN 999 - QUARANTINE (10.10.99.0/24) - Isolated/compromised hosts
VLAN 998 - NATIVE_UNUSED - Native VLAN (no traffic)
# Traffic flow matrix:
# CORPORATE -> SERVERS: Allowed (specific ports)
# CORPORATE -> DMZ: Allowed (HTTP/HTTPS only)
# CORPORATE -> GUEST: Denied
# CORPORATE -> IOT: Denied
# GUEST -> Any Internal: Denied
# IOT -> SERVERS: Allowed (specific ports to specific hosts only)
# DMZ -> SERVERS: Allowed (database ports only)
# MANAGEMENT -> All: Allowed (from management stations only)
Step 2: Configure VLANs on Cisco Catalyst Switch
! Enter configuration mode
enable
configure terminal
! Create VLANs
vlan 10
name CORPORATE
exit
vlan 20
name SERVERS
exit
vlan 30
name DMZ
exit
vlan 40
name GUEST
exit
vlan 50
name IOT
exit
vlan 60
name VOIP
exit
vlan 100
name MANAGEMENT
exit
vlan 998
name NATIVE_UNUSED
exit
vlan 999
name QUARANTINE
exit
! Configure access ports for workstations (VLAN 10)
interface range GigabitEthernet1/0/1-24
switchport mode access
switchport access vlan 10
switchport nonegotiate
spanning-tree portfast
spanning-tree bpduguard enable
no shutdown
exit
! Configure access ports for servers (VLAN 20)
interface range GigabitEthernet1/0/25-36
switchport mode access
switchport access vlan 20
switchport nonegotiate
spanning-tree portfast
spanning-tree bpduguard enable
no shutdown
exit
! Configure trunk ports to other switches
interface GigabitEthernet1/0/48
switchport mode trunk
switchport trunk encapsulation dot1q
switchport trunk native vlan 998
switchport trunk allowed vlan 10,20,30,40,50,60,100
switchport nonegotiate
no shutdown
exit
! Configure trunk to firewall/router
interface GigabitEthernet1/0/47
switchport mode trunk
switchport trunk encapsulation dot1q
switchport trunk native vlan 998
switchport trunk allowed vlan 10,20,30,40,50,60,100
switchport nonegotiate
no shutdown
exit
! Shutdown unused ports
interface range GigabitEthernet1/0/37-46
shutdown
switchport mode access
switchport access vlan 999
exit
Step 3: Harden Switch Against VLAN Hopping
! Disable DTP on all ports (prevents switch spoofing)
interface range GigabitEthernet1/0/1-46
switchport nonegotiate
exit
! Set native VLAN to unused VLAN on all trunks
interface range GigabitEthernet1/0/47-48
switchport trunk native vlan 998
exit
! Enable DHCP Snooping
ip dhcp snooping
ip dhcp snooping vlan 10,20,30,40,50,60
interface GigabitEthernet1/0/47
ip dhcp snooping trust
exit
! Enable Dynamic ARP Inspection
ip arp inspection vlan 10,20,30,40,50,60
interface GigabitEthernet1/0/47
ip arp inspection trust
exit
! Enable IP Source Guard (prevents IP spoofing)
interface range GigabitEthernet1/0/1-36
ip verify source
exit
! Enable Port Security
interface range GigabitEthernet1/0/1-24
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
switchport port-security aging time 60
exit
! Set VTP to transparent mode (prevents VTP attacks)
vtp mode transparent
! Enable BPDU Guard globally
spanning-tree portfast bpduguard default
! Enable Storm Control
interface range GigabitEthernet1/0/1-36
storm-control broadcast level 10
storm-control multicast level 10
storm-control action shutdown
exit
Step 4: Configure Inter-VLAN Routing with ACLs
! On the Layer 3 switch or firewall, configure SVIs
interface Vlan10
ip address 10.10.10.1 255.255.255.0
no shutdown
exit
interface Vlan20
ip address 10.10.20.1 255.255.255.0
no shutdown
exit
interface Vlan30
ip address 10.10.30.1 255.255.255.0
no shutdown
exit
interface Vlan40
ip address 10.10.40.1 255.255.255.0
no shutdown
exit
interface Vlan50
ip address 10.10.50.1 255.255.255.0
no shutdown
exit
! ACL: Corporate to Servers (allow specific services)
ip access-list extended CORP-TO-SERVERS
permit tcp 10.10.10.0 0.0.0.255 10.10.20.0 0.0.0.255 eq 80
permit tcp 10.10.10.0 0.0.0.255 10.10.20.0 0.0.0.255 eq 443
permit tcp 10.10.10.0 0.0.0.255 10.10.20.0 0.0.0.255 eq 445
permit udp 10.10.10.0 0.0.0.255 10.10.20.0 0.0.0.255 eq 53
permit icmp 10.10.10.0 0.0.0.255 10.10.20.0 0.0.0.255 echo
deny ip any any log
exit
! ACL: Guest to Internet only (deny all internal)
ip access-list extended GUEST-OUTBOUND
deny ip 10.10.40.0 0.0.0.255 10.0.0.0 0.255.255.255
deny ip 10.10.40.0 0.0.0.255 172.16.0.0 0.15.255.255
deny ip 10.10.40.0 0.0.0.255 192.168.0.0 0.0.255.255
permit tcp 10.10.40.0 0.0.0.255 any eq 80
permit tcp 10.10.40.0 0.0.0.255 any eq 443
permit udp 10.10.40.0 0.0.0.255 any eq 53
deny ip any any log
exit
! ACL: IoT limited access
ip access-list extended IOT-OUTBOUND
permit tcp 10.10.50.0 0.0.0.255 host 10.10.20.10 eq 443
permit tcp 10.10.50.0 0.0.0.255 any eq 443
permit udp 10.10.50.0 0.0.0.255 host 10.10.20.1 eq 53
deny ip 10.10.50.0 0.0.0.255 10.10.50.0 0.0.0.255 log
deny ip any any log
exit
! Apply ACLs to VLAN interfaces
interface Vlan10
ip access-group CORP-TO-SERVERS out
exit
interface Vlan40
ip access-group GUEST-OUTBOUND in
exit
interface Vlan50
ip access-group IOT-OUTBOUND in
exit
Step 5: Configure DHCP and DNS per VLAN
! DHCP pools for each VLAN
ip dhcp pool CORPORATE
network 10.10.10.0 255.255.255.0
default-router 10.10.10.1
dns-server 10.10.20.10
domain-name corp.example.com
lease 1
exit
ip dhcp pool GUEST
network 10.10.40.0 255.255.255.0
default-router 10.10.40.1
dns-server 1.1.1.1 8.8.8.8
lease 0 4
exit
ip dhcp pool IOT
network 10.10.50.0 255.255.255.0
default-router 10.10.50.1
dns-server 10.10.20.10
lease 7
exit
! Exclude gateway and server IPs from DHCP pools
ip dhcp excluded-address 10.10.10.1 10.10.10.10
ip dhcp excluded-address 10.10.40.1 10.10.40.10
ip dhcp excluded-address 10.10.50.1 10.10.50.10
Step 6: Verify and Test Segmentation
# From a workstation on VLAN 10 (Corporate):
# Should succeed:
ping 10.10.20.10 # Server access
curl https://10.10.20.10 # HTTPS to server
# Should fail:
ping 10.10.40.100 # Guest VLAN - should be blocked
ping 10.10.50.100 # IoT VLAN - should be blocked
# From a device on VLAN 40 (Guest):
# Should succeed:
ping 8.8.8.8 # Internet access
curl https://www.google.com
# Should fail:
ping 10.10.10.1 # Corporate gateway - blocked
ping 10.10.20.10 # Server - blocked
# Verify switch configuration
show vlan brief
show interfaces trunk
show ip arp inspection statistics
show ip dhcp snooping binding
show port-security
show ip access-lists
# Run VLAN hopping tests (from authorized pentest)
# These should all fail if hardening is correct:
# 1. DTP negotiation - should fail (nonegotiate)
# 2. Double tagging - should fail (native VLAN 998)
# 3. ARP spoofing - should fail (DAI enabled)
Key Concepts
| Term |
Definition |
| VLAN (Virtual LAN) |
Logical network partition at Layer 2 that groups switch ports into isolated broadcast domains, regardless of physical location |
| 802.1Q Trunking |
IEEE standard for VLAN tagging that adds a 4-byte header to Ethernet frames, identifying which VLAN a frame belongs to across trunk links |
| Inter-VLAN Routing |
Layer 3 forwarding of traffic between VLANs using a router, Layer 3 switch, or firewall with access control lists |
| Native VLAN |
VLAN assigned to untagged frames on trunk ports; should be set to an unused VLAN to prevent VLAN hopping attacks |
| DHCP Snooping |
Switch feature that validates DHCP messages and builds a binding table of IP-MAC-port mappings, preventing rogue DHCP servers |
| Port Security |
Switch feature that limits the number of MAC addresses per port and takes action (shutdown, restrict) when violated |
Tools & Systems
- Cisco Catalyst/Nexus: Enterprise managed switches with comprehensive VLAN, trunking, and security feature support
- HP Aruba CX: Enterprise switches with REST API management and VLAN segmentation capabilities
- pfSense/OPNsense: Open-source firewalls for inter-VLAN routing with stateful access control
- NetBox: Open-source IPAM and DCIM tool for documenting VLAN assignments, IP addressing, and network topology
- Nmap: Network scanner for verifying segmentation effectiveness by testing reachability across VLAN boundaries
Common Scenarios
Scenario: Implementing PCI-DSS Compliant Network Segmentation for Retail
Context: A retail chain must isolate their payment card processing systems from the general corporate network to meet PCI-DSS requirements. The current flat network has point-of-sale terminals, employee workstations, inventory servers, and guest WiFi on a single VLAN. The environment uses Cisco Catalyst 9300 switches.
Approach:
- Design VLAN architecture: POS terminals on VLAN 50 (CDE), corporate on VLAN 10, servers on VLAN 20, guest on VLAN 40
- Create VLANs on all access-layer switches and configure access ports by function
- Configure trunk links between switches with explicit VLAN allowed lists (no "all" trunks)
- Set native VLAN to 998 (unused) on all trunks and disable DTP on every port
- Configure ACLs on the Layer 3 switch: CDE VLAN can only reach the payment processor's IP on port 443; no other inter-VLAN traffic to/from CDE
- Enable DHCP snooping, DAI, and port security on all access ports
- Verify segmentation with penetration testing from each VLAN, confirming CDE is fully isolated
Pitfalls:
- Leaving DTP enabled on access ports, allowing VLAN hopping to reach the CDE
- Using VLAN 1 as the native VLAN, enabling double-tagging attacks
- Not restricting trunk allowed VLANs, carrying all VLANs including CDE to non-essential switches
- Creating ACLs that allow "any" source to reach CDE servers instead of specific POS terminal IPs
Output Format
## Network Segmentation Implementation Report
**Network**: Retail Store #42
**Switch Platform**: Cisco Catalyst 9300
**VLANs Configured**: 8
### VLAN Summary
| VLAN ID | Name | Subnet | Ports | Purpose |
|---------|------|--------|-------|---------|
| 10 | CORPORATE | 10.10.10.0/24 | Gi1/0/1-24 | Employee workstations |
| 20 | SERVERS | 10.10.20.0/24 | Gi1/0/25-36 | Internal servers |
| 30 | DMZ | 10.10.30.0/24 | Gi2/0/1-4 | Internet-facing |
| 40 | GUEST | 10.10.40.0/24 | WiFi AP trunk | Guest WiFi |
| 50 | CDE | 10.10.50.0/24 | Gi2/0/5-12 | POS terminals |
| 100 | MGMT | 10.10.100.0/24 | Gi1/0/48 | Switch management |
| 998 | NATIVE | N/A | Trunks only | Unused native |
| 999 | QUARANTINE | 10.10.99.0/24 | Unused ports | Isolation |
### Security Hardening Status
| Control | Status |
|---------|--------|
| DTP Disabled (nonegotiate) | All ports |
| Native VLAN (998) | All trunks |
| DHCP Snooping | VLANs 10,20,40,50 |
| Dynamic ARP Inspection | VLANs 10,20,40,50 |
| Port Security | Access ports |
| BPDU Guard | Access ports |
| Unused Ports Shutdown | 10 ports in VLAN 999 |
| VTP Transparent Mode | Enabled |
1---2name: configuring-network-segmentation-with-vlans3description: >4 Designs and implements VLAN-based network segmentation on managed switches to isolate5 network zones, enforce access control between segments, and reduce the attack surface6 by limiting lateral movement paths in enterprise network environments.7domain: cybersecurity8subdomain: network-security9tags: [network-security, vlan, network-segmentation, switch-security, 802.1q]10version: "1.0"11author: mahipal12license: MIT13metadata:14 source: https://skillmd.com/skills/njones17/configuring-network-segmentation-with-vlans15---1617# Configuring Network Segmentation with VLANs1819## When to Use2021- Segmenting an enterprise network into isolated security zones (corporate, servers, DMZ, guest, IoT)22- Meeting compliance requirements (PCI-DSS, HIPAA, SOC 2) that mandate network isolation for sensitive data23- Reducing blast radius of security incidents by preventing lateral movement between network segments24- Isolating high-risk devices (IoT, BYOD, legacy systems) from critical infrastructure25- Implementing defense-in-depth by combining VLANs with firewall rules and access control lists2627**Do not use** VLANs as the sole security control without Layer 3 filtering, for isolating networks that require air-gapping, or without proper switch hardening against VLAN hopping attacks.2829## Prerequisites3031- Managed switches supporting 802.1Q VLAN trunking (Cisco Catalyst, HP Aruba, Juniper EX, etc.)32- Layer 3 switch or firewall for inter-VLAN routing and access control33- Network design document specifying VLAN assignments, IP subnets, and traffic flow requirements34- Console or SSH access to switches with privileged configuration mode35- Understanding of 802.1Q trunking, STP, and inter-VLAN routing concepts3637## Workflow3839### Step 1: Design the VLAN Architecture4041```42# Define VLANs based on security zones and function4344VLAN Plan:45 VLAN 10 - CORPORATE (10.10.10.0/24) - Employee workstations46 VLAN 20 - SERVERS (10.10.20.0/24) - Internal servers47 VLAN 30 - DMZ (10.10.30.0/24) - Internet-facing servers48 VLAN 40 - GUEST (10.10.40.0/24) - Guest WiFi49 VLAN 50 - IOT (10.10.50.0/24) - IoT/OT devices50 VLAN 60 - VOIP (10.10.60.0/24) - VoIP phones51 VLAN 100 - MANAGEMENT (10.10.100.0/24) - Switch/AP management52 VLAN 999 - QUARANTINE (10.10.99.0/24) - Isolated/compromised hosts53 VLAN 998 - NATIVE_UNUSED - Native VLAN (no traffic)5455# Traffic flow matrix:56# CORPORATE -> SERVERS: Allowed (specific ports)57# CORPORATE -> DMZ: Allowed (HTTP/HTTPS only)58# CORPORATE -> GUEST: Denied59# CORPORATE -> IOT: Denied60# GUEST -> Any Internal: Denied61# IOT -> SERVERS: Allowed (specific ports to specific hosts only)62# DMZ -> SERVERS: Allowed (database ports only)63# MANAGEMENT -> All: Allowed (from management stations only)64```6566### Step 2: Configure VLANs on Cisco Catalyst Switch6768```69! Enter configuration mode70enable71configure terminal7273! Create VLANs74vlan 1075 name CORPORATE76 exit77vlan 2078 name SERVERS79 exit80vlan 3081 name DMZ82 exit83vlan 4084 name GUEST85 exit86vlan 5087 name IOT88 exit89vlan 6090 name VOIP91 exit92vlan 10093 name MANAGEMENT94 exit95vlan 99896 name NATIVE_UNUSED97 exit98vlan 99999 name QUARANTINE100 exit101102! Configure access ports for workstations (VLAN 10)103interface range GigabitEthernet1/0/1-24104 switchport mode access105 switchport access vlan 10106 switchport nonegotiate107 spanning-tree portfast108 spanning-tree bpduguard enable109 no shutdown110 exit111112! Configure access ports for servers (VLAN 20)113interface range GigabitEthernet1/0/25-36114 switchport mode access115 switchport access vlan 20116 switchport nonegotiate117 spanning-tree portfast118 spanning-tree bpduguard enable119 no shutdown120 exit121122! Configure trunk ports to other switches123interface GigabitEthernet1/0/48124 switchport mode trunk125 switchport trunk encapsulation dot1q126 switchport trunk native vlan 998127 switchport trunk allowed vlan 10,20,30,40,50,60,100128 switchport nonegotiate129 no shutdown130 exit131132! Configure trunk to firewall/router133interface GigabitEthernet1/0/47134 switchport mode trunk135 switchport trunk encapsulation dot1q136 switchport trunk native vlan 998137 switchport trunk allowed vlan 10,20,30,40,50,60,100138 switchport nonegotiate139 no shutdown140 exit141142! Shutdown unused ports143interface range GigabitEthernet1/0/37-46144 shutdown145 switchport mode access146 switchport access vlan 999147 exit148```149150### Step 3: Harden Switch Against VLAN Hopping151152```153! Disable DTP on all ports (prevents switch spoofing)154interface range GigabitEthernet1/0/1-46155 switchport nonegotiate156 exit157158! Set native VLAN to unused VLAN on all trunks159interface range GigabitEthernet1/0/47-48160 switchport trunk native vlan 998161 exit162163! Enable DHCP Snooping164ip dhcp snooping165ip dhcp snooping vlan 10,20,30,40,50,60166interface GigabitEthernet1/0/47167 ip dhcp snooping trust168 exit169170! Enable Dynamic ARP Inspection171ip arp inspection vlan 10,20,30,40,50,60172interface GigabitEthernet1/0/47173 ip arp inspection trust174 exit175176! Enable IP Source Guard (prevents IP spoofing)177interface range GigabitEthernet1/0/1-36178 ip verify source179 exit180181! Enable Port Security182interface range GigabitEthernet1/0/1-24183 switchport port-security184 switchport port-security maximum 2185 switchport port-security violation restrict186 switchport port-security aging time 60187 exit188189! Set VTP to transparent mode (prevents VTP attacks)190vtp mode transparent191192! Enable BPDU Guard globally193spanning-tree portfast bpduguard default194195! Enable Storm Control196interface range GigabitEthernet1/0/1-36197 storm-control broadcast level 10198 storm-control multicast level 10199 storm-control action shutdown200 exit201```202203### Step 4: Configure Inter-VLAN Routing with ACLs204205```206! On the Layer 3 switch or firewall, configure SVIs207interface Vlan10208 ip address 10.10.10.1 255.255.255.0209 no shutdown210 exit211interface Vlan20212 ip address 10.10.20.1 255.255.255.0213 no shutdown214 exit215interface Vlan30216 ip address 10.10.30.1 255.255.255.0217 no shutdown218 exit219interface Vlan40220 ip address 10.10.40.1 255.255.255.0221 no shutdown222 exit223interface Vlan50224 ip address 10.10.50.1 255.255.255.0225 no shutdown226 exit227228! ACL: Corporate to Servers (allow specific services)229ip access-list extended CORP-TO-SERVERS230 permit tcp 10.10.10.0 0.0.0.255 10.10.20.0 0.0.0.255 eq 80231 permit tcp 10.10.10.0 0.0.0.255 10.10.20.0 0.0.0.255 eq 443232 permit tcp 10.10.10.0 0.0.0.255 10.10.20.0 0.0.0.255 eq 445233 permit udp 10.10.10.0 0.0.0.255 10.10.20.0 0.0.0.255 eq 53234 permit icmp 10.10.10.0 0.0.0.255 10.10.20.0 0.0.0.255 echo235 deny ip any any log236 exit237238! ACL: Guest to Internet only (deny all internal)239ip access-list extended GUEST-OUTBOUND240 deny ip 10.10.40.0 0.0.0.255 10.0.0.0 0.255.255.255241 deny ip 10.10.40.0 0.0.0.255 172.16.0.0 0.15.255.255242 deny ip 10.10.40.0 0.0.0.255 192.168.0.0 0.0.255.255243 permit tcp 10.10.40.0 0.0.0.255 any eq 80244 permit tcp 10.10.40.0 0.0.0.255 any eq 443245 permit udp 10.10.40.0 0.0.0.255 any eq 53246 deny ip any any log247 exit248249! ACL: IoT limited access250ip access-list extended IOT-OUTBOUND251 permit tcp 10.10.50.0 0.0.0.255 host 10.10.20.10 eq 443252 permit tcp 10.10.50.0 0.0.0.255 any eq 443253 permit udp 10.10.50.0 0.0.0.255 host 10.10.20.1 eq 53254 deny ip 10.10.50.0 0.0.0.255 10.10.50.0 0.0.0.255 log255 deny ip any any log256 exit257258! Apply ACLs to VLAN interfaces259interface Vlan10260 ip access-group CORP-TO-SERVERS out261 exit262interface Vlan40263 ip access-group GUEST-OUTBOUND in264 exit265interface Vlan50266 ip access-group IOT-OUTBOUND in267 exit268```269270### Step 5: Configure DHCP and DNS per VLAN271272```273! DHCP pools for each VLAN274ip dhcp pool CORPORATE275 network 10.10.10.0 255.255.255.0276 default-router 10.10.10.1277 dns-server 10.10.20.10278 domain-name corp.example.com279 lease 1280 exit281282ip dhcp pool GUEST283 network 10.10.40.0 255.255.255.0284 default-router 10.10.40.1285 dns-server 1.1.1.1 8.8.8.8286 lease 0 4287 exit288289ip dhcp pool IOT290 network 10.10.50.0 255.255.255.0291 default-router 10.10.50.1292 dns-server 10.10.20.10293 lease 7294 exit295296! Exclude gateway and server IPs from DHCP pools297ip dhcp excluded-address 10.10.10.1 10.10.10.10298ip dhcp excluded-address 10.10.40.1 10.10.40.10299ip dhcp excluded-address 10.10.50.1 10.10.50.10300```301302### Step 6: Verify and Test Segmentation303304```bash305# From a workstation on VLAN 10 (Corporate):306# Should succeed:307ping 10.10.20.10 # Server access308curl https://10.10.20.10 # HTTPS to server309310# Should fail:311ping 10.10.40.100 # Guest VLAN - should be blocked312ping 10.10.50.100 # IoT VLAN - should be blocked313314# From a device on VLAN 40 (Guest):315# Should succeed:316ping 8.8.8.8 # Internet access317curl https://www.google.com318319# Should fail:320ping 10.10.10.1 # Corporate gateway - blocked321ping 10.10.20.10 # Server - blocked322323# Verify switch configuration324show vlan brief325show interfaces trunk326show ip arp inspection statistics327show ip dhcp snooping binding328show port-security329show ip access-lists330331# Run VLAN hopping tests (from authorized pentest)332# These should all fail if hardening is correct:333# 1. DTP negotiation - should fail (nonegotiate)334# 2. Double tagging - should fail (native VLAN 998)335# 3. ARP spoofing - should fail (DAI enabled)336```337338## Key Concepts339340| Term | Definition |341|------|------------|342| **VLAN (Virtual LAN)** | Logical network partition at Layer 2 that groups switch ports into isolated broadcast domains, regardless of physical location |343| **802.1Q Trunking** | IEEE standard for VLAN tagging that adds a 4-byte header to Ethernet frames, identifying which VLAN a frame belongs to across trunk links |344| **Inter-VLAN Routing** | Layer 3 forwarding of traffic between VLANs using a router, Layer 3 switch, or firewall with access control lists |345| **Native VLAN** | VLAN assigned to untagged frames on trunk ports; should be set to an unused VLAN to prevent VLAN hopping attacks |346| **DHCP Snooping** | Switch feature that validates DHCP messages and builds a binding table of IP-MAC-port mappings, preventing rogue DHCP servers |347| **Port Security** | Switch feature that limits the number of MAC addresses per port and takes action (shutdown, restrict) when violated |348349## Tools & Systems350351- **Cisco Catalyst/Nexus**: Enterprise managed switches with comprehensive VLAN, trunking, and security feature support352- **HP Aruba CX**: Enterprise switches with REST API management and VLAN segmentation capabilities353- **pfSense/OPNsense**: Open-source firewalls for inter-VLAN routing with stateful access control354- **NetBox**: Open-source IPAM and DCIM tool for documenting VLAN assignments, IP addressing, and network topology355- **Nmap**: Network scanner for verifying segmentation effectiveness by testing reachability across VLAN boundaries356357## Common Scenarios358359### Scenario: Implementing PCI-DSS Compliant Network Segmentation for Retail360361**Context**: A retail chain must isolate their payment card processing systems from the general corporate network to meet PCI-DSS requirements. The current flat network has point-of-sale terminals, employee workstations, inventory servers, and guest WiFi on a single VLAN. The environment uses Cisco Catalyst 9300 switches.362363**Approach**:3641. Design VLAN architecture: POS terminals on VLAN 50 (CDE), corporate on VLAN 10, servers on VLAN 20, guest on VLAN 403652. Create VLANs on all access-layer switches and configure access ports by function3663. Configure trunk links between switches with explicit VLAN allowed lists (no "all" trunks)3674. Set native VLAN to 998 (unused) on all trunks and disable DTP on every port3685. Configure ACLs on the Layer 3 switch: CDE VLAN can only reach the payment processor's IP on port 443; no other inter-VLAN traffic to/from CDE3696. Enable DHCP snooping, DAI, and port security on all access ports3707. Verify segmentation with penetration testing from each VLAN, confirming CDE is fully isolated371372**Pitfalls**:373- Leaving DTP enabled on access ports, allowing VLAN hopping to reach the CDE374- Using VLAN 1 as the native VLAN, enabling double-tagging attacks375- Not restricting trunk allowed VLANs, carrying all VLANs including CDE to non-essential switches376- Creating ACLs that allow "any" source to reach CDE servers instead of specific POS terminal IPs377378## Output Format379380```381## Network Segmentation Implementation Report382383**Network**: Retail Store #42384**Switch Platform**: Cisco Catalyst 9300385**VLANs Configured**: 8386387### VLAN Summary388389| VLAN ID | Name | Subnet | Ports | Purpose |390|---------|------|--------|-------|---------|391| 10 | CORPORATE | 10.10.10.0/24 | Gi1/0/1-24 | Employee workstations |392| 20 | SERVERS | 10.10.20.0/24 | Gi1/0/25-36 | Internal servers |393| 30 | DMZ | 10.10.30.0/24 | Gi2/0/1-4 | Internet-facing |394| 40 | GUEST | 10.10.40.0/24 | WiFi AP trunk | Guest WiFi |395| 50 | CDE | 10.10.50.0/24 | Gi2/0/5-12 | POS terminals |396| 100 | MGMT | 10.10.100.0/24 | Gi1/0/48 | Switch management |397| 998 | NATIVE | N/A | Trunks only | Unused native |398| 999 | QUARANTINE | 10.10.99.0/24 | Unused ports | Isolation |399400### Security Hardening Status401402| Control | Status |403|---------|--------|404| DTP Disabled (nonegotiate) | All ports |405| Native VLAN (998) | All trunks |406| DHCP Snooping | VLANs 10,20,40,50 |407| Dynamic ARP Inspection | VLANs 10,20,40,50 |408| Port Security | Access ports |409| BPDU Guard | Access ports |410| Unused Ports Shutdown | 10 ports in VLAN 999 |411| VTP Transparent Mode | Enabled |412```