Lab Objective
Configure a switch port with both a data VLAN and a voice VLAN, connect an IP phone with a PC daisy-chained through it, and verify the phone's traffic is automatically tagged into the voice VLAN while the PC's traffic remains untagged in the data VLAN, sharing the single physical cable.
Lab Purpose
Running a separate cable to every desk for a PC and a separate one for an IP phone doubles cabling costs unnecessarily. Voice VLAN allows both devices to share one switch port and one cable, with the switch using CDP to automatically instruct the phone to tag its own traffic into a dedicated voice VLAN, separating voice and data traffic without requiring two physical connections.
Lab Topology
Switch1 ---- Gi1/0/5 ---- IPPhone1 ---- (daisy-chained) ---- PC-A
Data VLAN: 10 (192.168.10.0/24)
Voice VLAN: 110 (192.168.110.0/24)Task 1: Create the Data and Voice VLANs
Create VLAN 10 named Data and VLAN 110 named Voice.
Task 2: Configure the Access Port with Both VLANs
Configure Gi1/0/5 as an access port in VLAN 10, and additionally assign VLAN 110 as the voice VLAN on the same port.
Task 3: Verify CDP Is Enabled
Confirm CDP is active on the port, since it is what instructs the IP phone to tag voice traffic into the correct VLAN.
Task 4: Verify the Phone Receives Voice VLAN Information
Confirm the phone registers on the voice VLAN and obtains an appropriate address.
Task 5: Verify PC-A's Untagged Traffic Remains in the Data VLAN
Confirm PC-A, connected through the phone's pass-through port, is correctly placed in VLAN 10.
Solution and Verification
Switch1(config)# vlan 10
Switch1(config-vlan)# name Data
Switch1(config-vlan)# exit
Switch1(config)# vlan 110
Switch1(config-vlan)# name VoiceSwitch1(config)# interface gigabitethernet1/0/5
Switch1(config-if)# switchport mode access
Switch1(config-if)# switchport access vlan 10
Switch1(config-if)# switchport voice vlan 110
-- The port now carries VLAN 10 for untagged
-- traffic (the PC) and VLAN 110 specifically
-- for traffic the phone tags as voice --
-- both flow over the same single cableSwitch1# show cdp interface gigabitethernet1/0/5
GigabitEthernet1/0/5 is up, line protocol is up
Sending CDP packets every 60 seconds
-- CDP active on the port, discussed earlier
-- in this series regarding neighbor
-- discovery -- this is the mechanism the
-- phone uses to learn its assigned voice
-- VLAN from the switchIPPhone1 (after connecting)> [displays network status]
VLAN: 110
IP Address: 192.168.110.15
-- The phone learned via CDP that voice
-- traffic should be tagged into VLAN 110,
-- and obtained an address on that subnetSwitch1# show mac address-table interface gigabitethernet1/0/5
Vlan Mac Address Type Ports
10 00aa.bb00.5010 DYNAMIC Gi1/0/5
110 00aa.bb00.5099 DYNAMIC Gi1/0/5
-- Two distinct MAC entries appear on the
-- SAME physical port, correctly separated
-- into VLAN 10 (PC-A) and VLAN 110
-- (IPPhone1) despite sharing one cableKey Takeaway
A voice VLAN port is neither a pure access port nor a trunk in the traditional sense — it accepts untagged traffic into the configured access VLAN while simultaneously accepting 802.1Q-tagged traffic, discussed earlier in this series regarding trunking, specifically for the voice VLAN, with CDP serving as the mechanism that instructs a Cisco IP phone to apply that tag automatically without any manual configuration on the phone itself.