CCIE Routing & Switching v5 Workbook -
CCIE R&S v5 Advanced Technology Labs -
LAN Switching
Voice VLAN
You must load the initial configuration files for the section, LAN
Switching Initial Spanning Tree, which can be found in
. Reference
the Virtual Routers & Physical Switches Diagram to complete this
task.
Task
Configure port Fa0/1 of SW1 to assign data packets in VLAN 146 and voice packets
in VLAN 600.
Configure port Fa0/4 of SW1 as an 802.1q trunk link.
Configure VLAN 146 as the native VLAN for this port.
Configure VLAN 600 to be advertised as voice VLAN via CDP.
Allow only traffic for VLANs 146 and 600.
Configure port Fa0/6 of SW1 to assign data packets in VLAN 146.
Ensure that voice VLAN frames use dot1p tagging.
Configuration
SW1:
interface FastEthernet0/1
switchport mode access
switchport access vlan 146
switchport voice vlan 600
!
interface FastEthernet0/4
switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk native vlan 146
switchport trunk allowed vlan 146,600
switchport voice vlan 600
!
interface FastEthernet0/6
switchport mode access
switchport access vlan 146
switchport voice vlan dot1p
Verification
Many models of Cisco IP Phones have a built-in three-port switch with one port to
connect to the upstream switch, one port for the IP Phone itself, and the last port to
connect to a desktop PC. The built-in switch is capable of separating the IP Phone
and the desktop PC traffic using different VLANs. Additionally, the internal switch
can also use different 802.1p markings in the Class of Service (CoS) field to
distinguish the IP Phone and the desktop PC frames. Based on this, there are three
different options for connecting the IP Phone and the desktop PC to the Catalyst
switches.
Option 1 is to separate the Data VLAN for the PC and the Voice VLAN for
the IP Phone. The internal IP Phone switch will tag VoIP traffic with the
respective VLAN number and apply a CoS value of 5. The data frames are
sent untagged and received by the upstream switch on the configured
access VLAN. The connection between the IP Phone and the upstream
switch is an 802.1q trunk with the native VLAN equal to the Data VLAN.
Option 2 is to use a single VLAN for Data and Voice. The IP Phone’s
internal switch does not tag the frames and acts as a simple bridge. The
connection between the IP Phone and the upstream switch is an access
port.
Option 3 is to use a single VLAN for Data and Voice, but to add an 802.1p
CoS tag. Data frames received from the PC on the phone, along with VoIP
frames sent from the phone, get a special 802.1q header that carries a
VLAN ID equal to zero and has the CoS field set to 5 for VoIP and the
value instructed from the switch for data frames. The Catalyst switch
accepts the frames with VLAN zero as if they are in the access VLAN, but it
also honors the CoS bits to calculate the switch’s internal QoS tag.
For all three options, the IP Phone’s built-in switch should be instructed which mode
to use. The command
switchport voice vlan
configured on an access port will
communicate with the IP Phone via CDP and tell its internal switch which VLAN to
use for voice traffic. The IP Phone’s internal switch will then apply the instructed
VLAN tag to the voice traffic and send the PC’s data untagged. Note that there is no
need to configure the port as an 802.1q trunk via the
switchport mode trunk
command.
The switchport ASIC will automatically convert the port into a rudimentary trunk.
If no
switchport voice vlan
command is configured, Option 2 applies automatically.
Both voice and data packets are received on the same VLAN (the access VLAN). If
the command
switchport voice vlan dot1p
is configured on a switchport, the
connected IP Phone’s switch is instructed to apply VLAN 0 to voice traffic along with
the corresponding CoS bits. Both voice and data frames will share the same VLAN
configured on the access port.
Note that as soon as the
switchport voice vlan
command is
applied to the port, PortFast feature is automatically enabled,
although not visible in running-config.
Verify the voice and data VLAN configuration on port Fa0/1, and note that PortFast
was automatically enabled.
SW1#show interfaces fastEthernet0/1 switchport
Name: Fa0/1
Switchport: EnabledAdministrative Mode: static access
Operational Mode: static access
Administrative Trunking Encapsulation: negotiate
Operational Trunking Encapsulation: native
Negotiation of Trunking: OffAccess Mode VLAN: 146 (VLAN0146)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabledVoice VLAN: 600 (VLAN0600)
<output omitted>
!
!SW1#show spanning-tree interface fastEthernet0/1 detail
Port 3 (FastEthernet0/1) of VLAN0146 is designated forwarding
Port path cost 19, Port priority 128, Port Identifier 128.3.
Designated root has priority 4242, address 0013.605f.f000
Designated bridge has priority 4242, address 0013.605f.f000
Designated port id is 128.3, designated path cost 0
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1The port is in the portfast mode
Link type is point-to-point by default
BPDU: sent 18, received 0
Port 3 (FastEthernet0/1) of VLAN0600 is designated forwarding
Port path cost 19, Port priority 128, Port Identifier 128.3.
Designated root has priority 4696, address 0013.605f.f000
Designated bridge has priority 4696, address 0013.605f.f000
Designated port id is 128.3, designated path cost 0
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1The port is in the portfast mode
Link type is point-to-point by default
BPDU: sent 18, received 0
Verify the voice and data VLAN configuration on ports Fa0/4 and Fa0/6.
SW1#show interfaces fastEthernet0/4 switchport
Name: Fa0/4
Switchport: EnabledAdministrative Mode: trunk
Operational Mode: downAdministrative Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)Trunking Native Mode VLAN: 146 (VLAN0146)
Administrative Native VLAN tagging: enabledVoice VLAN: 600 (VLAN0600)
<output omitted>
!
!SW1#show interfaces fastEthernet0/6 switchport
Name: Fa0/6
Switchport: EnabledAdministrative Mode: static access
Operational Mode: down
Administrative Trunking Encapsulation: negotiate
Negotiation of Trunking: OffAccess Mode VLAN: 146 (VLAN0146)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabledVoice VLAN: dot1p