Packet Tracer vlan lab

Packet Tracer is a network simulation tool developed by Cisco that allows users to create virtual networks and practice configuring networking devices without needing physical hardware. It provides a hands-on learning environment where you can simulate a variety of network topologies, troubleshoot issues, and test different configurations. For me, Packet Tracer was the key to my networking journey. It enabled me to experiment with networking concepts and devices in a risk-free environment, laying the foundation for my knowledge of routing, switching, and network security. It was through Packet Tracer that I gained the confidence and skills needed to pursue my CCNA certification and take my first real steps into the world of networking and cybersecurity.

Step-by-Step Guide for Setting Up VLANs in Packet Tracer



Step 1:Download and Open Cisco Packet Tracer https://www.netacad.com/resources/lab-downloads?courseLang=en-US
1. Launch Cisco Packet Tracer.
2. Create a new file for your project.

Step 2: Add Devices to the Workspace
1. Add switches:
– Drag two Switches (e.g., 2960 or 3550) from the device list onto the workspace.
2. Add PCs:
– Drag four PCs onto the workspace: two for the HR department and two for the Engineering department.
3. Add a router (optional for inter-VLAN routing):
– Drag a Router (e.g., 2811 or 2911) into the workspace.
4. Add cables:
– Use Copper Straight-Through Cables to connect PCs to the switches and switches to the router (if doing routing between VLANs).

Step 3: Configure VLANs on the Switches
1. Click on Switch 1 to open its configuration window.
2. Go to the CLI tab and enter the following commands:
– Enter configuration mode:
Switch1> enable
Switch1# configure terminal
– Create the VLANs:
Switch1(config)# vlan 10
Switch1(config-vlan)# name HR
Switch1(config-vlan)# exit
Switch1(config)# vlan 20
Switch1(config-vlan)# name Engineering
Switch1(config-vlan)# exit
3. Assign VLANs to switch ports:
– For HR department (VLAN 10):
Switch1(config)# interface range fa0/1 – 2
Switch1(config-if-range)# switchport mode access
Switch1(config-if-range)# switchport access vlan 10
Switch1(config-if-range)# exit
– For Engineering department (VLAN 20):
Switch1(config)# interface range fa0/3 – 4
Switch1(config-if-range)# switchport mode access
Switch1(config-if-range)# switchport access vlan 20
Switch1(config-if-range)# exit

Step 4: Assign IP Addresses to PCs
1. Click on PC1 (HR) and go to the Desktop tab, then select IP Configuration.
– Set the IP address for PC1:
IP Address: 192.168.10.10
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.10.1
2. Repeat for PC2 (HR) with the following IP configuration:
IP Address: 192.168.10.11
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.10.1
3. For PC3 (Engineering), configure the IP address:
IP Address: 192.168.20.10
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.20.1
4. Repeat for PC4 (Engineering) with:
IP Address: 192.168.20.11
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.20.1

Step 5: Configure the Router for Inter-VLAN Routing (Optional)
1. Click on Router to open the configuration window.
2. Enter configuration mode:
Router> enable
Router# configure terminal
3. Set up subinterfaces for each VLAN:
– For HR VLAN (VLAN 10):
Router(config)# interface gig0/0.10
Router(config-if)# encapsulation dot1Q 10
Router(config-if)# ip address 192.168.10.1 255.255.255.0
Router(config-if)# no shutdown
– For Engineering VLAN (VLAN 20):
Router(config)# interface gig0/0.20
Router(config-if)# encapsulation dot1Q 20
Router(config-if)# ip address 192.168.20.1 255.255.255.0
Router(config-if)# no shutdown
4. Enable routing on the router:
Router(config)# ip routing

Step 6: Verify Connectivity
1. On PC1 (HR), open the Command Prompt and ping the gateway:
ping 192.168.10.1
2. Try pinging PC3 (Engineering) by its IP address:
ping 192.168.20.10

Step 7: Save Your Configuration
1. On the switches and router, save your configurations to ensure they persist after a reboot:
Switch1# write memory
Router# write memory

Basic Commands You Should Know
– Show running configuration (view current settings):
show running-config

– Show VLANs (list VLANs on a switch):
show vlan brief

– Show IP interfaces (check the interface status on a router or switch):
show ip interface brief

– Ping a device (test connectivity between devices):
ping <IP address>

– Show interface status (check the status of interfaces):
show interfaces status

– Show CDP neighbors (view connected devices):
show cdp neighbors