Packet Tracer Walkthrough: VLAN Configuration

A step-by-step graphical guide to subnets, VLAN creation, port mapping, and ping verification.

Objective Overview

In this lab, we have a switch connected to 6 computers. Our task is to separate these computers into three logical networks (VLANs). Devices in different subnets should not be able to talk to each other without a router, but devices inside the same VLAN should be able to communicate perfectly.

VLAN ID VLAN Name Subnet Range Associated PCs Expected Switch Ports
10 VLAN_10 192.168.10.0/24 PC0, PC1 FastEthernet0/1, FastEthernet0/2
20 VLAN_20 192.168.20.0/24 PC2, PC3 FastEthernet0/3, FastEthernet0/4
30 VLAN_30 192.168.30.0/24 PC4, PC5 FastEthernet0/5, FastEthernet0/6 or 0/8

Step-by-Step Instructions

1. Assign IP Addresses to Computers

Each PC needs a static IP within its assigned subnet range so it can communicate on the IP layer.

  1. Click on PC0 to open its properties window.
  2. Select the Desktop tab at the top, then click on IP Configuration.
  3. Change IP address to 192.168.10.1. Click on the Subnet Mask input field, and it will fill in 255.255.255.0. Close the window.
  4. Repeat this process for all other computers using the configuration details below:
    • PC1: IP: 192.168.10.2 (Subnet Mask: 255.255.255.0)
    • PC2: IP: 192.168.20.1 (Subnet Mask: 255.255.255.0)
    • PC3: IP: 192.168.20.2 (Subnet Mask: 255.255.255.0)
    • PC4: IP: 192.168.30.1 (Subnet Mask: 255.255.255.0)
    • PC5: IP: 192.168.30.2 (Subnet Mask: 255.255.255.0)
2. Create VLANs inside Switch database

Next, we must register the VLAN IDs and Names inside the switch so it knows these networks exist.

  1. Click once on the Switch.
  2. Go to the Config tab in the menu bar.
  3. In the left panel under Switching, click on VLAN Database.
  4. Create VLAN 10:
    • Type 10 in the VLAN Number box.
    • Type VLAN_10 in the VLAN Name box.
    • Click Add.
  5. Create VLAN 20:
    • Type 20 in the VLAN Number box.
    • Type VLAN_20 in the VLAN Name box.
    • Click Add.
  6. Create VLAN 30:
    • Type 30 in the VLAN Number box.
    • Type VLAN_30 in the VLAN Name box.
    • Click Add.
3. Assign Switch Interfaces to the correct VLANs

By default, every port is in VLAN 1. We must configure specific ports to access our new VLAN subnets.

🔍 Quick Tip: Check Port Connections
Hover your mouse over the cable lines in the Packet Tracer logical map to see exactly which port (like Fa0/1 or Fa0/8) is plugged into each PC.
  1. Inside the Switch Config tab, look under the Interface category in the left column.
  2. Click on FastEthernet0/1 (runs to PC0). In the interface panel, change the VLAN dropdown from 1 to 10. Make sure Port Status is checked On.
  3. Click on FastEthernet0/2 (runs to PC1) and switch its VLAN dropdown to 10.
  4. Click on FastEthernet0/3 (runs to PC2) and switch its VLAN dropdown to 20.
  5. Click on FastEthernet0/4 (runs to PC3) and switch its VLAN dropdown to 20.
  6. Click on FastEthernet0/5 (runs to PC4) and switch its VLAN dropdown to 30.
  7. Click on the port connected to PC5 (e.g. FastEthernet0/6 or FastEthernet0/8) and switch its VLAN dropdown to 30.
4. Verify Connectivity (Ping Testing)

Let's verify that the VLAN configurations successfully block outside traffic but allow internal communications.

  1. Click on PC0 -> Desktop -> Command Prompt.
  2. Ping the computer next to it (PC1) in the same VLAN:
    ping 192.168.10.2
    You should see four successful replies (0% loss).
  3. Now try to ping a PC on another subnet (PC2):
    ping 192.168.20.1
    You should see "Request timed out." indicating the VLAN is successfully blocking traffic between subnets.