cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
97466
Views
29
Helpful
5
Comments
anaiyar
Level 1
Level 1

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.

Comments
APPIREDDY
Level 1
Level 1

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

ajay pandey
Level 1
Level 1

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 ?

shinojosa_cisco
Level 1
Level 1

Thank you!

alfista16
Level 1
Level 1

Hello. Some clarifications, if I may:

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

What is the point of defining an access vlan above? The switchport is in trunk mode.

Also:

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>

What is the point on defining dot1q encapsulation above, since the switchport mode is access?

 

I believe switchport trunk encapsulation dot1q is not applying to Newer switches 

ShijuGopinathan_0-1674726851662.png

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking for a $25 gift card