Skip to content

Trunk Port Configuration Lab

In this lab, VLANs were configured on two Cisco 2960 switches, access ports were assigned to the appropriate VLANs, and a trunk link was established between the switches to allow inter-switch VLAN communication.


DeviceVLANIP AddressPortCable Type
PC0VLAN 10 (SALES)10.10.10.1Fa0/1 (Switch 0)Straight-through
PC1VLAN 10 (SALES)10.10.10.2Fa0/2 (Switch 0)Straight-through
PC2VLAN 20 (ENGINEERING)10.10.10.3Fa0/3 (Switch 0)Straight-through
PC3VLAN 20 (ENGINEERING)10.10.10.4Fa0/4 (Switch 0)Straight-through
PC4VLAN 10 (SALES)10.10.10.5Fa0/1 (Switch 1)Straight-through
PC5VLAN 10 (SALES)10.10.10.6Fa0/2 (Switch 1)Straight-through
PC6VLAN 20 (ENGINEERING)10.10.10.7Fa0/3 (Switch 1)Straight-through
PC7VLAN 20 (ENGINEERING)10.10.10.8Fa0/4 (Switch 1)Straight-through

Core device: Cisco 2960 Switch
Note: Switch-to-switch connection uses a crossover cable.


Terminal window
Switch(config)# vlan 10
Switch(config-vlan)# name SALES
Switch(config)# vlan 20
Switch(config-vlan)# name ENGINEERING
Terminal window
Switch(config)# interface fa0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 10
Switch(config)# interface fa0/2
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 10
Switch(config)# interface range fa0/3 - 4
Switch(config-if-range)# switchport mode access
Switch(config-if-range)# switchport access vlan 20
Terminal window
Switch(config)# interface range fa0/5 - 24
Switch(config-if-range)# description Inactive ports
Switch(config-if-range)# shutdown
Switch(config)# interface range g0/1 - 2
Switch(config-if-range)# shutdown

Terminal window
Switch# show vlan brief

Sample Output:

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/5-Fa0/24, Gig0/1, Gig0/2
10 SALES active Fa0/1, Fa0/2
20 ENGINEERING active Fa0/3, Fa0/4
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active

The two switches are connected using GigabitEthernet0/1 interfaces. Trunking allows VLAN 10 and VLAN 20 to pass traffic between the switches.

Terminal window
Switch(config)# interface gig0/1
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk native vlan 199
Switch(config-if)# switchport trunk allowed vlan 10,20

Expected: Success
Reason: Both devices are in VLAN 10, on different switches, connected through a trunk.

Expected: Success
Reason: Same VLAN across switches, trunk allows communication.

Expected: Failure
Reason: Inter-VLAN communication requires a Layer 3 device.


From → ToExpected ResultReason
PC0 → PC1 (VLAN 10)SuccessSame VLAN
PC2 → PC3 (VLAN 20)SuccessSame VLAN
PC0 → PC2 (VLAN 10 → 20)TimeoutDifferent VLANs, no routing
PC0 → PC4 (VLAN 10)SuccessSame VLAN on different switch via trunk
PC0 → PC6 (VLAN 10 → 20)TimeoutDifferent VLANs
Switch0 → Switch1 (Trunk link)SuccessTrunk operational
VLANs across trunkSuccessTrunk passing allowed VLANs

  • VLANs are correctly configured and properly segment the network.
  • Trunking between switches is functioning and allows multi-VLAN traffic.
  • Access ports are assigned correctly.
  • Unused ports were shut down for security.
  • Connectivity tests confirm both VLAN separation and trunk functionality.