To configure voice
VLAN on the port, use the
switchport voice
vlan command in interface configuration mode. To return to the
default setting, use the
no form of this
command.
switchport voice vlan { vlan-id |
dot1p |
none |
untagged |
name
vlan_name}
no switchport voice vlan
Syntax Description
vlan-id
|
The VLAN to
be used for voice traffic. The range is 1 to 4094. By default, the IP phone
forwards the voice traffic with an IEEE 802.1Q priority of 5.
|
dot1p
|
Configures
the telephone to use IEEE 802.1p priority tagging and uses VLAN 0 (the native
VLAN). By default, the Cisco IP phone forwards the voice traffic with an IEEE
802.1p priority of 5.
|
none
|
Does not
instruct the IP telephone about the voice VLAN. The telephone uses the
configuration from the telephone key pad.
|
untagged
|
Configures
the telephone to send untagged voice traffic. This is the default for the
telephone.
|
name
vlan_name
|
(Optional)
Specifies the VLAN name to be used for voice traffic. You can enter up to 128
characters.
|
Command Default
The default is not
to automatically configure the telephone (none).
The telephone
default is not to tag frames.
Command Modes
Interface configuration
Command History
Release
|
Modification
|
Cisco IOS Release 15.0(2)EX1
|
This command was introduced.
|
|
Option to
specify a VLAN name for voice VLAN. The 'name ' keyword was added.
|
Usage Guidelines
You should configure
voice VLAN on Layer 2 access ports.
You must enable
Cisco Discovery Protocol (CDP) on the switch port connected to the Cisco IP
phone for the
device
to send configuration information to the phone. CDP is enabled by default
globally and on the interface.
Before you enable voice VLAN, we recommend that you enable
quality of service (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.
When you enter a
VLAN ID, the IP phone forwards voice traffic in IEEE 802.1Q frames, tagged with
the specified VLAN ID. The
device
puts IEEE 802.1Q voice traffic in the voice VLAN.
When you select
dot1p ,
none , or
untagged , the
device
puts the indicated voice traffic in the access VLAN.
In all
configurations, the voice traffic carries a Layer 2 IP precedence value. The
default is 5 for voice traffic.
When you enable port
security on an interface that is also configured with a voice VLAN, set the
maximum allowed secure addresses on the port to 2. When the port is connected
to a Cisco IP phone, the IP phone requires one MAC address. The Cisco IP phone
address is learned on the voice VLAN, but not on the access VLAN. If you
connect a single PC to the Cisco IP phone, no additional MAC addresses are
required. If you connect more than one PC to the Cisco IP phone, you must
configure enough secure addresses to allow one for each PC and one for the
Cisco IP phone.
If any type of port
security is enabled on the access VLAN, dynamic port security is automatically
enabled on the voice VLAN.
You cannot configure
static secure MAC addresses in the voice VLAN.
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.
Examples
This example show
how to first populate the VLAN database by associating a VLAN ID with a VLAN
name, and then configure the VLAN (using the name) on an interface, in the
access mode: You can also verify your configuration by entering the
show interfaces
interface-id
switchport in privileged EXEC command and
examining information in the Voice VLAN: row.
Part 1 - Making
the entry in the VLAN database:
Device# configure terminal
Device(config)# vlan 55
Device(config-vlan)# name test
Device(config-vlan)# end
Device#
Part 2 - Checking
the VLAN database:
Device# show vlan id 55
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
55 test active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ------ ---- ----- ------ -------- --- -------- ------ ------
55 enet 100055 1500 - - - - - 0 0
Remote SPAN VLAN
----------------
Disabled
Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
Part 3- Assigning
VLAN to the interface by using the name of the VLAN:
Device# configure terminal
Device(config)# interface gigabitethernet3/1/1
Device(config-if)# switchport mode access
Device(config-if)# switchport voice vlan name test
Device(config-if)# end
Device#
Part 4 -
Verifying configuration:
Device# show running-config
interface gigabitethernet3/1/1
Building configuration...
Current configuration : 113 bytes
!
interface GigabitEthernet3/1/1
switchport voice vlan 55
switchport mode access
Switch#
Part 5 - Also can
be verified in interface switchport:
Device# show interface GigabitEthernet3/1/1 switchport
Name: Gi3/1/1
Switchport: Enabled
Administrative Mode: static access
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: native
Negotiation of Trunking: Off
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: 55 (test)
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
Device#