LOGBOOK

HELP

Quiz Entry - updated: 2026.06.18

How do you configure a port to support both a data VLAN (Virtual Local Area Network) and a voice VLAN?

Assign the data VLAN with switchport access vlan, then add the voice VLAN with switchport voice vlan, and enable QoS (Quality of Service) trust with mls qos trust cos.

Full command sequence:

S1(config)# vlan 20
S1(config-vlan)# name student
S1(config-vlan)# vlan 150
S1(config-vlan)# name VOICE
S1(config-vlan)# exit
S1(config)# interface fa0/18
S1(config-if)# switchport mode access
S1(config-if)# switchport access vlan 20
S1(config-if)# mls qos trust cos
S1(config-if)# switchport voice vlan 150
S1(config-if)# end

Key points:

  • An access port can belong to one data VLAN and one voice VLAN simultaneously
  • mls qos trust cos tells the switch to trust the CoS (Class of Service) priority values set by the IP (Internet Protocol) phone — without this, voice quality may suffer
  • If the VLAN doesn't exist when you assign it to an interface, the switch auto-creates it (you'll see: % Access VLAN does not exist. Creating vlan 30)
  • The IP phone uses CDP (Cisco Discovery Protocol) to discover the voice VLAN, then tags its own traffic accordingly

Tip: Always create and name both VLANs before assigning them — auto-creation works but leaves VLANs with default names, which makes troubleshooting harder.

From Quiz: NETW2 / VLANs | Updated: Jun 18, 2026