Cisco Systems, Inc.(R)    Cisco | Profile | Contacts & Feedback | Help
Cisco SMB Support Assistant
Configure Voice Vlans on a Catalyst Switch
Home > Work With My Switches > Cisco Catalyst Switches > Configure Voice Vlans on a Catalyst Switch  
 

Configure Voice Vlans on a Catalyst Switch




Introduction

This document provides instructions on how to create a Voice virtual LAN (VLAN) feature on your Catalyst Switch.

The voice VLAN feature enables switch access ports to carry IP voice traffic from an IP phone. The switch can connect to a Cisco IP Phone and carry IP voice traffic. Because the sound quality of an IP phone call can deteriorate if the data is unevenly sent, the switch supports quality of service (QoS) based on IEEE 802.1P class of service (CoS). QoS uses classification and scheduling to send network traffic from the switch in a predictable manner. The Cisco IP Phone is a configurable device, and you can configure it to forward traffic with an 802.1P priority. You can configure the switch to trust or override the traffic priority assigned by an IP Phone.


Back to Top



Requirements


Back to Top



Connect to the Switch

Follow these steps to connect your PC to the switch for configuration:

  1. Connect a PC to the switch with a console cable.

  2. Create a HyperTerminal connection to your switch. For more information, refer to .

  3. Log into the switch with the login and password that you entered in fields B10 and B11 of the switch Worksheet.

  4. Username:admin
    Password:

    Note: If you do not know the password for your switch, refer to Manually Reset the Password on a Catalyst Switch.

  5. Type enable and press Enter to access the privileged mode. Type the enable password that you entered in field S5 of the Switch Port Assignment Worksheet.

    switch>enable
    Password:
    switch#

Back to Top



Voice VLAN Configuration Guidelines

These are the voice VLAN configuration guidelines:

  1. You must configure voice VLAN on switch access ports.

  2. Before you enable voice VLAN, we recommend that you enable QoS on the switch by entering the mls qos global configuration command and configure the port trust state to trust by entering the mls qos trust cos interface configuration command.

  3. The Port Fast feature is automatically enabled when voice VLAN is configured. When you disable voice VLAN, the Port Fast feature is not automatically disabled.

  4. When you enable port security on an interface that is also configured with a voice VLAN, you must set the maximum allowed secure addresses on the port to at least two.

  5. If any type of port security is enabled on the access VLAN, dynamic port security is automatically enabled on the voice VLAN.

  6. You could not configure static secure or sticky secure MAC addresses on a voice VLAN.

  7. Voice VLAN ports can also be a Dynamic access port, Secure port, 802.1X authenticated port, Protected port.


Back to Top



Configure Voice Vlans on a Catalyst Switch

You can configure the port to carry voice traffic in one of these ways:

Configuring Ports to Carry Voice Traffic in 802.1Q Frames

Configuring Ports to Carry Voice Traffic in 802.1P Priority-Tagged Frames

Configuring Ports to Carry Voice Traffic in 802.1Q Frames

Follow these steps to configure a port to carry voice traffic in 802.1Q frames for a specific VLAN. In this example Vlan 24 is created to carry voice traffic and a Cisco IP phone is connected to switch port fastEthernet 0/15.

Note: Because a Cisco IP Phone also supports a connection to a PC or other device, a port connecting the switch to a Cisco IP Phone can carry mixed traffic.

  1. On the switch privilege exec mode, type configure terminal and press Enter.

    switch#configure terminal
    switch(config)#
  2. Type vlan vlan-id and press Enter to create a new Vlan for voice traffic.

    switch(config)#vlan 24
    
  3. Type status active and press Enter.

    switch(config-vlan)#status active
    
  4. Type exit and press Enter.

    switch(config-vlan)#exit
    switch(config)#
  5. Type mls qos and press Enter to Enable QoS for the entire switch.

    switch(config)#mls qos
    
  6. Type interface interface-id and press Enter to specify the interface connected to the IP phone, and enter interface configuration mode.

    switch(config)#interface fastEthernet 0/15
    switch(config-if)#
  7. Type mls qos trust cos and press Enter to classify ingress traffic packets with packet CoS values. For untagged packets, use the port default CoS value.

    switch(config-if)#mls qos trust cos
    
  8. Type switchport voice vlan vlan-id and press Enter. This command instructs the Cisco IP Phone to forward all voice traffic through the specified VLAN. By default, the Cisco IP Phone forwards the voice traffic with an 802.1Q priority of 5. Valid VLAN IDs are from 1 to 4094.

    switch(config-if)#switchport voice vlan 24
    
  9. Type end and press Enter.

    switch(config-if)#end
    switch#
  10. Type write memory and press Enter.

    switch#write memory
    
  11. Type show interfaces interface-id switchport and press Enter to verify the configuration.

    switch#show interfaces fastEthernet 0/15 switchport
    Name: Fa0/15
    Switchport: Enabled
    Administrative Mode: static access
    Operational Mode: up
    Administrative Trunking Encapsulation: negotiate
    Negotiation of Trunking: Off
    Access Mode VLAN: 1 (default)
    Trunking Native Mode VLAN: 1 (default)
    Administrative Native VLAN tagging: enabled
    Voice VLAN: 24 (VLAN0024)
    ---Output trancated for brevity---

Configuring Ports to Carry Voice Traffic in 802.1P Priority-Tagged Frames

Follow these steps to carry voice traffic in 802.1P Priority- Tagged Frames:

  1. On the switch privilege exec mode, type configure terminal and press Enter.

    switch#configure terminal
    switch(config)#
  2. Type vlan vlan-id and press Enter to create a new Vlan for voice traffic.

    switch(config)#vlan 24
    
  3. Type status active and press Enter.

    switch(config-vlan)#status active
    
  4. Type exit and press Enter.

    switch(config-vlan)#exit
    switch(config)#
  5. Type mls qos and press Enter Enable QoS for the entire switch.

    switch(config)#mls qos
    
  6. Type interface interface-id and press Enter to specify the interface connected to the IP phone, and enter interface configuration mode.

    switch(config)#interface fastEthernet 0/15
    switch(config-if)#
  7. Type mls qos trust cos and press Enter to classify ingress traffic packets with packet CoS values. For untagged packets, use the port default CoS value.

    switch(config-if)#mls qos trust cos
    
  8. Type switchport voice vlan dot1p and press Enter. This command instructs the switch port to use 802.1P priority tagging for voice traffic and to use the default native VLAN (VLAN 0) to carry all the traffic. By default, the Cisco IP phone forwards the voice traffic with an 802.1P priority of 5.

    switch(config-if)#switchport voice vlan dot1p
    
  9. Type end and press Enter.

    switch(config-if)#end
    switch#
  10. Type write memory and press Enter.

    switch#write memory
    
  11. Type show interfaces interface-id switchport and press Enter to verify the configuration.

    switch#show interfaces fastEthernet 0/15 switchport
    Name: Fa0/15
    Switchport: Enabled
    Administrative Mode: static access
    Operational Mode: up
    Administrative Trunking Encapsulation: negotiate
    Negotiation of Trunking: Off
    Access Mode VLAN: 1 (default)
    Trunking Native Mode VLAN: 1 (default)
    Administrative Native VLAN tagging: enabled
    Voice VLAN: dot1p
    ---Output trancated for brevity---

Back to Top



Overriding the CoS Priority of Incoming Data Frames

You can connect a PC or other data device to a Cisco IP Phone port. The PC can generate packets with an assigned CoS value. You can configure the switch to override the priority of frames arriving on the IP phone port from connected devices.

Follow these steps to override the CoS priority received from the non-voice port on the Cisco IP Phone:

  1. On the switch privilege exec mode, type configure terminal and press Enter.

    switch#configure terminal
    switch(config)#
  2. Type interface interface-id and press Enter to specify the interface connected to the IP phone, and enter interface configuration mode.

    switch(config)#interface fastEthernet 0/15
    switch(config-if)#
  3. Type switchport priority extend cos value to set the IP phone access port to override the priority received from the PC or the attached device. The CoS value is a number from 0 to 7. Seven is the highest priority. The default is 0.

    switch(config-if)#switchport priority extend cos 5
    
  4. Type end and press Enter.

    switch(config-if)#end
    switch#
  5. Type write memory and press Enter.

    switch#write memory
    
  6. Type show interfaces interface-id switchport and press Enter to verify the configuration.

    switch#show interfaces fastEthernet 0/15 switchport
    Name: Fa0/15
    Switchport: Enabled
    Administrative Mode: static access
    Operational Mode: up
    Administrative Trunking Encapsulation: negotiate
    Negotiation of Trunking: Off
    Access Mode VLAN: 1 (default)
    Trunking Native Mode VLAN: 1 (default)
    Administrative Native VLAN tagging: enabled
    Voice VLAN: dot1p
    ---Output trancated for brevity---
    Protected: false
    Unknown unicast blocked: disabled
    Unknown multicast blocked: disabled
    Appliance trust: 5

Back to Top



Configuring the IP Phone to Trust the CoS Priority of Incoming Data Frames

You can connect a PC or other data device to a Cisco IP Phone port. The PC can generate packets with an assigned CoS value. You can configure the switch to trust the priority of frames arriving on the IP phone port from connected devices.

Follow these steps to trust the CoS priority received from the non-voice port on the Cisco IP Phone:

  1. On the switch privilege exec mode, type configure terminal and press Enter.

    switch#configure terminal
    switch(config)#
  2. Type interface interface-id and press Enter to specify the interface connected to the IP phone, and enter interface configuration mode.

    switch(config)#interface fastEthernet 0/15
    switch(config-if)#
  3. Type switchport priority extend trust to set the IP phone access port to trust the priority received from the PC or the attached device.

    switch(config-if)#switchport priority extend trust
    
  4. Type end and press Enter.

    switch(config-if)#end
    switch#
  5. Type write memory and press Enter.

    switch#write memory
    
  6. Type show interfaces interface-id switchport and press Enter to verify the configuration.

    switch#show interfaces fastEthernet 0/15 switchport
    Name: Fa0/15
    Switchport: Enabled
    Administrative Mode: static access
    Operational Mode: up
    Administrative Trunking Encapsulation: negotiate
    Negotiation of Trunking: Off
    Access Mode VLAN: 1 (default)
    Trunking Native Mode VLAN: 1 (default)
    Administrative Native VLAN tagging: enabled
    Voice VLAN: dot1p
    ---Output trancated for brevity---
    Protected: false
    Unknown unicast blocked: disabled
    Unknown multicast blocked:
    Appliance trust: trusted

Back to Top



Next Step

You have now set up a Guest VLAN on your network.

To make further changes to your network, refer to the Configuration Overview page.


Back to Top



Troubleshoot the Procedure

This section provides information about common problems that you may encounter. If this information does not solve your problem, contact the SMB Technical Assistance Center (SMB TAC) for assistance.

Problem

Cause(s) and Suggested Solution(s)

The switch boots and displays several error messages but does not display a prompt in HyperTerminal.

Press Enter to clear the output and display the switch prompt.

For further assistance, contact the SMB Technical Assistance Center (SMB TAC).


Back to Top



Related Information

Service Requests

  Open a service request
  Update a service request

Feedback

Please rate this site:
++ + +/- - --

Suggestions for improvement:




If Cisco may contact you for more details
or for future feedback opportunities,
please enter your contact information:

Full Name:
Email:



© 1992-2006 Cisco Systems, Inc. All rights reserved. Terms and Conditions, Privacy Statement, Cookie Policy and Trademarks of Cisco Systems, Inc.