Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 

Sample configuration for Voice and Data deployment on a Switch

Sample configuration for Voice and Data deployment on a Switch

Case 1: Phone and PC's on different/dedicated switch ports on the switch

Creating VLAN's

Voice VLAN

Switch#conf t

Switch(config)#vlan <VLAN ID>

Switch(config-vlan)#name Voice - description of the VLAN

Similarly for the Data VLAN

Creating VLAN interfaces (SVI's) and assigning IP address to them:

Switch#conf t

Switch(config)#interface vlan <VLAN ID>

Switch(config-if)#ip address <X.X.X.X> <X.X.X.X> - IP address Subnet Mask

(The ip address should be one of the useable IP addresses of the phone or data subnet)

Similarly for the Data VLAN

Interface configuration - Data/Voice

Switch#conf t

Switch(config)#interface GigabitEthernet <interface ID>

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan <VLAN ID> - data VLAN in case of PC

or

Switch(config-if)#switchport voice vlan <VLAN ID> - Voice VLAN in case of phone

If QOS is to be applied

Switch(config)#mls qos  -  Enabline QOS globally on the switch

Switch(config)#interface GigabitEthernet <interface ID>

Switch(config-if)#auto qos voip trust

Case 2: PC's connected via switchport behind the IP phone.

Creating VLAN's

Voice VLAN

Switch#conf t

Switch(config)#vlan <VLAN ID>

Switch(config-vlan)#name Voice - description of the VLAN

Similarly for the Data VLAN

Creating VLAN interfaces (SVI's) and assigning IP address to them:

Switch#conf t

Switch(config)#interface vlan <VLAN ID>

Switch(config-if)#ip address <X.X.X.X> <X.X.X.X> - IP address Subnet Mask

(The ip address should be one of the useable IP addresses of the phone or data subnet)

Similarly for the Data VLAN

Interface configuration - Data/Voice

Switch#conf t

Switch(config)#interface GigabitEthernet <interface ID>

Switch(config-if)#switchport trunk encapsulation dot1q

Switch(config-if)#switchport mode trunk

Switch(config-if)#switchport trunk native vlan <VLAN ID> - Data VLAN

Switch(config-if)#switchport access vlan <VLAN ID> - Voice VLAN


OR

Switch#conf t

Switch(config)#interface GigabitEthernet <interface ID>

Switch(config-if)#switchport trunk encapsulation dot1q

Switch(config-if)#switchport mode access

Switch(config-if)#switchport voice vlan <Voice VLAN ID>

Switch(config-if)#switchport access vlan <VLAN ID>

* With newer IOS it is not required that a switchport connecting a phone piggybacking a PC to be configured as a trunk specifically. Please see the secondary configuration above.

If QOS is to be applied

Switch(config)#mls qos  -  Enabline QOS globally on the switch

Switch(config)#interface GigabitEthernet <interface ID>

Switch(config-if)#auto qos voip trust

Or

Switch(config-if)#auto qos voip trust cisco-phone (specifically for Cisco IP phones)

Note: The above mentioned commands are version specific, however are same or similar in most of the cases.

Version history
Revision #:
1 of 1
Last update:
‎11-30-2009 04:32 PM
Updated by:
 
Labels (1)
Comments
New Member

excellent. thanks for your open contribution. please post some more real time senarios, i mean seriously real time, where you see in companies.that would help someone, like us.

cheers

red

New Member

Hi,

Could someone confirm if I need the PC with 802.1 authentication which is connected via Avaya phone[without 802.1x authentication].

How should be that possible ?

New Member

Thank you!