Posted by: Mudassir Ali | June 9, 2010

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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: