A Cisco Packet Tracer lab demonstrating VLAN segmentation, trunking, and router-on-a-stick inter-VLAN routing for enterprise networks.
Table of Contents
- ๐ Project Overview
- ๐ฏ Project Objectives
- ๐ Network Topology
- ๐ IP Addressing Table
- ๐ ๏ธ Lab Steps
- ๐ป Device Configuration
- โ Verification Commands
- โก How to Run Lab
- ๐ Folder Structure
- ๐ Learning Outcomes
- โน๏ธ Repository Info
This lab simulates a realistic enterprise network with multiple VLANs and inter-VLAN routing implemented using router-on-a-stick.
The network includes a central switch, a router with subinterfaces, multiple PCs in different VLANs, and a server.
Key CCNA skills demonstrated include VLAN creation, trunk configuration, inter-VLAN routing, DHCP, and IP addressing.
- Configure VLANs and assign access ports.
- Configure a trunk port between switch and router.
- Configure router-on-a-stick subinterfaces for inter-VLAN routing.
- Verify connectivity between VLANs and to a central server.
- Demonstrate Layer 2 and Layer 3 network communication.
Real-world Scenario:
The company has three departments: HR, IT, and Sales. Each department needs its own VLAN for traffic segmentation. All PCs should communicate internally while maintaining proper gateway configuration, and DHCP automates IP assignment.
Important Note:
โThe server resides in VLAN 10 (HR), while other VLANs access it via router-on-a-stick inter-VLAN routing, demonstrating proper Layer 3 communication in an enterprise network.โ
Router: 1 (R1)
Switch: 1 Layer 3 Switch (SW1)
PCs: 6 (2 per department)
Server: 1 (DHCP & DNS)
๐งฉ See
topology/enterprise-vlan-intervlan-lab.png
for network diagram.
Drawio design available at:drawio/enterprise-vlan-intervlan-lab.drawio
๐๏ธ Device Connection Table
Device | Interface | Connected To | Notes |
---|---|---|---|
R1 | G0/0 | SW1 G0/1 | Trunk link for router-on-a-stick |
SW1 | G0/1 | R1 G0/0 | Trunk link carrying VLANs 10, 20, 30 |
SW1 | Fa0/1 | PC1 | HR VLAN 10 |
SW1 | Fa0/2 | PC2 | HR VLAN 10 |
SW1 | Fa0/3 | PC3 | IT VLAN 20 |
SW1 | Fa0/4 | PC4 | IT VLAN 20 |
SW1 | Fa0/5 | PC5 | Sales VLAN 30 |
SW1 | Fa0/6 | PC6 | Sales VLAN 30 |
SW1 | Fa0/7 | Server | DHCP/DNS Server, trunk or access depending on VLAN assignment |
Device / Interface | IP Address | Subnet Mask | Default Gateway | VLAN / Notes |
---|---|---|---|---|
Router R1 G0/0.10 | 192.168.10.1 | 255.255.255.0 | - | VLAN 10 HR (Router-on-a-stick) |
Router R1 G0/0.20 | 192.168.20.1 | 255.255.255.0 | - | VLAN 20 IT |
Router R1 G0/0.30 | 192.168.30.1 | 255.255.255.0 | - | VLAN 30 Sales |
PC1 (HR) | 192.168.10.10 | 255.255.255.0 | 192.168.10.1 | VLAN 10 |
PC2 (HR) | 192.168.10.11 | 255.255.255.0 | 192.168.10.1 | VLAN 10 |
PC3 (IT) | 192.168.20.10 | 255.255.255.0 | 192.168.20.1 | VLAN 20 |
PC4 (IT) | 192.168.20.11 | 255.255.255.0 | 192.168.20.1 | VLAN 20 |
PC5 (Sales) | 192.168.30.10 | 255.255.255.0 | 192.168.30.1 | VLAN 30 |
PC6 (Sales) | 192.168.30.11 | 255.255.255.0 | 192.168.30.1 | VLAN 30 |
Server (DHCP/DNS) | 192.168.10.100 | 255.255.255.0 | 192.168.10.1 | Connected to SW1 trunk, serves all VLANs |
-
Connect all devices as per topology diagram. โ Connect all devices according to the topology diagram.
-
Configure VLANs on the switch.
-
Assign switch ports to VLANs.
-
Configure router-on-a-stick with subinterfaces for each VLAN.
-
Configure DHCP pools on the server or router.
-
Assign PCs to VLANs and enable DHCP. โ Assign PCs to their respective VLANs and configure DHCP.
-
Test connectivity between PCs in same VLAN.
-
Test connectivity between PCs in different VLANs (Inter-VLAN routing). โ Test inter-VLAN connectivity between PCs in different VLANs.
SW1 (Layer 3 Switch)
Below is a snippet of the SW1 config. View the full file below:
SW1(config)#vlan 10
SW1(config-vlan)#name HR
SW1(config-vlan)#vlan 20
SW1(config-vlan)#name IT
SW1(config-vlan)#vlan 30
SW1(config-vlan)#name Sales
View Full Configuration File โ
Router R1 (Router-on-a-Stick)
Below is a snippet of the R1 config. View the full file below:
R1(config)#interface g0/0
R1(config-if)#no shutdown
! Subinterfaces for VLANs
```text
R1(config)#interface g0/0.10
R1(config-subif)#encapsulation dot1Q 10
R1(config-subif)#ip address 192.168.10.1 255.255.255.0
R1(config-subif)#no shutdown
View Full Configuration File โ
ON ROUTER (R1)
Below is a snippet of the dhcp config. View the full file below:
R1(config)#
R1(config)#! VLAN 10 HR
R1(config)#ip dhcp pool HR
R1(dhcp-config)#network 192.168.10.0 255.255.255.0
R1(dhcp-config)#default-router 192.168.10.1
R1(dhcp-config)#dns-server 8.8.8.8
View Full Configuration File โ
Refer to full files:
shows the full lab layout in Packet Tracer.
show vlan brief output on SW1 --> Vlan10,20,30
show vlan brief
Shows show interfaces trunk output, proving the router-to-switch trunk works.
show interfaces trunk
Shows show ip interface brief or show ip route to prove subinterfaces are configured.
show ip interface brief
show ip route
- Ping between PCs in same VLAN PC 2 to PC1 โ โPing between PCs in the same VLAN (PC2 โ PC1)โ
Test Summary Table:
Test | Status | Notes |
---|---|---|
VLAN Configuration | โ Success | VLANs 10, 20, 30 configured on SW1 |
Trunk Port | โ Success | Trunk between SW1 G0/1 and R1 G0/0 verified |
Router-on-a-Stick | โ Success | Subinterfaces configured for all VLANs |
DHCP Assignment | โ Success | PCs received IP addresses automatically |
Ping Tests (Intra-VLAN) | โ Success | PCs in the same VLAN can communicate |
Ping Tests (Inter-VLAN) | โ Success | PCs across VLANs can communicate via router |
Server Connectivity | โ Success | All VLANs can reach the server |
-
Open Cisco Packet Tracer 8.x (recommended).
-
Open the lab file: labs/enterprise-vlan-intervlan-lab.pkt.
-
Follow Lab Steps section above.
-
Verify VLANs, trunking, router-on-a-stick, DHCP and inter-VLAN connectivity.
-
Use the Verification Commands section to confirm correct operation.
-
Optional: Enable Simulation Mode to observe packet flow between VLANS and the Server.
enterprise-vlan-intervlan-lab/ โโโ README.md โโโ verification.md โโโ LICENSE โโโ Learning Outcomes โโโ Repository Info โ โโโ config/ โ โโโ router-configs/ โ โ โโโ r1.cfg โ โ โโโ dhcp.cfg โ โ โ โโโ switch-configs/ โ โ โโโ sw1.cfg โ โ โ โโโ pc-configs/ โ โ โโโ pc.txt โ โ โ โโโ server-configs/ โ โโโ server.txt โ โโโ screenshots/ โ โโโ ping_different_vlan.png โ โโโ ping_same_vlan.png โ โโโ router_ip_route.png โ โโโ router_subinterfaces.png โ โโโ trunk_port_status.png โ โโโ vlan_10_ping_server.png โ โโโ vlan_30_ping_server.png โ โโโ vlan_table_verification.png โ โโโ topology/ โ โโโ topology_overview.png โ โโโ enterprise-vlan-intervlan-lab.png โ โโโ labs/ โโโ enterprise-vlan-intervlan-lab.pkt
After completing this lab, you will be able to:
-
Configure VLANs, trunk ports, and router-on-a-stick inter-VLAN routing.
-
Assign and verify DHCP-assigned IP addresses across VLANs.โ
-
Interpret show commands (show vlan brief, show ip interface brief, show ip route, show interfaces trunk) to troubleshoot and verify network configuration.
-
Demonstrate network connectivity testing using ping across VLANs and to the server.
-
Apply layer 2 and layer 3 network reasoning to solve network issues.
-
Develop practical skills relevant to CCNA certification and enterprise network management.
This project is part of my CCNA Lab Portfolio.
Explore more labs here ๐ @asmymhm