In this scenario, a single Layer 2 switch is used to create and manage three VLANs: VLAN 1, VLAN 2, and VLAN 3. Each VLAN is assigned specific ports and clients. The goal is to show how VLANs isolate broadcast domains, ensuring traffic within one VLAN does not interact with other VLANs. This scenario focuses on foundational VLAN segmentation concepts.
Objective
The purpose of this lab is to configure three VLANs on a single Layer 2 switch and demonstrate how VLAN segmentation works. The lab will ensure that communication occurs only within the same VLAN while preventing inter-VLAN communication.
Network Structure
- VLAN 1:
- Ports: e0/0, e0/1
- Clients: PC1, PC2
- Subnet: 192.168.1.0/24
- VLAN 2:
- Ports: e0/2, e0/3
- Clients: PC3, PC4
- Subnet: 192.168.2.0/24
- VLAN 3:
- Ports: e1/0, e1/1
- Clients: PC5, PC6
- Subnet: 192.168.3.0/24
Topology Diagram
Below is the topology diagram for this lab setup:

(Refer to Figure 8-9: Network with One Switch and Three VLANs)
Prerequisites
- Installed and configured EVE-NG.
- A Layer 2 switch and six vPCS clients added to the lab. Don’t forget to add a second ethernet port group for the iol switch by editing the switch in EVE-NG.
- Basic knowledge of VLAN configuration and segmentation.
Implementation Steps
Step 1: Add and Connect Devices in EVE-NG
- Add one Layer 2 switch and six vPCS nodes.
- Connect devices to the switch according to the topology:
- VLAN 1:
- PC1 → SW1 e0/0
- PC2 → SW1 e0/1
- VLAN 2:
- PC3 → SW1 e0/2
- PC4 → SW1 e0/3
- VLAN 3:
- PC5 → SW1 e1/0
- PC6 → SW1 e1/1
- VLAN 1:
Step 2: Configure VLANs on the Switch
1. Access the switch CLI and create the VLANs: (note: we can not rename VLAN 1 as it is a default VLAN)
Switch> enable
Switch# configure terminal
Switch# hostname SW1
SW1(config)# vlan 1
SW1(config-vlan)# exit
SW1(config)# vlan 2
SW1(config-vlan)# name VLAN2
SW1(config-vlan)# exit
SW1(config)# vlan 3
SW1(config-vlan)# name VLAN3
SW1(config-vlan)# exit
2. Assign ports to VLANs:
- For VLAN 1:
Switch(config)# interface range e0/0 -1
Switch(config-if-range)# switchport mode access
Switch(config-if-range)# switchport access vlan 1
Switch(config-if-range)# exit