Hands-On Lab: Configuring Voice VLAN

This hands-on lab configures a voice VLAN on an access switch port, allowing an IP phone and an attached PC to share a single physical port while remaining on separate VLANs, with the phone's traffic automatically tagged and the PC's traffic left untagged.

Voice VLAN ConfigurationAuxiliary VLANCDP-Based Phone Discovery

~3 دقیقه مطالعه · آخرین به‌روزرسانی ۱ مهر ۱۴۰۵

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 Voice

Switch1(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 cable

Switch1# 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 switch

IPPhone1 (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 subnet

Switch1# 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 cable

Key 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.

نوشته و پژوهش‌شده توسط دکتر شاهین صیامی

مقالات مرتبط

Hands-On Lab: Final Comprehensive CCNP Troubleshooting Challenge (BGP, DMVPN, and QoS Integration)

This hands-on lab presents a complex multi-layer failure across an integrated BGP-over-DMVPN topology combined with QoS marking, requiring systematic diagnosis of a route reflector misconfiguration, an NHRP registration failure, and an incorrectly applied QoS policy simultaneously affecting the same network.

ادامه

Hands-On Lab: Configuring BGP over DMVPN

This hands-on lab runs iBGP as the routing protocol across the same DMVPN hub-and-spoke topology used in the two previous labs, configuring the hub as a route reflector so spokes learn each other's routes without a full iBGP mesh, combining two previously separate concepts into one integrated design.

ادامه

Hands-On Lab: Configuring OSPF over DMVPN

This hands-on lab runs OSPF as the dynamic routing protocol across the same DMVPN hub-and-spoke topology, configuring the tunnel interface as an OSPF point-to-multipoint network type to correctly handle the hub-and-spoke adjacency pattern without requiring the broadcast network type's DR/BDR election.

ادامه

Hands-On Lab: Configuring EIGRP over DMVPN

This hands-on lab runs EIGRP as the dynamic routing protocol across the DMVPN hub-and-spoke topology built in earlier labs, verifying neighbor relationships form correctly across the multipoint tunnel and routes propagate without requiring per-spoke static configuration on the hub.

ادامه

Hands-On Lab: Configuring HSRP MD5 Authentication

This hands-on lab configures MD5 authentication on an HSRP group, verifying two routers with matching authentication strings form a normal active/standby relationship while a router with a mismatched string is excluded from the group entirely.

ادامه

Hands-On Lab: Configuring Cisco Umbrella-Style DNS Security via DNS Forwarding Redirection

This hands-on lab configures a router to redirect all client DNS queries toward a security-focused DNS resolver using DNS forwarding interception, approximating cloud-delivered DNS security enforcement without requiring per-client configuration changes.

ادامه