TechKnowSurge
Cisco CCNA 2.1 Cisco CCNA 4.7 Cisco CCNA 1.13
VideoNetworkFree

DEMO: Voice and Data VLANs

A Cisco switch port is configured to support both a data VLAN and a voice VLAN simultaneously, using the commands required to separate traffic from a VoIP phone and a connected workstation on a single access port.

Complete this video to capture a CTF flag worth 1 point.

About this video

When an IP phone with a built-in switch is connected to a network, the switch port it occupies must handle two distinct types of traffic: data from a workstation plugged into the phone, and voice from the phone itself. Rather than dedicating separate physical ports to each device, Cisco switches support a dual-VLAN configuration on a single access port that keeps the two traffic streams logically separated. This is accomplished by assigning a standard data VLAN for workstation traffic alongside a dedicated voice VLAN for VoIP traffic, with the port remaining in access mode throughout. In this configuration, data traffic on VLAN 50 travels untagged, while voice traffic on VLAN 150 is tagged by the phone before it reaches the switch. The MLS QoS trust CoS command is also applied to the interface so the switch recognizes and preserves the Class of Service markings the IP phone stamps on its packets, ensuring voice traffic receives appropriate priority treatment across the network. Without this setting, quality-of-service markings would be ignored, potentially degrading call quality. The full configuration is verified using the show run interface command, which confirms that the access VLAN, voice VLAN, and QoS trust settings are all correctly applied. This approach is standard practice in enterprise environments where IP telephony and data networking share the same physical infrastructure.

What you'll learn

What's covered

Configure Voice VLAN on Switch

Aligned to

Cisco CCNA
2.1 Configure and verify VLANs (normal range) spanning multiple switches
4.7 Explain the forwarding per-hop behavior (PHB) for QoS
1.13 Describe switching concepts

Key terms

Virtual LAN
VLAN
A logical grouping of network devices that behave as if they are on the same network regardless of physical location.
Switch
A network device that connects devices within a LAN and forwards traffic based on MAC addresses.
Access Port
A switch port that belongs to a single data VLAN and sends and receives untagged frames, used for connecting end devices such as PCs and printers. An access port may additionally carry a tagged voice VLAN for an IP phone without becoming a trunk.
Voice VLAN
A VLAN dedicated to IP telephony traffic, configured on an access port alongside a data VLAN. The switch instructs the attached IP phone via CDP or LLDP-MED to tag its voice frames with the voice VLAN ID, while an attached PC's untagged frames remain in the data VLAN.
MLS QoS Trust COS
A Cisco IOS command that instructs a switch port to trust the Class of Service markings in incoming frames, ensuring voice traffic receives proper quality of service treatment.

Topics

Networking Vlans Voice Vlan Voip Cisco Ios Switch Configuration Qos

Transcript

Now let's take a look at how to set up a voice VLAN on a switch. In fact, as we mentioned, a phone has a built-in switch, so we're going to set it up as both a voice and a data VLAN and take a look and see what that looks like.

Here I'm on switch 2 right now, and I just did a show run interface Fa0/5 to see what it's configured with right now. As we can see, there's no real settings on this interface.

Setting up the data VLAN

So let's get into the interface and start configuring it. I'm going to get into the global configuration mode and then get into interface Fa0/5 so we can configure that.

The first command I'm going to do is I'm going to set this as an access port, so switchport mode access. Now it's an access port. Then we are going to set it up with the VLAN it's a part of. The data VLAN that I'm going to use for this one is going to be the sales VLAN. I've got that over here showing that the sales VLAN over here is what I'm going to set it up for. So let's set it up for VLAN 50: switchport access vlan 50. We'll hit enter and now it's set up with that.

I'm going to do show run interface Fa0/5 just so we can look and see what's on it right now.

Setting up the voice VLAN

Now I'm going to set this up with a voice VLAN. Since it's going to have voice on it, I want there to be that class of service set up. So what I'm going to do is mls qos, quality of service, trust cos, and hit enter. Now let's take a look and see what happened on this interface. So now that is set up with the mls qos trust interface.

Next what I'm going to do is a switchport voice vlan and the VLAN ID. So the voice VLAN is 150, so the voice VLAN is going to be VLAN 150. I'm going to hit enter, and now let's take a look at that interface.

Now I've got all of that set up. It actually does have spanning tree on it, so it included something else we haven't talked about; we haven't talked about spanning tree yet. But now it's set up as being a voice VLAN. So now as I plug the phone into it, it's going to have that traffic tagged with the appropriate VLAN information that it's a part of. The computer is going to be plugged into the data VLAN of 50, and the phone will be using VLAN 150.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →