VLAN Access Port Configuration
In this lab, I have configured VLANs on a Cisco 2960 switch, assigned ports to their respective VLANs, and connected multiple PCs using straight-through cables. I also verified VLAN assignments and tested connectivity to observe how devices communicate within the same VLAN and how communication fails across different VLANs without inter-VLAN routing.
Network Setup Overview
Section titled “Network Setup Overview”| Device | VLAN | IP Address | Port | Cable Type |
|---|---|---|---|---|
| PC0 | VLAN 10 (SALES) | 10.10.10.1 | Fa0/1 | Straight-through |
| PC1 | VLAN 10 (SALES) | 10.10.10.2 | Fa0/2 | Straight-through |
| PC2 | VLAN 20 (ENGINEERING) | 10.10.10.3 | Fa0/3 | Straight-through |
| PC3 | VLAN 20 (ENGINEERING) | 10.10.10.4 | Fa0/4 | Straight-through |
Core Device: Cisco 2960 Switch
Note: All PCs are connected directly to the switch using straight-through Ethernet cables.
Configuration Steps
Section titled “Configuration Steps”-
Enable VLANs:
Terminal window Switch(config)# vlan 10Switch(config-vlan)# name SALESSwitch(config)# vlan 20Switch(config-vlan)# name Engineering -
Assign Access Ports to VLANs:
Terminal window Switch(config)# interface fa0/1Switch(config-if)# switchport mode accessSwitch(config-if)# switchport access vlan 10Switch(config)# interface fa0/2Switch(config-if)# switchport mode accessSwitch(config-if)# switchport access vlan 10Switch(config)# interface range fa0/3 - 4Switch(config-if-range)# switchport mode accessSwitch(config-if-range)# switchport access vlan 20 -
Shutdown Unused Ports:
Terminal window Switch(config)# interface range fa0/5 - 24Switch(config-if-range)# description Inactive portsSwitch(config-if-range)# shutdownSwitch(config)# interface range g0/1 - 2Switch(config-if-range)# shutdown
Verification Commands
Section titled “Verification Commands”-
Check VLAN assignment:
Terminal window Switch# show vlan brief -
Output:
VLAN Name Status Ports---- -------------------------------- --------- -------------------------------1 default active Fa0/5, Fa0/6, Fa0/7, Fa0/8Fa0/9, Fa0/10, Fa0/11, Fa0/12Fa0/13, Fa0/14, Fa0/15, Fa0/16Fa0/17, Fa0/18, Fa0/19, Fa0/20Fa0/21, Fa0/22, Fa0/23, Fa0/24Gig0/1, Gig0/210 SALES active Fa0/1, Fa0/220 Engineering active Fa0/3, Fa0/41002 fddi-default active1003 token-ring-default active1004 fddinet-default active1005 trnet-default active
Next Steps: Testing Network Connectivity
Section titled “Next Steps: Testing Network Connectivity”Pinging PC0 - PC1 (Sales VLAN: Same VLAN Communication)
Section titled “Pinging PC0 - PC1 (Sales VLAN: Same VLAN Communication)”Success — Communication succeeds as both PCs are in the Sales VLAN.

Pinging PC1 - PC0 (Sales VLAN: Same VLAN Communication)
Section titled “Pinging PC1 - PC0 (Sales VLAN: Same VLAN Communication)”Success — Same result as above, as both are in the Sales VLAN.

Pinging PC0 - PC2 (Sales - HR VLAN: Different VLANs)
Section titled “Pinging PC0 - PC2 (Sales - HR VLAN: Different VLANs)”Failed — Communication fails as the PCs are in different VLANs.

Pinging PC1 - PC3 (Sales - Engineering VLAN: Different VLANs)
Section titled “Pinging PC1 - PC3 (Sales - Engineering VLAN: Different VLANs)”Failed — Communication is blocked due to the PCs being in different VLANs.

Pinging PC2 - PC3 (HR - Engineering VLAN: Same Network Configuration)
Section titled “Pinging PC2 - PC3 (HR - Engineering VLAN: Same Network Configuration)”Success — These PCs can communicate as they are part of the HR and Engineering VLANs, which are properly routed.

Pinging PC3 - PC2 (HR - Engineering VLAN: Same Network Configuration)
Section titled “Pinging PC3 - PC2 (HR - Engineering VLAN: Same Network Configuration)”Success — As above, the PCs can ping each other successfully.

Pinging PC0 - PC2 (Sales - HR VLAN: Different VLANs)
Section titled “Pinging PC0 - PC2 (Sales - HR VLAN: Different VLANs)”Failed — Ping failed due to being on different VLANs.

Network Ping Results Overview
Section titled “Network Ping Results Overview”| Source | Destination | VLANs | Ping Result | Explanation |
|---|---|---|---|---|
| PC0 | PC1 | Sales VLAN | Success | Both PCs are in the same VLAN (Sales), so direct communication is possible. |
| PC0 | PC2 | Sales - HR VLAN | Failed | PCs in different VLANs, no routing configured. |
| PC1 | PC3 | Sales - Engineering VLAN | Failed | Communication blocked by VLAN separation, no inter-VLAN routing available. |
| PC2 | PC3 | HR - Engineering VLAN | Success | Routing enabled between HR and Engineering VLANs, successful communication. |
| PC0 | PC3 | Sales - Engineering VLAN | Failed | Devices in different VLANs; routing is required for communication. |
Visual Summary
Section titled “Visual Summary”| Ping Pair | VLAN Connection | Ping Outcome |
|---|---|---|
| PC0 - PC1 | Same VLAN (Sales VLAN) | Success |
| PC0 - PC2 | Different VLANs (Sales - HR) | Failed |
| PC1 - PC3 | Different VLANs (Sales - Engineering) | Failed |
| PC2 - PC3 | Different VLANs (HR - Engineering) | Success |