Information Technology Reference
In-Depth Information
Sure enough, VLANs 10 (VOICE) and 50 (DATA) now appear as valid VLANs on the
switch. Now that the VLANs exist, you can assign the ports attaching to Cisco IP Phones
(with PCs connected to the IP Phone) to the VLANs, as shown in Example 3-2.
Example 3-2
Assigning Voice and Data VLANs
Key
To p i c
Switch#configure terminal
Switch(config)#interface range fa0/2 - 24
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#spanning-tree portfast
Switch(config-if-range)#switchport access vlan 50
Switch(config-if-range)#switchport voice vlan 10
Switch(config-if-range)#end
Switch#show vlan brief
VLAN Name Status Ports
—— ———————————————— ————- ———————————————-
1 default active Gi0/1, Gi0/2
10 VOICE active Fa0/2, Fa0/3, Fa0/4, Fa0/5
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/14, Fa0/15, Fa0/16, Fa0/17
Fa0/18, Fa0/19, Fa0/20, Fa0/21
Fa0/22, Fa0/23, Fa0/24
50 DATA active Fa0/2, Fa0/3, Fa0/4, Fa0/5
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/14, Fa0/15, Fa0/16, Fa0/17
Fa0/18, Fa0/19, Fa0/20, Fa0/21
Fa0/22, Fa0/23, Fa0/24
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
Note: When connecting Cisco IP Phones to a switch, you should also enable portfast
(using spanning-tree portfast , as shown in Example 3-2), because the IP phones boot
quickly and request a DHCP assigned address before a typical port with spanning-tree
enabled would go active. Also, keep in mind that port Fa0/1 does not appear in the
Example 3-2 output because it is configured as a trunk port (ports 2-24 are not consid-
ered trunks by Cisco IOS).
The ports are now configured to support a voice VLAN of 10 and a data VLAN of 50.
This syntax is a newer form of configuration for IP Phone connections. In the “old days,”
you would configure the interface as a trunk port because the switch was establishing a
trunking relationship between it and the IP phone. This was less secure because a hacker
could remove the IP phone from the switchport and attach their own device (another managed
 
 
Search WWH ::




Custom Search