In this lab, we set up a simple network with two VLANs (Virtual Local Area Networks) and configured a router to allow communication between them. VLANs are a way to logically separate devices on the same physical network, which is super useful for improving security, reducing congestion, and organizing traffic. For this example, the Sales team and Engineering team might need to be on separate VLANs to keep their data isolated while still allowing communication when necessary.
Here is a download link for the CISCO Packet Tracer software:
https://www.netacad.com/about-networking-academy/packet-tracer
Here is the project file for my VLAN Routing Lab:
https://drive.google.com/file/d/1hnbfKe3yAMgOicoJ1DpkWamTF3M6UVFr/view?usp=drive_link
Key Steps in the Lab
- Physical Setup:
- Connected PC0 to the switch’s FastEthernet0/2 port. Connected PC1 to the switch’s FastEthernet0/3 port.
- Connected the switch’s GigabitEthernet0/1 port to the router’s GigabitEthernet0/0 port.
- VLAN Configuration on the Switch:
- Created VLAN 10 for Sales and VLAN 20 for Engineering.
- Assigned FastEthernet0/2 to VLAN 10 and FastEthernet0/3 to VLAN 20.
- Configured the port connected to the router as a trunk port to carry traffic for both VLANs.

- Router Configuration for Inter-VLAN Routing:
- Created subinterfaces on the router:
- GigabitEthernet0/0.10 for VLAN 10 with IP
192.168.10.1
.GigabitEthernet0/0.20 for VLAN 20 with IP192.168.20.1
.
- GigabitEthernet0/0.10 for VLAN 10 with IP
- Created subinterfaces on the router:

- PC Configuration:
- PC0 (Sales): IP
192.168.10.10
, gateway192.168.10.1
. - PC1 (Engineering): IP
192.168.20.10
, gateway192.168.20.1
.
- PC0 (Sales): IP

We also added another PC on each VLAN, and connected them to the routers. This will allow us to test connections between devices under the same VLAN and Inter-VLAN connections.
Testing
We tested connectivity by pinging between PC0 and PC1. The ping succeeds, it means the VLANs are properly isolated & the router is correctly routing traffic between the VLANs. We saw successful pings in both Inter-VLAN and PCs under the same VLAN network.

How VLANs Isolate Data
VLANs isolate data by tagging traffic with a VLAN ID. Here’s a full breakdown sending data from PC0 (Sales) to PC1 (Engineering) and what steps are used to isolate data.
- PC0 sends the data to its default gateway (
192.168.10.1
), which is the router’s subinterface for VLAN 10. When PC0 (in VLAN 10) sends data, the switch adds a VLAN tag (ID 10) to the traffic. - The switch checks the VLAN tag and only forwards the data to devices in the same VLAN (VLAN 10) or to the router if the destination is in another VLAN.
- If PC0 tries to send data directly to PC1 (in VLAN 20), the switch blocks it because they’re in different VLANs.
- The router handles inter-VLAN traffic by reading the VLAN tags and forwarding the data to the correct VLAN. The router forwards the data to the subinterface for VLAN 20 (
192.168.20.1
). - The data is then sent to PC1 in VLAN 20.
VLAN tags ensure that data stays within its intended VLAN unless the router explicitly allows communication between VLANs.
Why VLANs Are Useful
VLANs are a game-changer in networking. They:
- Isolate Traffic: Keep Sales and Engineering data separate for security and organization.
- Improve Performance: Reduce unnecessary broadcast traffic.
- Enhance Security: Make it harder for unauthorized users to access sensitive data.
- Provide Flexibility: Group devices logically, not physically. For example, if the Sales team moves to a different floor, you don’t need to rewire the network—just reconfigure the VLANs.
Summary and Experience
This lab was a great hands-on way to learn about VLANs and inter-VLAN routing. The connection between the router’s sub-interface IPs and the PCs’ gateways is crucial—it’s how devices in different VLANs know where to send their traffic. VLANs are a powerful tool for organizing and securing networks, and this lab gave me a solid foundation in how to set them up. Whether you’re working in a small office or a large enterprise, understanding VLANs is a must for any IT professional.
Leave a Reply